[telepathy-gabble/master] add gabble_search_channel_is_ready()

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Aug 24 09:02:29 PDT 2009


---
 src/search-channel.c |   11 +++++++++++
 src/search-channel.h |    2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/search-channel.c b/src/search-channel.c
index 9a6c25a..0096fb5 100644
--- a/src/search-channel.c
+++ b/src/search-channel.c
@@ -84,6 +84,10 @@ struct _GabbleSearchChannelPrivate
 
   GHashTable *results;
 
+  /* TRUE if the channel is ready to be used (we received the keys supported
+   * by the server). */
+  gboolean ready;
+
   TpHandleSet *result_handles;
 };
 
@@ -208,6 +212,7 @@ supported_fields_discovered (GabbleSearchChannel *chan)
 
   chan->base.closed = FALSE;
   gabble_base_channel_register ((GabbleBaseChannel *) chan);
+  chan->priv->ready = TRUE;
   g_signal_emit (chan, signals[READY_OR_NOT], 0, 0, 0, NULL);
 }
 
@@ -1386,6 +1391,12 @@ gabble_search_channel_close (GabbleSearchChannel *self)
   ensure_closed (self);
 }
 
+gboolean
+gabble_search_channel_is_ready (GabbleSearchChannel *self)
+{
+  return self->priv->ready;
+}
+
 static void
 contact_search_iface_init (gpointer g_iface,
                            gpointer iface_data)
diff --git a/src/search-channel.h b/src/search-channel.h
index 562a6e6..675872b 100644
--- a/src/search-channel.h
+++ b/src/search-channel.h
@@ -60,6 +60,8 @@ GType gabble_search_channel_get_type (void);
 
 void gabble_search_channel_close (GabbleSearchChannel *chan);
 
+gboolean gabble_search_channel_is_ready (GabbleSearchChannel *chan);
+
 G_END_DECLS
 
 #endif /* #ifndef __GABBLE_SEARCH_CHANNEL_H__*/
-- 
1.5.6.5




More information about the telepathy-commits mailing list