summaryrefslogtreecommitdiff
path: root/src/technology.c
diff options
context:
space:
mode:
authortaesub kim <taesub.kim@samsung.com>2017-04-13 05:55:05 (GMT)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2017-04-13 05:55:05 (GMT)
commit579870eedeea447b9b61fa6291896a53ec043e81 (patch)
tree8782bc4ff5764fa43dc14957bcab30a663b3cd23 /src/technology.c
parente364c80f2171034e785c3f776d74feb2b06a2802 (diff)
parentf5c4f7207f8c80e681040ccbf6db3a01d6610dad (diff)
downloadconnman-579870eedeea447b9b61fa6291896a53ec043e81.zip
connman-579870eedeea447b9b61fa6291896a53ec043e81.tar.gz
connman-579870eedeea447b9b61fa6291896a53ec043e81.tar.bz2
Merge "[connman] Send ScanChanged signal." into tizensubmit/tizen/20170414.032608accepted/tizen/unified/20170417.082500
Diffstat (limited to 'src/technology.c')
-rwxr-xr-xsrc/technology.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/technology.c b/src/technology.c
index a73a6d1..158a9de 100755
--- a/src/technology.c
+++ b/src/technology.c
@@ -1031,19 +1031,37 @@ static void reply_scan_pending(struct connman_technology *technology, int err)
}
}
-void __connman_technology_scan_started(struct connman_device *device)
-{
- DBG("device %p", device);
#if defined TIZEN_EXT
+dbus_bool_t __connman_technology_notify_scan_changed(const char *key, void *val)
+{
+ DBG("key %s", key);
DBusMessage *signal;
+ DBusMessageIter iter;
+ dbus_bool_t result = FALSE;
signal = dbus_message_new_signal(CONNMAN_MANAGER_PATH,
- CONNMAN_MANAGER_INTERFACE, "ScanStarted");
+ CONNMAN_MANAGER_INTERFACE, "ScanChanged");
if (!signal)
- return;
+ return result;
- dbus_connection_send(connection, signal, NULL);
+ dbus_message_iter_init_append(signal, &iter);
+ connman_dbus_property_append_basic(&iter, key, DBUS_TYPE_BOOLEAN, val);
+
+ result = dbus_connection_send(connection, signal, NULL);
dbus_message_unref(signal);
+
+ DBG("Successfuly sent signal");
+
+ return result;
+}
+#endif
+
+void __connman_technology_scan_started(struct connman_device *device)
+{
+ DBG("device %p", device);
+#if defined TIZEN_EXT
+ dbus_bool_t status = 1;
+ __connman_technology_notify_scan_changed("scan_started", &status);
#endif
}
@@ -1077,6 +1095,8 @@ void __connman_technology_scan_stopped(struct connman_device *device,
#if defined TIZEN_EXT
if (count == 0) {
DBusMessage *signal;
+ dbus_bool_t status = 0;
+ __connman_technology_notify_scan_changed("scan_done", &status);
signal = dbus_message_new_signal(CONNMAN_MANAGER_PATH,
CONNMAN_MANAGER_INTERFACE, "ScanDone");