Merge "[net-config]: Add support of new methods related to autoscan" into tizen accepted/tizen/common/20170309.175440 accepted/tizen/ivi/20170310.031657 accepted/tizen/mobile/20170310.031337 accepted/tizen/tv/20170310.031509 accepted/tizen/unified/20170310.075710 accepted/tizen/wearable/20170310.031553 submit/tizen/20170309.032538 submit/tizen_unified/20170310.011401
authortaesub kim <taesub.kim@samsung.com>
Wed, 8 Mar 2017 05:14:11 +0000 (21:14 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 8 Mar 2017 05:14:11 +0000 (21:14 -0800)
include/plugin.h
include/wifi-background-scan.h
interfaces/netconfig-iface-wifi.xml
src/wifi-background-scan.c
src/wifi.c

index 1c24fe9..5b72d99 100755 (executable)
@@ -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 {
index 2cd3493..486fc1c 100755 (executable)
@@ -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
index 6b99c31..b862adb 100755 (executable)
                </method>
                <method name="PauseBgscan">
                </method>
+               <method name="GetAutoscan">
+                       <arg type="b" name="autoscan" direction="out"/>
+               </method>
+               <method name="GetAutoscanmode">
+                       <arg type="u" name="autoscanmode" direction="out"/>
+               </method>
                <method name="RequestSpecificScan">
                        <arg type="s" name="SSID" direction="in"/>
                </method>
index 8172fdf..ab18e14 100755 (executable)
@@ -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;
+}
+
index b124c97..de24594 100755 (executable)
@@ -207,6 +207,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);