[Telepathy-commits] [telepathy-gabble/master] gabble_tube_dbus_add_name: fire DBusNamesChanged (new API)
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Tue Feb 3 09:28:35 PST 2009
---
src/tube-dbus.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index c1cc039..f982f5a 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -1579,6 +1579,8 @@ gabble_tube_dbus_add_name (GabbleTubeDBus *self,
TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
(TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT);
gchar *name_copy;
+ GHashTable *added;
+ GArray *removed;
g_assert (priv->handle_type == TP_HANDLE_TYPE_ROOM);
g_assert (g_hash_table_size (priv->dbus_names) ==
@@ -1625,7 +1627,18 @@ gabble_tube_dbus_add_name (GabbleTubeDBus *self,
g_hash_table_insert (priv->dbus_name_to_handle, name_copy,
GUINT_TO_POINTER (handle));
- /* TODO: gabble_svc_channel_type_dbus_tube_emit_d_bus_names_changed */
+ /* Fire DBusNamesChanged (new API) */
+ added = g_hash_table_new (g_direct_hash, g_direct_equal);
+ removed = g_array_new (FALSE, FALSE, sizeof (TpHandle));
+
+ g_hash_table_insert (added, GUINT_TO_POINTER (handle), (gchar *) name);
+
+ gabble_svc_channel_type_dbus_tube_emit_d_bus_names_changed (self, added,
+ removed);
+
+ g_hash_table_destroy (added);
+ g_array_free (removed, TRUE);
+
return TRUE;
}
--
1.5.6.5
More information about the telepathy-commits
mailing list