From: Maneesh Jain Date: Tue, 28 Feb 2017 10:36:09 +0000 (+0530) Subject: [net-config]: Add support of new methods related to autoscan X-Git-Tag: accepted/tizen/common/20170309.175440^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec4294f65b6518bfe9c9f1196d63513863489bd6;hp=245092afa950a9092287b57ce80c7b24126f5c93;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git [net-config]: Add support of new methods related to autoscan 1/. GetAutoscanmode Method 2/. GetAutoscan Method Change-Id: Id66f5882484057f7e11ff2184239787522a7c073 Signed-off-by: Maneesh Jain --- diff --git a/include/plugin.h b/include/plugin.h index 1c24fe9..5b72d99 100755 --- a/include/plugin.h +++ b/include/plugin.h @@ -32,12 +32,12 @@ extern "C" { #define NETCONFIG_DEL_PORTAL_NOTI "del_portal_noti" struct netconfig_headed_plugin_t { - void (*pop_device_picker) (void); - gboolean (*send_notification_to_net_popup) (const char *, const char *); - int (*send_message_to_net_popup) (const char *, const char *, const char *, const char *); - int (*send_restriction_to_net_popup) (const char *, const char *, const char *); - void (*set_system_event) (int, int, int); - void (*pop_wifi_connected_poppup) (const char *); + void(*pop_device_picker) (void); + gboolean(*send_notification_to_net_popup) (const char *, const char *); + int(*send_message_to_net_popup) (const char *, const char *, const char *, const char *); + int(*send_restriction_to_net_popup) (const char *, const char *, const char *); + void(*set_system_event) (int, int, int); + void(*pop_wifi_connected_poppup) (const char *); }; typedef enum { diff --git a/include/wifi-background-scan.h b/include/wifi-background-scan.h index 2cd3493..486fc1c 100755 --- a/include/wifi-background-scan.h +++ b/include/wifi-background-scan.h @@ -38,6 +38,10 @@ void netconfig_wifi_set_bgscan_pause(gboolean pause); gboolean handle_set_bgscan(Wifi *wifi, GDBusMethodInvocation *context, guint scan_mode); gboolean handle_resume_bgscan(Wifi *wifi, GDBusMethodInvocation *context); gboolean handle_pause_bgscan(Wifi *wifi, GDBusMethodInvocation *context); +gboolean handle_get_autoscan(Wifi *wifi, GDBusMethodInvocation *context); +gboolean handle_get_autoscanmode(Wifi *wifi, GDBusMethodInvocation *context); + + #ifdef __cplusplus diff --git a/interfaces/netconfig-iface-wifi.xml b/interfaces/netconfig-iface-wifi.xml index e9c6aa6..98c4912 100755 --- a/interfaces/netconfig-iface-wifi.xml +++ b/interfaces/netconfig-iface-wifi.xml @@ -22,6 +22,12 @@ + + + + + + diff --git a/packaging/net-config.spec b/packaging/net-config.spec index cdd14cc..c5ca245 100755 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -1,6 +1,6 @@ Name: net-config Summary: TIZEN Network Configuration service -Version: 1.1.100 +Version: 1.1.101 Release: 2 Group: System/Network License: Apache-2.0 diff --git a/src/wifi-background-scan.c b/src/wifi-background-scan.c index 8172fdf..ab18e14 100755 --- a/src/wifi-background-scan.c +++ b/src/wifi-background-scan.c @@ -340,3 +340,24 @@ gboolean handle_pause_bgscan(Wifi *wifi, GDBusMethodInvocation *context) return TRUE; } +gboolean handle_get_autoscan(Wifi *wifi, GDBusMethodInvocation *context) +{ + + gboolean autoscan = 0; + + autoscan = netconfig_wifi_is_bgscan_paused(); + + wifi_complete_get_autoscan(wifi, context, autoscan); + return TRUE; +} + +gboolean handle_get_autoscanmode(Wifi *wifi, GDBusMethodInvocation *context) +{ + guint autoscanmode = 0; + + autoscanmode = __netconfig_wifi_bgscan_get_mode(); + + wifi_complete_get_autoscanmode(wifi, context, autoscanmode); + return TRUE; +} + diff --git a/src/wifi.c b/src/wifi.c index 255b0e9..0d10580 100755 --- a/src/wifi.c +++ b/src/wifi.c @@ -201,6 +201,12 @@ void wifi_object_create_and_init(void) g_signal_connect(wifi_object, "handle-pause-bgscan", G_CALLBACK(handle_pause_bgscan), NULL); + /*Auto Scan Mode */ + g_signal_connect(wifi_object, "handle-get-autoscan", + G_CALLBACK(handle_get_autoscan), NULL); + g_signal_connect(wifi_object, "handle-get-autoscanmode", + G_CALLBACK(handle_get_autoscanmode), NULL); + /* Passpoint */ g_signal_connect(wifi_object, "handle-set-passpoint", G_CALLBACK(handle_set_passpoint), NULL);