diff options
author | Alberto Mardegan <mardy@users.sourceforge.net> | 2008-05-20 07:36:18 +0000 |
---|---|---|
committer | Alberto Mardegan <mardy@users.sourceforge.net> | 2008-05-20 07:36:18 +0000 |
commit | 3b20db3c40d62b06c35cc575306afbd1d4a1d881 (patch) | |
tree | 92248ef5b50073cad9efc6008b6bb99ada96f392 /src/mcd-dbusprop.c | |
parent | 73b369ec615d1eef861d07f3ac764c15e6bb4641 (diff) | |
download | telepathy-mission-control-3b20db3c40d62b06c35cc575306afbd1d4a1d881.tar.gz |
Automatically compute the value of the ``Interfaces'' DBus property.
git-svn-id: https://mission-control.svn.sourceforge.net/svnroot/mission-control/trunk@402 d91c8aed-3f2b-0410-a83d-924a1c20a0ba
Diffstat (limited to 'src/mcd-dbusprop.c')
-rw-r--r-- | src/mcd-dbusprop.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mcd-dbusprop.c b/src/mcd-dbusprop.c index e8fe3792..7808554c 100644 --- a/src/mcd-dbusprop.c +++ b/src/mcd-dbusprop.c @@ -243,3 +243,31 @@ mcd_dbus_init_interfaces_instances (gpointer self) } } +void +mcd_dbus_get_interfaces (TpSvcDBusProperties *self, const gchar *name, + GValue *value) +{ + McdInterfaceData *iface_data, *id; + gint i; + gchar **names; + + g_debug ("%s called", G_STRFUNC); + iface_data = g_type_get_qdata (G_OBJECT_TYPE (self), MCD_INTERFACES_QUARK); + + /* count the interfaces */ + i = 0; + for (id = iface_data; id->get_type; id++) + i++; + + names = g_new (gchar *, i + 1); + i = 0; + for (id = iface_data; id->get_type; id++) + { + names[i] = g_strdup (id->interface); + i++; + } + names[i] = NULL; + g_value_init (value, G_TYPE_STRV); + g_value_take_boxed (value, names); +} + |