return CONNECTION_TYPE_ETHERNET;
case VCONFKEY_NETWORK_BLUETOOTH:
return CONNECTION_TYPE_BT;
+ case VCONFKEY_NETWORK_DEFAULT_PROXY:
+ return CONNECTION_TYPE_NET_PROXY;
default:
return CONNECTION_TYPE_DISCONNECTED;
}
if (rv == NET_ERR_ACCESS_DENIED) {
CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
return CONNECTION_ERROR_PERMISSION_DENIED;
- }
- else if (rv != NET_ERR_NONE) {
+ } else if (rv != NET_ERR_NONE) {
CONNECTION_LOG(CONNECTION_ERROR, "Failed to create connection[%d]", rv);
return CONNECTION_ERROR_OPERATION_FAILED;
}
CHECK_FEATURE_SUPPORTED(WIFI_FEATURE, ETHERNET_FEATURE);
- if(type == CONNECTION_TYPE_WIFI)
+ if (type == CONNECTION_TYPE_WIFI)
CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
- else if(type == CONNECTION_TYPE_ETHERNET)
+ else if (type == CONNECTION_TYPE_ETHERNET)
CHECK_FEATURE_SUPPORTED(ETHERNET_FEATURE);
if (mac_addr == NULL || !(__connection_check_handle_validity(connection))) {
#else
*mac_addr = vconf_get_str(VCONFKEY_WIFI_BSSID_ADDRESS);
- if(*mac_addr == NULL) {
+ if (*mac_addr == NULL) {
CONNECTION_LOG(CONNECTION_ERROR, "Failed to get vconf from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
return CONNECTION_ERROR_OPERATION_FAILED;
}
return CONNECTION_ERROR_OUT_OF_MEMORY;
}
- g_strlcpy(*mac_addr, buf,CONNECTION_MAC_INFO_LENGTH + 1);
+ g_strlcpy(*mac_addr, buf, CONNECTION_MAC_INFO_LENGTH + 1);
fclose(fp);
break;
}
/* Checking Invalid MAC Address */
- if((strcmp(*mac_addr, "00:00:00:00:00:00") == 0) ||
+ if ((strcmp(*mac_addr, "00:00:00:00:00:00") == 0) ||
(strcmp(*mac_addr, "ff:ff:ff:ff:ff:ff") == 0)) {
CONNECTION_LOG(CONNECTION_ERROR, "MAC Address(%s) is invalid", *mac_addr);
return CONNECTION_ERROR_INVALID_OPERATION;
return CONNECTION_ERROR_NONE;
}
+
EXPORT_API int connection_get_cellular_state(connection_h connection, connection_cellular_state_e* state)
{
int rv = 0;
{
CHECK_FEATURE_SUPPORTED(ETHERNET_FEATURE);
- if ( !(__connection_check_handle_validity(connection)) ) {
+ if (!(__connection_check_handle_validity(connection))) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter");
return CONNECTION_ERROR_INVALID_PARAMETER;
}
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- if(id < 0 || id > 1) {
+ if (id < 0 || id > 1) {
CONNECTION_LOG(CONNECTION_ERROR, "Wrong Parameter Passed");
return CONNECTION_ERROR_INVALID_PARAMETER;
}
return CONNECTION_ERROR_OPERATION_FAILED;
}
- *llsize = (long long)(last_size * 1000 + size * 1000);
- CONNECTION_LOG(CONNECTION_INFO,"%lld bytes", *llsize);
+ *llsize = (long long)(last_size * 1000) + (long long)(size * 1000);
+ CONNECTION_LOG(CONNECTION_INFO, "%lld bytes", *llsize);
return CONNECTION_ERROR_NONE;
}
return CONNECTION_ERROR_OPERATION_FAILED;
}
- CONNECTION_LOG(CONNECTION_INFO,"%lld bytes", ull_size);
+ CONNECTION_LOG(CONNECTION_INFO, "%lld bytes", ull_size);
*llsize = (long long)ull_size;
} else
return CONNECTION_ERROR_INVALID_PARAMETER;
if (rv != CONNECTION_ERROR_NONE)
return rv;
- CONNECTION_LOG(CONNECTION_INFO,"connection_reset_statistics success");
+ CONNECTION_LOG(CONNECTION_INFO, "connection_reset_statistics success");
return CONNECTION_ERROR_NONE;
}
{
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE);
- if(connection_type == CONNECTION_TYPE_CELLULAR )
+ if (connection_type == CONNECTION_TYPE_CELLULAR)
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE);
- else if(connection_type == CONNECTION_TYPE_WIFI)
+ else if (connection_type == CONNECTION_TYPE_WIFI)
CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
if (!(__connection_check_handle_validity(connection)) || size == NULL) {
{
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE);
- if(connection_type == CONNECTION_TYPE_CELLULAR )
+ if (connection_type == CONNECTION_TYPE_CELLULAR)
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE);
- else if(connection_type == CONNECTION_TYPE_WIFI)
+ else if (connection_type == CONNECTION_TYPE_WIFI)
CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
if (!__connection_check_handle_validity(connection)) {