diff options
Diffstat (limited to 'binding-wifi/wifi-connman.c')
-rw-r--r-- | binding-wifi/wifi-connman.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/binding-wifi/wifi-connman.c b/binding-wifi/wifi-connman.c index 924898e..a7673b4 100644 --- a/binding-wifi/wifi-connman.c +++ b/binding-wifi/wifi-connman.c @@ -106,7 +106,7 @@ int wifi_state(struct wifiStatus *status) { connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); if (connection == NULL) { - ERROR(afbitf,"Cannot connect to D-Bus, %s", error->message); + AFB_ERROR("Cannot connect to D-Bus, %s", error->message); return -1; } message = g_dbus_connection_call_sync(connection, CONNMAN_SERVICE, @@ -114,7 +114,7 @@ int wifi_state(struct wifiStatus *status) { NULL, NULL, G_DBUS_CALL_FLAGS_NONE, DBUS_REPLY_TIMEOUT, NULL, &error); if (message == NULL) { - ERROR(afbitf,"Error %s while calling GetProperties method", error->message); + AFB_ERROR("Error %s while calling GetProperties method", error->message); return -1; } g_variant_get(message, "(a{sv})", &array); @@ -148,7 +148,7 @@ GError* do_wifiActivate() { connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); if (connection == NULL) { - ERROR(afbitf,"Cannot connect to D-Bus, %s", error->message); + AFB_ERROR("Cannot connect to D-Bus, %s", error->message); return error; } @@ -164,13 +164,13 @@ GError* do_wifiActivate() { params, NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error); if (error) { - ERROR(afbitf,"Error %s while calling SetProperty method", error->message); + AFB_ERROR("Error %s while calling SetProperty method", error->message); return error; } else { - NOTICE(afbitf,"Power ON succeeded\n"); + AFB_NOTICE("Power ON succeeded\n"); return NULL; } @@ -185,7 +185,7 @@ GError* do_wifiDeactivate() { /*connection = gdbus_conn->connection;*/ connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); if (connection == NULL) { - ERROR(afbitf,"Cannot connect to D-Bus, %s", error->message); + AFB_ERROR("Cannot connect to D-Bus, %s", error->message); return error; } @@ -193,7 +193,7 @@ GError* do_wifiDeactivate() { error = stop_agent(connection); if (error) { - WARNING(afbitf, "Error while unregistering the agent, ignoring."); + AFB_WARNING( "Error while unregistering the agent, ignoring."); } @@ -202,13 +202,13 @@ GError* do_wifiDeactivate() { params, NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error); if (error) { - ERROR(afbitf,"Error %s while calling SetProperty method", error->message); + AFB_ERROR("Error %s while calling SetProperty method", error->message); return error; } else { - NOTICE(afbitf, "Power OFF succeeded\n"); + AFB_NOTICE( "Power OFF succeeded\n"); return NULL; } } @@ -220,7 +220,7 @@ GError* do_wifiScan() { /*connection = gdbus_conn->connection;*/ connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); if (connection == NULL) { - ERROR(afbitf,"Cannot connect to D-Bus, %s", error->message); + AFB_ERROR("Cannot connect to D-Bus, %s", error->message); return error; } @@ -228,13 +228,13 @@ GError* do_wifiScan() { CONNMAN_WIFI_TECHNOLOGY_PREFIX, CONNMAN_TECHNOLOGY_INTERFACE, "Scan", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, DBUS_REPLY_TIMEOUT, NULL, NULL, &error); if (error) { - ERROR(afbitf,"Error %s while calling Scan method", error->message); + AFB_ERROR("Error %s while calling Scan method", error->message); return error; } else { - INFO(afbitf, "Scan succeeded\n"); + AFB_INFO( "Scan succeeded\n"); return NULL; } } @@ -251,7 +251,7 @@ GError* do_displayScan(GSList **wifi_list) { /*connection = gdbus_conn->connection;*/ connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); if (connection == NULL) { - ERROR(afbitf,"Cannot connect to D-Bus, %s", error->message); + AFB_ERROR("Cannot connect to D-Bus, %s", error->message); return error; } message = g_dbus_connection_call_sync(connection, CONNMAN_SERVICE, @@ -259,7 +259,7 @@ GError* do_displayScan(GSList **wifi_list) { G_DBUS_CALL_FLAGS_NONE, DBUS_REPLY_TIMEOUT, NULL, &error); if (message == NULL) { - ERROR(afbitf,"Error %s while calling GetServices method", error->message); + AFB_ERROR("Error %s while calling GetServices method", error->message); return error; } g_variant_get(message, "(a(oa{sv}))", &array); @@ -271,12 +271,12 @@ GError* do_displayScan(GSList **wifi_list) { extract_values(content, wifiProfile); wifiProfile->NetworkPath = g_try_malloc0(strlen(object)); strcpy(wifiProfile->NetworkPath, object); - DEBUG(afbitf, + AFB_DEBUG( "SSID= %s, security= %s, path= %s, Strength= %d, wps support= %d\n", wifiProfile->ESSID, wifiProfile->Security.sec_type, wifiProfile->NetworkPath, wifiProfile->Strength, wifiProfile->Security.wps_support); - DEBUG(afbitf, "method= %s, ip address= %s, netmask= %s\n", + AFB_DEBUG( "method= %s, ip address= %s, netmask= %s\n", wifiProfile->wifiNetwork.method, wifiProfile->wifiNetwork.IPaddress, wifiProfile->wifiNetwork.netmask); @@ -291,7 +291,7 @@ GError* do_displayScan(GSList **wifi_list) { GError* do_connectNetwork(gchar *networkPath) { - NOTICE(afbitf, "Connecting to: %s\n", networkPath); + AFB_NOTICE( "Connecting to: %s\n", networkPath); GVariant *message = NULL; GError *error = NULL; @@ -307,10 +307,10 @@ GError* do_connectNetwork(gchar *networkPath) { //TODO: do we need retunrn value in message if (error) { - ERROR(afbitf,"Error %s while calling Connect method", error->message); + AFB_ERROR("Error %s while calling Connect method", error->message); return error; } else { - INFO(afbitf,"Connection succeeded\n"); + AFB_INFO("Connection succeeded\n"); return NULL; } @@ -318,7 +318,7 @@ GError* do_connectNetwork(gchar *networkPath) { GError* do_disconnectNetwork(gchar *networkPath) { - NOTICE(afbitf, "Connecting to: %s\n", networkPath); + AFB_NOTICE( "Connecting to: %s\n", networkPath); GVariant *message = NULL; GError *error = NULL; @@ -327,7 +327,7 @@ GError* do_disconnectNetwork(gchar *networkPath) { connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); if (connection == NULL) { - ERROR(afbitf,"Cannot connect to D-Bus, %s", error->message); + AFB_ERROR("Cannot connect to D-Bus, %s", error->message); return error; } @@ -339,10 +339,10 @@ GError* do_disconnectNetwork(gchar *networkPath) { //TODO: do we need return value in message if (error) { - ERROR(afbitf,"Error %s while calling Disconnect method", error->message); + AFB_ERROR("Error %s while calling Disconnect method", error->message); return error; } else { - INFO(afbitf,"Disconnection succeeded\n"); + AFB_INFO("Disconnection succeeded\n"); return NULL; } @@ -350,7 +350,7 @@ GError* do_disconnectNetwork(gchar *networkPath) { void registerPasskey(gchar *passkey) { - INFO(afbitf,"Passkey: %s\n", passkey); + AFB_INFO("Passkey: %s\n", passkey); sendPasskey(passkey); @@ -373,7 +373,7 @@ GError* setHMIStatus(enum wifiStates state) { connection = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error); if (connection == NULL) { - ERROR(afbitf,"Cannot connect to D-Bus, %s", error->message); + AFB_ERROR("Cannot connect to D-Bus, %s", error->message); return error; } @@ -385,7 +385,7 @@ GError* setHMIStatus(enum wifiStates state) { DBUS_REPLY_TIMEOUT, NULL, &error); if (error) { - ERROR(afbitf,"Error %s while setting up the status icon", error->message); + AFB_ERROR("Error %s while setting up the status icon", error->message); return error; } else { |