Fix the coding style 95/31295/1
authorChengyi Zhao <chengyi1.zhao@archermind.com>
Wed, 3 Dec 2014 03:57:07 +0000 (11:57 +0800)
committerChengyi Zhao <chengyi1.zhao@archermind.com>
Wed, 3 Dec 2014 05:35:27 +0000 (13:35 +0800)
Change-Id: I339a467483b12295b9d2953c54bdbff68ba6ac3a
Signed-off-by: Chengyi Zhao <chengyi1.zhao@archermind.com>
src/connection.c
src/connection_profile.c
src/include/net_cm_intf.h
src/include/net_pm_config.h
src/libnetwork.c

index 49279f438be869c3ce4dd6e3eb8aa326150bc8aa..dcca4bd3310a1ab434d5912a7d734ac3b1b35831 100644 (file)
@@ -567,7 +567,7 @@ EXPORT_API int connection_remove_profile(connection_h connection, connection_pro
                return CONNECTION_ERROR_INVALID_PARAMETER;
        }
        TODO:
-       rv = net_delete_profile(profile_info->ProfileName);
+       rv = net_delete_profile(profile_info->profile_name);
        if (rv != NET_ERR_NONE) {
                CONNECTION_LOG(CONNECTION_ERROR, "net_delete_profile Failed = %d\n", rv);
                return CONNECTION_ERROR_OPERATION_FAILED;
@@ -590,7 +590,7 @@ EXPORT_API int connection_update_profile(connection_h connection, connection_pro
        net_profile_info_t *profile_info = profile;
 
        TODO:
-       rv = net_modify_profile(profile_info->ProfileName, (net_profile_info_t*)profile);
+       rv = net_modify_profile(profile_info->profile_name, (net_profile_info_t *)profile);
        if (rv != NET_ERR_NONE) {
                CONNECTION_LOG(CONNECTION_ERROR, "net_modify_profile Failed = %d\n", rv);
                return CONNECTION_ERROR_OPERATION_FAILED;
index a38a43895961a0ff2df1042024954f78481b84b4..85bd1131d62bca6481ba6f7530c65798b972e39f 100644 (file)
@@ -63,7 +63,7 @@ static char* __profile_convert_ip_to_string(net_addr_t *ip_addr)
 static void __profile_init_cellular_profile(net_profile_info_t *profile_info, const char *keyword)
 {
        profile_info->profile_type = NET_DEVICE_CELLULAR;
-       profile_info->ProfileState = NET_STATE_TYPE_IDLE;
+       profile_info->profile_state = NET_STATE_TYPE_IDLE;
        profile_info->ProfileInfo.Pdp.net_info.IpConfigType = NET_IP_CONFIG_TYPE_OFF;
        profile_info->ProfileInfo.Pdp.net_info.ProxyMethod = NET_PROXY_TYPE_DIRECT;
        g_strlcpy(profile_info->ProfileInfo.Pdp.Keyword, keyword, NET_PDP_APN_LEN_MAX);
@@ -72,7 +72,7 @@ static void __profile_init_cellular_profile(net_profile_info_t *profile_info, co
 static void __profile_init_wifi_profile(net_profile_info_t *profile_info)
 {
        profile_info->profile_type = NET_DEVICE_WIFI;
-       profile_info->ProfileState = NET_STATE_TYPE_IDLE;
+       profile_info->profile_state = NET_STATE_TYPE_IDLE;
        profile_info->ProfileInfo.Wlan.net_info.IpConfigType = NET_IP_CONFIG_TYPE_OFF;
        profile_info->ProfileInfo.Wlan.net_info.ProxyMethod = NET_PROXY_TYPE_DIRECT;
        profile_info->ProfileInfo.Wlan.wlan_mode = NETPM_WLAN_CONNMODE_AUTO;
@@ -263,7 +263,7 @@ EXPORT_API int connection_profile_get_id(connection_profile_h profile, char** pr
        /*
        net_profile_info_t *profile_info = profile;
 
-       char *prof_id = strrchr(profile_info->ProfileName, '/');
+       char *prof_id = strrchr(profile_info->profile_name, '/');
        if (prof_id == NULL)
                return CONNECTION_ERROR_INVALID_PARAMETER;
 
@@ -298,7 +298,7 @@ EXPORT_API int connection_profile_get_name(connection_profile_h profile, char**
                *profile_name = g_strdup(profile_info->ProfileInfo.Ethernet.net_info.DevName);
                break;
        case NET_DEVICE_BLUETOOTH: {
-               char *bt_name = strrchr(profile_info->ProfileName, '/');
+               char *bt_name = strrchr(profile_info->profile_name, '/');
                if (bt_name == NULL)
                        return CONNECTION_ERROR_INVALID_PARAMETER;
 
@@ -381,7 +381,7 @@ EXPORT_API int connection_profile_refresh(connection_profile_h profile)
        net_profile_info_t *profile_info = profile;
 
        TODO:
-       if (net_get_profile_info(profile_info->ProfileName, &profile_info_local) != NET_ERR_NONE) {
+       if (net_get_profile_info(profile_info->profile_name, &profile_info_local) != NET_ERR_NONE) {
                CONNECTION_LOG(CONNECTION_ERROR, "Error!!! net_get_profile_info() failed\n");
                return CONNECTION_ERROR_OPERATION_FAILED;
        }
@@ -401,7 +401,7 @@ EXPORT_API int connection_profile_get_state(connection_profile_h profile, connec
 
        /*
        net_profile_info_t *profile_info = profile;
-       *state = _profile_convert_to_cp_state(profile_info->ProfileState);
+       *state = _profile_convert_to_cp_state(profile_info->profile_state);
        if (*state < 0)
                return CONNECTION_ERROR_OPERATION_FAILED;
         */
@@ -1083,7 +1083,7 @@ EXPORT_API int connection_profile_is_wifi_passphrase_required(connection_profile
        if (profile_info->profile_type != NET_DEVICE_WIFI)
                return CONNECTION_ERROR_INVALID_PARAMETER;
 
-       if (profile_info->Favourite) {
+       if (profile_info->favourite) {
                *required = false;
                return CONNECTION_ERROR_NONE;
        }
index 049d4ebcabe36324f9da772cec9b77ed9a79681b..704b4e3c5fd09998d76b13a743bde31a6ce2c82a 100644 (file)
@@ -89,11 +89,11 @@ typedef struct {
        /** Device Type of the profile */
        net_device_t profile_type;
        /** Profile name */
-       char ProfileName[NET_PROFILE_NAME_LEN_MAX+1];
+       char profile_name[NET_PROFILE_NAME_LEN_MAX+1];
        /** Service state */
-       net_state_type_t ProfileState;
+       net_state_type_t profile_state;
        /** Favourite flag */
-       char Favourite;
+       char favourite;
 } net_profile_info_t;
 
 #ifdef __cplusplus
index 2aed9af371814e630d98932fad185188a5959216..e063cb346f86c08bf16250cc4580f7b8de0d1780 100644 (file)
@@ -265,7 +265,7 @@ typedef struct {
  */
 typedef struct {
        /** Profile name */
-       char                    ProfileName[NET_PROFILE_NAME_LEN_MAX+1];
+       char                    profile_name[NET_PROFILE_NAME_LEN_MAX+1];
 } net_profile_name_t;
 
 
index db7633215ef600d41b87056103c460f4c989ec4f..06c0317e4c22571a697e68aa08903bc0fab6e4d0 100755 (executable)
@@ -226,8 +226,8 @@ int __libnet_get_connected_count(struct _profile_list_s *profile_list)
        int i = 0;
 
        for (;i < profile_list->count;i++) {
-               if (profile_list->profiles[i].ProfileState == NET_STATE_TYPE_ONLINE ||
-                   profile_list->profiles[i].ProfileState == NET_STATE_TYPE_READY)
+               if (profile_list->profiles[i].profile_state == NET_STATE_TYPE_ONLINE ||
+                   profile_list->profiles[i].profile_state == NET_STATE_TYPE_READY)
                        count++;
        }
 
@@ -240,8 +240,8 @@ void __libnet_copy_connected_profile(net_profile_info_t **dest, struct _profile_
        int i = 0;
 
        for (;i < source->count;i++) {
-               if (source->profiles[i].ProfileState == NET_STATE_TYPE_ONLINE ||
-                   source->profiles[i].ProfileState == NET_STATE_TYPE_READY) {
+               if (source->profiles[i].profile_state == NET_STATE_TYPE_ONLINE ||
+                   source->profiles[i].profile_state == NET_STATE_TYPE_READY) {
                        memcpy(*dest, &source->profiles[i], sizeof(net_profile_info_t));
                        (*dest)++;
                }
@@ -312,7 +312,7 @@ bool _connection_libnet_check_profile_cb_validity(connection_profile_h profile)
        if (profile == NULL)
                return false;
 
-       cb_info = g_hash_table_lookup(profile_cb_table, profile_info->ProfileName);
+       cb_info = g_hash_table_lookup(profile_cb_table, profile_info->profile_name);
        if (cb_info != NULL)
                return true;
 
@@ -525,7 +525,7 @@ int _connection_libnet_open_profile(connection_profile_h profile, connection_ope
        /*
        net_profile_info_t *profile_info = profile;
        TODO:
-       if (net_open_connection_with_profile(profile_info->ProfileName) != NET_ERR_NONE)
+       if (net_open_connection_with_profile(profile_info->profile_name) != NET_ERR_NONE)
                return CONNECTION_ERROR_OPERATION_FAILED;
         */
 
@@ -605,7 +605,7 @@ int _connection_libnet_set_cellular_service_profile_sync(connection_cellular_ser
        if (service_type != type)
                return CONNECTION_ERROR_INVALID_PARAMETER;
        TODO:
-       if (net_set_default_cellular_service_profile(profile_info->ProfileName) != NET_ERR_NONE)
+       if (net_set_default_cellular_service_profile(profile_info->profile_name) != NET_ERR_NONE)
                return CONNECTION_ERROR_OPERATION_FAILED;
         */
 
@@ -629,7 +629,7 @@ int _connection_libnet_set_cellular_service_profile_async(connection_cellular_se
        if (service_type != type)
                return CONNECTION_ERROR_INVALID_PARAMETER;
        TODO:
-       if (net_set_default_cellular_service_profile_async(profile_info->ProfileName) != NET_ERR_NONE)
+       if (net_set_default_cellular_service_profile_async(profile_info->profile_name) != NET_ERR_NONE)
                return CONNECTION_ERROR_OPERATION_FAILED;
         */
 
@@ -648,7 +648,7 @@ int _connection_libnet_close_profile(connection_profile_h profile, connection_cl
        /*
        net_profile_info_t *profile_info = profile;
        TODO:
-       if (net_close_connection(profile_info->ProfileName) != NET_ERR_NONE)
+       if (net_close_connection(profile_info->profile_name) != NET_ERR_NONE)
                return CONNECTION_ERROR_OPERATION_FAILED;
         */
 
@@ -693,7 +693,7 @@ bool _connection_libnet_add_to_profile_cb_list(connection_profile_h profile,
                connection_profile_state_changed_cb callback, void *user_data)
 {
        net_profile_info_t *profile_info = profile;
-       char *profile_name = g_strdup(profile_info->ProfileName);
+       char *profile_name = g_strdup(profile_info->profile_name);
 
        struct _profile_cb_s *profile_cb_info = g_try_malloc0(sizeof(struct _profile_cb_s));
        if (profile_cb_info == NULL) {
@@ -712,7 +712,7 @@ bool _connection_libnet_add_to_profile_cb_list(connection_profile_h profile,
 void _connection_libnet_remove_from_profile_cb_list(connection_profile_h profile)
 {
        net_profile_info_t *profile_info = profile;
-       g_hash_table_remove(profile_cb_table, profile_info->ProfileName);
+       g_hash_table_remove(profile_cb_table, profile_info->profile_name);
 }
 
 int _connection_libnet_set_statistics(net_device_t device_type, net_statistics_type_e statistics_type)