Set CFLAGS fvisibility hidden and Remove unuseful code
authorJaehyun Kim <jeik01.kim@samsung.com>
Mon, 22 Apr 2013 06:53:50 +0000 (15:53 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Mon, 22 Apr 2013 06:53:50 +0000 (15:53 +0900)
Makefile.am
packaging/libnet-client.spec
src/include/network-internal.h
src/network-cm-intf.c
src/network-internal.c
src/network-profile-intf.c
src/network-wifi-intf.c

index bcfa29f..12bf012 100644 (file)
@@ -1,4 +1,5 @@
-CPPFLAGS  =  $(DBUS_CFLAGS) $(GLIB_CFLAGS) $(DLOG_CFLAGS) $(VCONF_CFLAGS)
+CPPFLAGS = $(DBUS_CFLAGS) $(GLIB_CFLAGS) $(DLOG_CFLAGS) $(VCONF_CFLAGS)
+CPPFLAGS += -Wall -Werror -fvisibility=hidden
 
 ACLOCAL_AMFLAGS = -I m4
 
@@ -18,14 +19,14 @@ libnetwork_la_SOURCES = \
                        src/network-profile-intf.c \
                        src/network-dbus-request.c \
                        src/network-internal.c \
-                       src/network-signal-handler.c 
+                       src/network-signal-handler.c
 
 libnetwork_la_CFLAGS = \
               -I$(srcdir)/include \
               -I$(srcdir)/include/wifi \
               -I$(srcdir)/include/profile \
               -I$(srcdir)/include/common \
-              -I$(srcdir)/src/include 
+              -I$(srcdir)/src/include
 
 libnetwork_la_CFLAGS += $(CPPFLAGS)
 
@@ -40,11 +41,11 @@ includelibnetwork_HEADERS =  include/common/network-cm-intf.h \
                        include/profile/network-pm-intf.h \
                        include/profile/network-pm-wlan.h \
                        include/profile/network-pm-config.h \
-                       include/wifi/network-wifi-intf.h 
+                       include/wifi/network-wifi-intf.h
 
 libnetwork_la_CFLAGS += $(AM_FLAGS)
 
-pcfiles = network.pc 
+pcfiles = network.pc
 
 %.pc: %.pc
        cp $< $@
index 5ea58be..ed2405e 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libnet-client
 Summary:    Network Client library (Shared library)
-Version:    0.1.77_25
+Version:    0.1.77_26
 Release:    1
 Group:      System/Network
 License:    Flora License
index 302fc17..760523f 100644 (file)
@@ -227,7 +227,6 @@ char* _net_get_string(DBusMessage* msg);
 unsigned long long _net_get_uint64(DBusMessage* msg);
 char* _net_get_object(DBusMessage* msg);
 int _net_get_boolean(DBusMessage* msg);
-int _net_get_path(DBusMessage *msg, char *profile_name);
 int _net_get_tech_state(DBusMessage* msg, network_tech_state_info_t* tech_state);
 char* _net_print_error(net_err_t error);
 int _net_is_valid_service_type(net_service_type_t service_type);
index 9f937e7..9f6cc97 100644 (file)
@@ -23,7 +23,6 @@
 /*****************************************************************************
  *     Local Functions Declaration
  *****************************************************************************/
-
 static int __net_get_default_profile(void *param, net_profile_info_t *active_profile_info);
 
 /*****************************************************************************
@@ -33,19 +32,16 @@ static int __net_get_default_profile(void *param, net_profile_info_t *active_pro
 /*****************************************************************************
  *     Extern Variables
  *****************************************************************************/
-
 extern network_request_table_t request_table[NETWORK_REQUEST_TYPE_MAX];
 
 /*****************************************************************************
  *     Global Variables
  *****************************************************************************/
-
 network_info_t NetworkInfo = {0, };
 
 /*****************************************************************************
  *     Local Functions Definition
  *****************************************************************************/
-
 static int __net_get_default_profile(void *param, net_profile_info_t *active_profile_info)
 {
        __NETWORK_FUNC_ENTER__;
@@ -198,7 +194,6 @@ static int __net_get_netinfo(net_profile_info_t *active_profile_info, net_dev_in
 /*****************************************************************************
  *     ConnMan Client Common Interface API Definition
  *****************************************************************************/
-
 /**
  * @fn  EXPORT_API int net_register_client(net_event_cb_t event_cb, void *user_data)
  *
@@ -259,7 +254,7 @@ EXPORT_API int net_register_client(net_event_cb_t event_cb, void *user_data)
        return NET_ERR_NONE;
 }
 
-int net_register_client_ext(net_event_cb_t event_cb, net_device_t client_type, void *user_data)
+EXPORT_API int net_register_client_ext(net_event_cb_t event_cb, net_device_t client_type, void *user_data)
 {
        net_err_t Error = NET_ERR_NONE;
 
@@ -331,7 +326,6 @@ int net_register_client_ext(net_event_cb_t event_cb, net_device_t client_type, v
  * @param[in]    none
  * @param[out]   none
  */
-
 EXPORT_API int net_deregister_client(void)
 {
        __NETWORK_FUNC_ENTER__;
@@ -357,7 +351,7 @@ EXPORT_API int net_deregister_client(void)
        return NET_ERR_NONE;
 }
 
-int net_deregister_client_ext(net_device_t client_type)
+EXPORT_API int net_deregister_client_ext(net_device_t client_type)
 {
        if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
                NETWORK_LOG(NETWORK_ERROR, "Application was not registered\n");
@@ -653,7 +647,8 @@ EXPORT_API int net_is_connected(void)
                return FALSE;
        }
 
-       if ((g_strcmp0(state, "online") == 0) || (g_strcmp0(state, "connected") == 0)) {
+       if ((g_strcmp0(state, "online") == 0) ||
+                       (g_strcmp0(state, "connected") == 0)) {
                NETWORK_LOG(NETWORK_HIGH, "State [%s]\n", state);
 
                __NETWORK_FUNC_EXIT__;
@@ -789,7 +784,6 @@ EXPORT_API int net_remove_route(const char *ip_addr, const char *interface)
 /*****************************************************************************
  *     ConnMan Wi-Fi Client Interface Async Function Definition
  *****************************************************************************/
-
 /**
  * @fn   EXPORT_API int net_open_connection_with_profile(const char *profile_name)
  *
@@ -929,7 +923,7 @@ EXPORT_API int net_open_connection_with_preference(net_service_type_t service_ty
        return NET_ERR_NONE;
 }
 
-int net_open_connection_with_preference_ext(net_service_type_t service_type,
+EXPORT_API int net_open_connection_with_preference_ext(net_service_type_t service_type,
                net_profile_name_t *prof_name)
 {
        __NETWORK_FUNC_ENTER__;
@@ -1011,7 +1005,6 @@ int net_open_connection_with_preference_ext(net_service_type_t service_type,
  * @param[in]    char *profile_name - Connected profile Name
  * @param[out]   none
  */
-
 EXPORT_API int net_close_connection(const char *profile_name)
 {
        __NETWORK_FUNC_ENTER__;
index 3606b17..28adef8 100644 (file)
@@ -318,20 +318,6 @@ int _net_get_boolean(DBusMessage* msg)
        return retvalue;
 }
 
-int _net_get_path(DBusMessage *msg, char *profile_name)
-{
-       __NETWORK_FUNC_ENTER__;
-
-       char* ProfileName = NULL;
-
-       ProfileName = (char*)dbus_message_get_path(msg);
-       snprintf(profile_name, strlen(ProfileName) + 1, "%s", ProfileName);
-
-       __NETWORK_FUNC_EXIT__;
-
-       return NET_ERR_NONE;
-}
-
 int _net_get_tech_state(DBusMessage* msg, network_tech_state_info_t* tech_state)
 {
        __NETWORK_FUNC_ENTER__;
@@ -644,4 +630,4 @@ void _net_clear_request_table(void)
                memset(&request_table[i], 0, sizeof(network_request_table_t));
 
        __NETWORK_FUNC_EXIT__;
-}
\ No newline at end of file
+}
index d7b66dd..7074ee9 100644 (file)
@@ -63,7 +63,6 @@ static int __net_set_default_cellular_service_profile_async(const char* ProfileN
 /*****************************************************************************
  *     Extern Variables
  *****************************************************************************/
-
 extern network_info_t NetworkInfo;
 extern network_request_table_t request_table[NETWORK_REQUEST_TYPE_MAX];
 
@@ -74,7 +73,6 @@ extern network_request_table_t request_table[NETWORK_REQUEST_TYPE_MAX];
 /*****************************************************************************
  *     Local Functions Definition
  *****************************************************************************/
-
 static int __net_pm_init_profile_info(net_device_t profile_type, net_profile_info_t* ProfInfo)
 {
        __NETWORK_FUNC_ENTER__;
@@ -804,7 +802,6 @@ static int __net_extract_services(DBusMessage *message, net_device_t device_type
        return Error;
 }
 
-
 static int __net_extract_ip(DBusMessageIter *iter, net_addr_t *ipAddr)
 {
        __NETWORK_FUNC_ENTER__;
@@ -1887,7 +1884,6 @@ done:
        return Error;
 }
 
-
 static int __net_telephony_add_profile(net_profile_info_t *ProfInfo, net_service_type_t network_type)
 {
        __NETWORK_FUNC_ENTER__;
@@ -2190,8 +2186,6 @@ done:
 /*****************************************************************************
  *     ConnMan Wi-Fi Client Interface Sync API Definition
  *****************************************************************************/
-
-
 EXPORT_API int net_add_profile(net_service_type_t network_type, net_profile_info_t *prof_info)
 {
        net_err_t Error = NET_ERR_NONE;
@@ -2223,7 +2217,6 @@ EXPORT_API int net_add_profile(net_service_type_t network_type, net_profile_info
        return Error;
 }
 
-
 EXPORT_API int net_delete_profile(const char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
index a0f4db2..7c2a1eb 100644 (file)
@@ -30,7 +30,6 @@
 /*****************************************************************************
  *     Local Functions Declaration
  *****************************************************************************/
-
 static net_wifi_state_t __net_get_wifi_service_state();
 
 /*****************************************************************************
@@ -40,7 +39,6 @@ static net_wifi_state_t __net_get_wifi_service_state();
 /*****************************************************************************
  *     Extern Variables
  *****************************************************************************/
-
 extern network_info_t NetworkInfo;
 extern network_request_table_t request_table[NETWORK_REQUEST_TYPE_MAX];
 
@@ -51,7 +49,6 @@ extern network_request_table_t request_table[NETWORK_REQUEST_TYPE_MAX];
 /*****************************************************************************
  *     Local Functions Definition
  *****************************************************************************/
-
 static net_wifi_state_t __net_get_wifi_service_state(char *profile_name)
 {
        __NETWORK_FUNC_ENTER__;