[Telepathy-commits] [telepathy-glib/master] Add tp_connection_is_ready() with the obvious meaning

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Oct 3 08:36:40 PDT 2008


---
 docs/reference/telepathy-glib-sections.txt |    1 +
 telepathy-glib/connection.c                |   16 ++++++++++++++++
 telepathy-glib/connection.h                |    2 ++
 3 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index e04e79b..86a46b2 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -2051,6 +2051,7 @@ tp_connection_new
 tp_connection_run_until_ready
 TpConnectionWhenReadyCb
 tp_connection_call_when_ready
+tp_connection_is_ready
 tp_connection_get_status
 tp_connection_init_known_interfaces
 tp_connection_presence_type_cmp_availability
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index 5cf9685..d6c7360 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -1197,3 +1197,19 @@ _tp_connection_get_contact_attribute_interfaces (TpConnection *self)
 {
   return self->priv->contact_attribute_interfaces;
 }
+
+
+/**
+ * tp_connection_is_ready:
+ * @self: a connection
+ *
+ * Returns the same thing as the #TpConnection:connection-ready property.
+ *
+ * Returns: %TRUE if introspection has completed
+ * Since: 0.7.UNRELEASED
+ */
+gboolean
+tp_connection_is_ready (TpConnection *self)
+{
+  return self->priv->ready;
+}
diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h
index 23ec26c..8dc2bcf 100644
--- a/telepathy-glib/connection.h
+++ b/telepathy-glib/connection.h
@@ -75,6 +75,8 @@ TpConnection *tp_connection_new (TpDBusDaemon *dbus, const gchar *bus_name,
 TpConnectionStatus tp_connection_get_status (TpConnection *self,
     TpConnectionStatusReason *reason);
 
+gboolean tp_connection_is_ready (TpConnection *self);
+
 gboolean tp_connection_run_until_ready (TpConnection *self,
     gboolean connect, GError **error,
     GMainLoop **loop);
-- 
1.5.6.5




More information about the Telepathy-commits mailing list