summaryrefslogtreecommitdiff
path: root/src/dbus.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-19 15:01:32 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-19 15:01:32 -0800
commit328d81c6cea8523694ca008e9f08008326f46439 (patch)
tree3fa930e1bc54c53549c24ad9d5b605d1c961ebb7 /src/dbus.c
parent9906db093ef4156a97bbb0d82e2666b34563af29 (diff)
downloadconnman-328d81c6cea8523694ca008e9f08008326f46439.tar.gz
connman-328d81c6cea8523694ca008e9f08008326f46439.tar.bz2
connman-328d81c6cea8523694ca008e9f08008326f46439.zip
Add D-Bus helper for array property changed signals
Diffstat (limited to 'src/dbus.c')
-rw-r--r--src/dbus.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/dbus.c b/src/dbus.c
index 2253eafb..884d78a5 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -247,6 +247,29 @@ dbus_bool_t connman_dbus_property_changed_dict(const char *path,
return TRUE;
}
+dbus_bool_t connman_dbus_property_changed_array(const char *path,
+ const char *interface, const char *key, int type,
+ connman_dbus_append_cb_t function, void *user_data)
+{
+ DBusMessage *signal;
+ DBusMessageIter iter;
+
+ if (path == NULL)
+ return FALSE;
+
+ signal = dbus_message_new_signal(path, interface, "PropertyChanged");
+ if (signal == NULL)
+ return FALSE;
+
+ dbus_message_iter_init_append(signal, &iter);
+ connman_dbus_property_append_variable_array(&iter, key, type,
+ function, user_data);
+
+ g_dbus_send_message(connection, signal);
+
+ return TRUE;
+}
+
DBusConnection *connman_dbus_get_connection(void)
{
if (connection == NULL)