[telepathy-gabble/master] Add a handle set to hold contacts from search results

Will Thompson will.thompson at collabora.co.uk
Wed Aug 26 09:21:49 PDT 2009


---
 src/search-channel.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/search-channel.c b/src/search-channel.c
index 0d45b13..41ac692 100644
--- a/src/search-channel.c
+++ b/src/search-channel.c
@@ -67,6 +67,8 @@ struct _GabbleSearchChannelPrivate
   GabbleChannelContactSearchState state;
   gchar **available_search_keys;
   gchar *server;
+
+  TpHandleSet *result_handles;
 };
 
 /* Human-readable values of GabbleChannelContactSearchState. */
@@ -422,6 +424,9 @@ gabble_search_channel_constructor (GType type,
       conn->object_path, escaped, obj);
   g_free (escaped);
 
+  chan->priv->result_handles = tp_handle_set_new (
+      tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_CONTACT));
+
   /* The channel only "opens" when it's found out that the server really does
    * speak XEP 0055 and knows which fields are supported.
    */
@@ -441,6 +446,8 @@ gabble_search_channel_finalize (GObject *obj)
 
   g_free (chan->priv->server);
 
+  tp_handle_set_destroy (chan->priv->result_handles);
+
   if (G_OBJECT_CLASS (gabble_search_channel_parent_class)->finalize)
     G_OBJECT_CLASS (gabble_search_channel_parent_class)->finalize (obj);
 }
-- 
1.5.6.5




More information about the telepathy-commits mailing list