diff options
author | Sjoerd Simons <sjoerd@luon.net> | 2008-07-28 16:38:09 +0000 |
---|---|---|
committer | Sjoerd Simons <sjoerd@luon.net> | 2008-07-28 16:38:09 +0000 |
commit | 9f74163244f7990b2d38384885980747c674980d (patch) | |
tree | ac13233e52d1361029ba6bd2b39fa265f1fb0c8a | |
parent | 1456bdaaf465d8e596439312add08be39d6c30b1 (diff) | |
download | telepathy-glib-9f74163244f7990b2d38384885980747c674980d.tar.gz |
Add a register function instead that registers the right interface name and utility function
20080728163809-93b9a-f138dd7c9034a7cdc29417ee01ad59aa89471921.gz
-rw-r--r-- | telepathy-glib/presence-mixin.c | 20 | ||||
-rw-r--r-- | telepathy-glib/presence-mixin.h | 4 |
2 files changed, 21 insertions, 3 deletions
diff --git a/telepathy-glib/presence-mixin.c b/telepathy-glib/presence-mixin.c index 324786d59..4a1a74057 100644 --- a/telepathy-glib/presence-mixin.c +++ b/telepathy-glib/presence-mixin.c @@ -1353,7 +1353,7 @@ simple_presence_get_attributes_foreach (gpointer key, val); } -void +static void tp_presence_mixin_simple_presence_get_attributes (GObject *obj, const GArray *contacts, GHashTable *attributes_hash) { @@ -1373,3 +1373,21 @@ tp_presence_mixin_simple_presence_get_attributes (GObject *obj, g_hash_table_destroy (contact_statuses); } + +/** + * tp_presence_mixin_simple_presence_register_with_contacts_iface: + * @obj: An instance that of the implementation that uses both the Contacts + * mixin and this mixin + * + * Register the SimplePresence interface with the Contacts interface to make it + * inspectable. The Contacts mixin should be initialized before this function + * is called + */ +void +tp_presence_mixin_simple_presence_register_with_contacts_iface (GObject *obj) +{ + tp_contacts_mixin_add_inspectable_iface (obj, + TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE, + tp_presence_mixin_simple_presence_get_attributes); +} + diff --git a/telepathy-glib/presence-mixin.h b/telepathy-glib/presence-mixin.h index 3a24304ef..caa729456 100644 --- a/telepathy-glib/presence-mixin.h +++ b/telepathy-glib/presence-mixin.h @@ -259,8 +259,8 @@ void tp_presence_mixin_iface_init (gpointer g_iface, gpointer iface_data); void tp_presence_mixin_simple_presence_iface_init (gpointer g_iface, gpointer iface_data); void tp_presence_mixin_simple_presence_init_dbus_properties (GObjectClass *cls); -void tp_presence_mixin_simple_presence_get_attributes (GObject *obj, - const GArray *contacts, GHashTable *attributes_hash); +void tp_presence_mixin_simple_presence_register_with_contacts_iface ( + GObject *obj); G_END_DECLS |