if (network_info == NULL || network_info->connection == NULL) {
connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
+ /* LCOV_EXCL_START */
if (connection == NULL) {
- /* LCOV_EXCL_START */
if (error != NULL) {
WIFI_LOG(WIFI_ERROR,
"Failed to connect to the D-BUS daemon [%s]", error->message);
g_error_free(error);
}
- /* LCOV_EXCL_STOP */
return NULL;
}
+ /* LCOV_EXCL_STOP */
created = TRUE;
} else {
connection = network_info->connection;
if (message == NULL) {
WIFI_LOG(WIFI_ERROR, "Failed to get scan state"); //LCOV_EXCL_LINE
- __NETWORK_FUNC_EXIT__;
- return Error;
+ __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return Error; //LCOV_EXCL_LINE
}
g_variant_get(message, "(a{sv})", &iter);
conn = G_DBUS_CONNECTION(source_object);
message = g_dbus_connection_call_finish(conn, res, &error);
if (message == NULL && error != NULL) {
- WIFI_LOG(WIFI_ERROR, "Delete profile, error [%s]", error->message);
- Error = NET_ERR_UNKNOWN;
- g_error_free(error);
- goto error;
+ WIFI_LOG(WIFI_ERROR, "Delete profile, error [%s]", error->message); //LCOV_EXCL_LINE
+ Error = NET_ERR_UNKNOWN; //LCOV_EXCL_LINE
+ g_error_free(error); //LCOV_EXCL_LINE
+ goto error; //LCOV_EXCL_LINE
}
Error = NET_ERR_NO_PROFILE;
g_variant_get(message, "(a(oa{sv}))", &iter);
if (iter == NULL) {
- g_variant_unref(message);
- goto error;
+ g_variant_unref(message); //LCOV_EXCL_LINE
+ goto error; //LCOV_EXCL_LINE
}
while (g_variant_iter_loop(iter, "(oa{sv})", &path, &service)) {
g_variant_unref(message);
if (Error != NET_ERR_NONE)
- goto error;
+ goto error; //LCOV_EXCL_LINE
g_strlcpy(wifi_prof_name.ProfileName,
request_table[NETWORK_REQUEST_TYPE_FORGET_AP].ProfileName,
WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
"Failed to delete service(profile). Error [%s]",
_net_print_error(Error));
- goto error;
+ goto error; //LCOV_EXCL_LINE
}
if (prof_info.ProfileState != NET_STATE_TYPE_ONLINE &&
return;
error:
- net_forget_ap_finished(network_info, Error);
- __NETWORK_FUNC_EXIT__;
+ net_forget_ap_finished(network_info, Error); //LCOV_EXCL_LINE
+ __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
}
int net_delete_profile_async(network_info_s *network_info, const char* profile_name)
"Failed to get service(profile) information. Error [%s]",
_net_print_error(Error));
- network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag = FALSE;
+ network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag = FALSE; //LCOV_EXCL_LINE
__NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
return Error; //LCOV_EXCL_LINE
}
return Error;
}
+//LCOV_EXCL_START
int net_get_interface_list(network_info_s *network_info, GSList **interface_list)
{
__NETWORK_FUNC_ENTER__;
Error = _net_get_interface_list(network_info, interface_list);
if (Error != NET_ERR_NONE) {
- WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
+ WIFI_LOG(WIFI_ERROR,
"Failed to get interface list. Error [%s]",
_net_print_error(Error));
}
__NETWORK_FUNC_EXIT__;
return Error;
}
+//LCOV_EXCL_STOP
int net_get_profile_list(network_info_s *network_info, GSList **profile_list)
{
if (_wifi_check_ap_validity(ap) == false || ssid == NULL ||
ssid_len == NULL) {
- WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
__NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
- return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
net_profile_info_s *profile_info = ap;
*ssid = g_try_malloc0(NET_WLAN_RAW_SSID_LEN + 1);
if (*ssid == NULL) {
__NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
- return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
+ return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
memcpy(*ssid, profile_info->raw_ssid, NET_WLAN_RAW_SSID_LEN);
&profile_info->net_info.IpAddr,
address_family);
if (g_strcmp0(*ip_address, "0.0.0.0") == 0) {
- WIFI_LOG(WIFI_ERROR, "Invalid IP Address [%s]\n", *ip_address); //LCOV_EXCL_LINE
+ WIFI_LOG(WIFI_ERROR, "Invalid IP Address [%s]", *ip_address); //LCOV_EXCL_LINE
__NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
return WIFI_MANAGER_ERROR_NO_CONNECTION; //LCOV_EXCL_LINE
}
}
if (*ip_address == NULL) {
- WIFI_LOG(WIFI_ERROR, "Out of memory\n"); //LCOV_EXCL_LINE
+ WIFI_LOG(WIFI_ERROR, "Out of memory"); //LCOV_EXCL_LINE
__NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
- WIFI_LOG(WIFI_INFO, "Wi-Fi IP Address [%s]\n", *ip_address);
+ WIFI_LOG(WIFI_INFO, "Wi-Fi IP Address [%s]", *ip_address);
__NETWORK_CAPI_FUNC_EXIT__;
return WIFI_MANAGER_ERROR_NONE;
address_family);
if (*dhcp_server == NULL) {
- WIFI_LOG(WIFI_ERROR, "Out of memory\n");
- __NETWORK_CAPI_FUNC_EXIT__;
- return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
+ WIFI_LOG(WIFI_ERROR, "Out of memory"); //LCOV_EXCL_LINE
+ __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
__NETWORK_CAPI_FUNC_EXIT__;
profile_info->net_info.DnsAddr[order-1].Data.Ipv4.s_addr = 0;
else if (inet_pton(AF_INET, dns_address,
&(profile_info->net_info.DnsAddr[order-1].Data.Ipv4)) < 1) {
- __NETWORK_CAPI_FUNC_EXIT__;
- return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
+ __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
if (profile_info->net_info.DnsCount < order)
CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
if (_wifi_check_ap_validity(ap) == false || country_code == NULL) {
- WIFI_LOG(WIFI_ERROR, "Invalid parameter");
- __NETWORK_CAPI_FUNC_EXIT__;
- return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+ __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
net_profile_info_s *profile_info = ap;
if (profile_info->country_code[0] != '\0') {
*country_code = strdup(profile_info->country_code);
if (*country_code == NULL) {
- __NETWORK_CAPI_FUNC_EXIT__;
- return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
+ __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else
*country_code = NULL;
CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
if (_wifi_check_ap_validity(ap) == false || callback == NULL) {
- WIFI_LOG(WIFI_ERROR, "Invalid parameter\n");
- __NETWORK_CAPI_FUNC_EXIT__;
- return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+ __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
net_profile_info_s *profile_info = ap;
if (profile_info->disconnect_reason == 0)
profile_info->disconnect_reason = WIFI_REASON_UNSPECIFIED;
- WIFI_LOG(WIFI_INFO, "Disconnect Reason Code %d\n",
+ WIFI_LOG(WIFI_INFO, "Disconnect Reason Code %d",
*disconnect_reason);
__NETWORK_CAPI_FUNC_EXIT__;
net_profile_info_s *profile_info = ap;
*status_code = (int)profile_info->assoc_status_code;
- WIFI_LOG(WIFI_INFO, "Association Status Code %d\n",
+ WIFI_LOG(WIFI_INFO, "Association Status Code %d",
*status_code);
__NETWORK_CAPI_FUNC_EXIT__;
net_profile_info_s *profile_info = ap;
*error_state = __wifi_convert_to_ap_error_state(profile_info->ProfileErrorState);
- WIFI_LOG(WIFI_INFO, "error_state %d\n", *error_state);
+ WIFI_LOG(WIFI_INFO, "error_state %d", *error_state);
__NETWORK_CAPI_FUNC_EXIT__;
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_ap_get_connection_mode(wifi_manager_ap_h ap, wifi_manager_connection_mode_e *mode)
{
__NETWORK_CAPI_FUNC_ENTER__;
__NETWORK_CAPI_FUNC_EXIT__;
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_STOP
RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
if (!_wifi_check_essid_validity(name)) {
- __NETWORK_CAPI_FUNC_EXIT__;
+ __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
h = g_new0(wifi_config_s, 1);
if (h == NULL) {
- __NETWORK_CAPI_FUNC_EXIT__;
+ __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
return ret;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_config_foreach_configuration_in_all_interfaces(wifi_manager_h wifi,
wifi_manager_config_list_cb callback, void *user_data)
{
__NETWORK_CAPI_FUNC_EXIT__;
return ret;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_config_get_name(wifi_manager_config_h config, char **name)
{
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_config_get_frequency(wifi_manager_config_h config,
int *frequency)
{
__NETWORK_CAPI_FUNC_EXIT__;
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_config_get_eap_anonymous_identity(wifi_manager_config_h config,
char **anonymous_identity)
/**
* Wifi DPP CAPI
*/
+
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_dpp_create(wifi_manager_h wifi,
bool is_initiator, wifi_manager_dpp_h *handle)
{
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
}
+//LCOV_EXCL_STOP
}
}
-//LCOV_EXCL_STOP
-
void __clear_interface_list(GSList **iterator)
{
if (*iterator) {
*iterator = NULL;
}
}
+//LCOV_EXCL_STOP
void __clear_profile_list(GSList **iterator)
{
if (vsie)
memcpy(vsie, str, str[1]+2);
else
- WIFI_LOG(WIFI_ERROR, "Failed to allocate memory.");
+ WIFI_LOG(WIFI_ERROR, "Failed to allocate memory."); //LCOV_EXCL_LINE
return vsie;
}
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
static int __update_interface_iterator(wifi_manager_handle_s *wifi_handle)
{
int rv;
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_STOP
static void __update_specific_iterator(wifi_manager_handle_s *wifi_handle, GSList *bss_list)
{
}
}
+//LCOV_EXCL_START
static void __module_state_changed_cb(wifi_manager_handle_s *wifi_handle,
net_module_info_s *module_info)
{
g_p_dpp_current = NULL;
}
+//LCOV_EXCL_STOP
static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
{
case NET_EVENT_WIFI_RSSI_LEVEL_CHANGED:
__rssi_level_changed_cb(wifi_handle, (net_rssi_info_s *)event_cb->Data);
break;
+ //LCOV_EXCL_START
case NET_EVENT_WIFI_MODULE_STATE_CHANGED:
__module_state_changed_cb(wifi_handle, (net_module_info_s *)event_cb->Data);
break;
case NET_EVENT_WIFI_DPP_REMOVED:
__dpp_removed_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
break;
+ //LCOV_EXCL_STOP
default:
break;
}
}
}
+//LCOV_EXCL_START
static void __free_dpp(gpointer data)
{
wifi_dpp_s *p_dpp = (wifi_dpp_s *)data;
g_free(p_dpp->ssid);
g_free(p_dpp);
}
+//LCOV_EXCL_STOP
void _wifi_deinit(wifi_manager_h wifi)
{
int flight_mode = -1;
if (vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &flight_mode) != 0) {
- WIFI_LOG(WIFI_ERROR, "Failed to get vconf key of flight mode");
- return WIFI_MANAGER_ERROR_OPERATION_FAILED;
+ WIFI_LOG(WIFI_ERROR, "Failed to get vconf key of flight mode"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
}
rv = _wifi_get_wifi_device_state(wifi, &device_state);
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
int _wifi_foreach_available_interface(wifi_manager_h wifi,
wifi_manager_interface_cb callback, void *user_data)
{
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_STOP
int _wifi_foreach_found_ap(wifi_manager_h wifi,
wifi_manager_found_ap_cb callback, void *user_data)
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
int _wifi_foreach_found_ap_in_all_interfaces(wifi_manager_h wifi,
wifi_manager_found_ap_cb callback, void *user_data)
{
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_STOP
int _wifi_foreach_found_specific_ap(wifi_manager_h wifi,
wifi_manager_found_ap_cb callback, void *user_data)
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
tizen_profile_t _get_tizen_profile()
{
static tizen_profile_t profile = TIZEN_PROFILE_UNKNOWN;
return profile;
}
-//LCOV_EXCL_START
int _wifi_set_autoscan(wifi_manager_h wifi, bool autoscan)
{
int rv = 0;
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
bool _wifi_check_dpp_validity(wifi_manager_dpp_h dpp_h)
{
GSList *list = NULL;
return __convert_net_err_to_wifi_dpp_error(rv);
}
+//LCOV_EXCL_STOP
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_initialize_with_interface_name(wifi_manager_h *wifi,
const char *ifname)
{
__NETWORK_CAPI_FUNC_EXIT__;
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_deinitialize(wifi_manager_h wifi)
{
return rv;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_foreach_available_interface(wifi_manager_h wifi,
wifi_manager_interface_cb callback, void *user_data)
{
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_foreach_found_ap(wifi_manager_h wifi,
wifi_manager_found_ap_cb callback, void *user_data)
return rv;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_foreach_found_ap_in_all_interfaces(wifi_manager_h wifi,
wifi_manager_found_ap_cb callback, void *user_data)
{
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_foreach_found_specific_ap(wifi_manager_h wifi,
wifi_manager_found_ap_cb callback, void* user_data)
return rv;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_foreach_found_netlink_scan_ap(wifi_manager_h wifi,
wifi_manager_found_ap_cb callback, void *user_data)
{
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_connect(wifi_manager_h wifi,
wifi_manager_ap_h ap, wifi_manager_connected_cb callback, void *user_data)
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_connect_by_wps_pbc_without_ssid(wifi_manager_h wifi,
wifi_manager_connected_cb callback, void* user_data)
{
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_get_wps_generated_pin(wifi_manager_h wifi, char **wps_pin)
{
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
}
-//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_set_module_state_changed_cb(wifi_manager_h wifi,
wifi_manager_module_state_changed_cb callback, void* user_data)
return rv;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_bssid_scan(wifi_manager_h wifi,
wifi_manager_bssid_scan_finished_cb callback, void *user_data)
RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
if (callback == NULL) {
- WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
__NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
- return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_get_connection_mode(wifi_manager_h wifi,
wifi_manager_connection_mode_e *mode)
{
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
}
+//LCOV_EXCL_STOP