[net-config]: Add support of new methods related to autoscan 75/116875/1
authorManeesh Jain <maneesh.jain@samsung.com>
Tue, 28 Feb 2017 10:36:09 +0000 (16:06 +0530)
committerManeesh Jain <maneesh.jain@samsung.com>
Wed, 1 Mar 2017 12:00:43 +0000 (17:30 +0530)
1/. GetAutoscanmode Method
2/. GetAutoscan  Method

Change-Id: Id66f5882484057f7e11ff2184239787522a7c073
Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
include/plugin.h
include/wifi-background-scan.h
interfaces/netconfig-iface-wifi.xml
packaging/net-config.spec
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 e9c6aa6..98c4912 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 cdd14cc..c5ca245 100755 (executable)
@@ -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
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 255b0e9..0d10580 100755 (executable)
@@ -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);