Apply coding rule 13/64413/1 accepted/tizen/common/20160406.144659 accepted/tizen/ivi/20160406.104734 accepted/tizen/mobile/20160406.104639 accepted/tizen/tv/20160406.104659 accepted/tizen/wearable/20160406.104713 submit/tizen/20160406.070258
authorhyunuktak <hyunuk.tak@samsung.com>
Fri, 1 Apr 2016 05:00:10 +0000 (14:00 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Fri, 1 Apr 2016 05:00:13 +0000 (14:00 +0900)
Change-Id: I49cb9a9ddc02bb9ec988b4f11ea469072271825f
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/capi-network-connection.spec
src/connection.c
src/connection_profile.c
src/libnetwork.c
test/connection_test.c

index b317a7f..4f6cd24 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          capi-network-connection
 Summary:       Network Connection library in TIZEN C API
-Version:       1.0.81
+Version:       1.0.82
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index fbf8f07..8c2b5b1 100755 (executable)
@@ -401,8 +401,7 @@ EXPORT_API int connection_create(connection_h *connection)
        if (rv == NET_ERR_ACCESS_DENIED) {
                CONNECTION_LOG(CONNECTION_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return CONNECTION_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
-       }
-       else if (rv != NET_ERR_NONE) {
+       } else if (rv != NET_ERR_NONE) {
                CONNECTION_LOG(CONNECTION_ERROR, "Failed to create connection[%d]", rv); //LCOV_EXCL_LINE
                return CONNECTION_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
        }
@@ -537,7 +536,7 @@ EXPORT_API int connection_get_mac_address(connection_h connection, connection_ty
 
        if (type == CONNECTION_TYPE_WIFI)
                CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
-       else if(type == CONNECTION_TYPE_ETHERNET) //LCOV_EXCL_LINE
+       else if (type == CONNECTION_TYPE_ETHERNET) //LCOV_EXCL_LINE
                CHECK_FEATURE_SUPPORTED(ETHERNET_FEATURE); //LCOV_EXCL_LINE
 
        if (mac_addr == NULL || !(__connection_check_handle_validity(connection))) {
@@ -607,7 +606,7 @@ EXPORT_API int connection_get_mac_address(connection_h connection, connection_ty
 
                break;
        //LCOV_EXCL_STOP
-       default:
+       default :
                CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
                return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
@@ -712,7 +711,7 @@ EXPORT_API int connection_get_wifi_state(connection_h connection, connection_wif
 }
 
 //LCOV_EXCL_START
-EXPORT_API int connection_get_ethernet_state(connection_h connection, connection_ethernet_state_estate)
+EXPORT_API int connection_get_ethernet_state(connection_h connection, connection_ethernet_state_e *state)
 {
        CHECK_FEATURE_SUPPORTED(ETHERNET_FEATURE);
 
@@ -764,7 +763,7 @@ EXPORT_API int connection_unset_ethernet_cable_state_chaged_cb(connection_h conn
 }
 //LCOV_EXCL_STOP
 
-EXPORT_API int connection_get_bt_state(connection_h connection, connection_bt_state_estate)
+EXPORT_API int connection_get_bt_state(connection_h connection, connection_bt_state_e *state)
 {
        CHECK_FEATURE_SUPPORTED(TETHERING_BLUETOOTH_FEATURE);
 
@@ -1074,7 +1073,7 @@ EXPORT_API int connection_reset_profile(connection_h connection,
                return CONNECTION_ERROR_INVALID_PARAMETER;
        }
 
-       if(id < 0 || id > 1) {
+       if (id < 0 || id > 1) {
                CONNECTION_LOG(CONNECTION_ERROR, "Wrong Parameter Passed"); //LCOV_EXCL_LINE
                return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
index 3104e12..8e03298 100755 (executable)
@@ -361,7 +361,7 @@ EXPORT_API int connection_profile_get_name(connection_profile_h profile, char**
        return CONNECTION_ERROR_NONE;
 }
 
-EXPORT_API int connection_profile_get_type(connection_profile_h profile, connection_profile_type_etype)
+EXPORT_API int connection_profile_get_type(connection_profile_h profile, connection_profile_type_e *type)
 {
        CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE, TETHERING_BLUETOOTH_FEATURE, ETHERNET_FEATURE);
 
@@ -458,7 +458,7 @@ EXPORT_API int connection_profile_get_state(connection_profile_h profile, connec
 }
 
 EXPORT_API int connection_profile_get_ip_config_type(connection_profile_h profile,
-               connection_address_family_e address_family, connection_ip_config_type_etype)
+               connection_address_family_e address_family, connection_ip_config_type_e *type)
 {
        net_ip_config_type_t profile_type;
 
@@ -669,7 +669,7 @@ EXPORT_API int connection_profile_get_dns_address(connection_profile_h profile,
        return CONNECTION_ERROR_NONE;
 }
 
-EXPORT_API int connection_profile_get_proxy_type(connection_profile_h profile, connection_proxy_type_etype)
+EXPORT_API int connection_profile_get_proxy_type(connection_profile_h profile, connection_proxy_type_e *type)
 {
        CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE, TETHERING_BLUETOOTH_FEATURE, ETHERNET_FEATURE);
 
@@ -1160,7 +1160,7 @@ EXPORT_API int connection_profile_get_wifi_max_speed(connection_profile_h profil
        return CONNECTION_ERROR_NONE;
 }
 
-EXPORT_API int connection_profile_get_wifi_security_type(connection_profile_h profile, connection_wifi_security_type_etype)
+EXPORT_API int connection_profile_get_wifi_security_type(connection_profile_h profile, connection_wifi_security_type_e *type)
 {
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
@@ -1199,7 +1199,7 @@ EXPORT_API int connection_profile_get_wifi_security_type(connection_profile_h pr
        return CONNECTION_ERROR_NONE;
 }
 
-EXPORT_API int connection_profile_get_wifi_encryption_type(connection_profile_h profile, connection_wifi_encryption_type_etype)
+EXPORT_API int connection_profile_get_wifi_encryption_type(connection_profile_h profile, connection_wifi_encryption_type_e *type)
 {
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
@@ -1371,7 +1371,7 @@ EXPORT_API int connection_profile_get_cellular_apn(connection_profile_h profile,
 }
 
 EXPORT_API int connection_profile_get_cellular_auth_info(connection_profile_h profile,
-               connection_cellular_auth_type_etype, char** user_name, char** password)
+               connection_cellular_auth_type_e *type, char** user_name, char** password)
 {
        CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE);
 
index 7839ab5..abe373e 100755 (executable)
@@ -654,7 +654,7 @@ int _connection_libnet_get_wifi_state(connection_wifi_state_e *state)
 }
 
 //LCOV_EXCL_START
-int _connection_libnet_get_ethernet_state(connection_ethernet_state_estate)
+int _connection_libnet_get_ethernet_state(connection_ethernet_state_e *state)
 {
        int rv;
        struct _profile_list_s ethernet_profiles = {0, 0, NULL};
@@ -721,7 +721,7 @@ int _connection_libnet_set_ethernet_cable_state_changed_cb(
 }
 //LCOV_EXCL_STOP
 
-int _connection_libnet_get_bluetooth_state(connection_bt_state_estate)
+int _connection_libnet_get_bluetooth_state(connection_bt_state_e *state)
 {
        int i = 0;
        int rv = 0;
@@ -758,7 +758,7 @@ int _connection_libnet_get_bluetooth_state(connection_bt_state_e* state)
        }
        //LCOV_EXCL_STOP
 
-done:
+done :
        __libnet_clear_profile_list(&bluetooth_profiles);
 
        return CONNECTION_ERROR_NONE;
@@ -1113,7 +1113,7 @@ int _connection_libnet_get_cellular_service_profile(
        }
        //LCOV_EXCL_STOP
 
-done:
+done :
        __libnet_clear_profile_list(&cellular_profiles);
        prof_handle_list = g_slist_append(prof_handle_list, *profile);
 
index c6fcf39..2e6d097 100755 (executable)
@@ -133,7 +133,7 @@ static const char *test_print_cellular_state(connection_cellular_state_e state)
 
 static const char *test_print_wifi_state(connection_wifi_state_e state)
 {
-       switch(state) {
+       switch (state) {
        case CONNECTION_WIFI_STATE_DEACTIVATED:
                return "Deactivated";
        case CONNECTION_WIFI_STATE_DISCONNECTED:
@@ -147,7 +147,7 @@ static const char *test_print_wifi_state(connection_wifi_state_e state)
 
 static const char *test_print_cellular_service_type(connection_cellular_service_type_e type)
 {
-       switch(type) {
+       switch (type) {
        case CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN:
                return "Unknown";
        case CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET: