summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-19 19:52:49 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2009-07-19 19:52:49 (GMT)
commit5795a5c20529565bb6ac044b4cdd573c11a4e55d (patch)
tree90771c53331fb09263a201ff0b3e0c29fe2e0545
parentd071758739ad4961b30259772f4cc1066cea369e (diff)
downloadconnman-5795a5c20529565bb6ac044b4cdd573c11a4e55d.zip
connman-5795a5c20529565bb6ac044b4cdd573c11a4e55d.tar.gz
connman-5795a5c20529565bb6ac044b4cdd573c11a4e55d.tar.bz2
Add missing signal for offline mode changes
-rw-r--r--src/notifier.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/notifier.c b/src/notifier.c
index 3ae9a0c..4f44ea4 100644
--- a/src/notifier.c
+++ b/src/notifier.c
@@ -363,6 +363,31 @@ void __connman_notifier_disconnect(enum connman_service_type type)
technology_connected(type, FALSE);
}
+static void offline_mode_changed(dbus_bool_t enabled)
+{
+ DBusMessage *signal;
+ DBusMessageIter entry, value;
+ const char *key = "OfflineMode";
+
+ DBG("enabled %d", enabled);
+
+ signal = dbus_message_new_signal(CONNMAN_MANAGER_PATH,
+ CONNMAN_MANAGER_INTERFACE, "PropertyChanged");
+ if (signal == NULL)
+ return;
+
+ dbus_message_iter_init_append(signal, &entry);
+
+ dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &key);
+
+ dbus_message_iter_open_container(&entry, DBUS_TYPE_VARIANT,
+ DBUS_TYPE_BOOLEAN_AS_STRING, &value);
+ dbus_message_iter_append_basic(&value, DBUS_TYPE_BOOLEAN, &enabled);
+ dbus_message_iter_close_container(&entry, &value);
+
+ g_dbus_send_message(connection, signal);
+}
+
void __connman_notifier_offline_mode(connman_bool_t enabled)
{
GSList *list;
@@ -371,6 +396,8 @@ void __connman_notifier_offline_mode(connman_bool_t enabled)
__connman_profile_changed(FALSE);
+ offline_mode_changed(enabled);
+
for (list = notifier_list; list; list = list->next) {
struct connman_notifier *notifier = list->data;