[telepathy-glib/master] Add "alias-flags" property and tp_connection_get_alias_flags method on TpConnection

Xavier Claessens xclaesse at gmail.com
Fri May 29 06:33:09 PDT 2009


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

diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index d7eb70d..ae86f87 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -2401,6 +2401,7 @@ tp_connection_run_until_ready
 TpConnectionWhenReadyCb
 tp_connection_call_when_ready
 tp_connection_is_ready
+tp_connection_get_alias_flags
 tp_connection_get_status
 tp_connection_get_self_handle
 TpConnectionRequestHandlesCb
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index a299937..edec245 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -119,7 +119,8 @@ tp_errors_disconnected_quark (void)
 
 enum
 {
-  PROP_STATUS = 1,
+  PROP_ALIAS_FLAGS = 1,
+  PROP_STATUS,
   PROP_STATUS_REASON,
   PROP_CONNECTION_READY,
   PROP_SELF_HANDLE,
@@ -140,6 +141,9 @@ tp_connection_get_property (GObject *object,
 
   switch (property_id)
     {
+    case PROP_ALIAS_FLAGS:
+      g_value_set_uint (value, self->priv->alias_flags);
+      break;
     case PROP_CONNECTION_READY:
       g_value_set_boolean (value, self->priv->ready);
       break;
@@ -736,6 +740,17 @@ tp_connection_class_init (TpConnectionClass *klass)
       TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
 
   /**
+   * TpConnection:alias-flags:
+   *
+   * This connection's alias flags, or 0 if we don't know yet.
+   */
+  param_spec = g_param_spec_uint ("alias-flags", "Alias flags",
+      "The alias flags of this connection", 0, G_MAXUINT32, 0,
+      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+  g_object_class_install_property (object_class, PROP_ALIAS_FLAGS,
+      param_spec);
+
+  /**
    * TpConnection:status:
    *
    * This connection's status, or TP_UNKNOWN_CONNECTION_STATUS if we don't
@@ -902,6 +917,21 @@ tp_connection_get_self_handle (TpConnection *self)
 }
 
 /**
+ * tp_connection_get_alias_flags:
+ * @self: a connection
+ *
+ * Returns: This connection's alias flags, or 0 if we don't know yet.
+ *
+ * Since: 0.7.UNRELEASED
+ */
+TpConnectionAliasFlags
+tp_connection_get_alias_flags (TpConnection *self)
+{
+  g_return_val_if_fail (TP_IS_CONNECTION (self), 0);
+  return self->priv->alias_flags;
+}
+
+/**
  * tp_connection_get_status:
  * @self: a connection
  * @reason: a TpConnectionStatusReason, or %NULL
diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h
index 8b081ec..15ae35c 100644
--- a/telepathy-glib/connection.h
+++ b/telepathy-glib/connection.h
@@ -73,6 +73,8 @@ GQuark tp_errors_disconnected_quark (void);
 TpConnection *tp_connection_new (TpDBusDaemon *dbus, const gchar *bus_name,
     const gchar *object_path, GError **error);
 
+TpConnectionAliasFlags tp_connection_get_alias_flags (TpConnection *self);
+
 TpConnectionStatus tp_connection_get_status (TpConnection *self,
     TpConnectionStatusReason *reason);
 
-- 
1.5.6.5



More information about the telepathy-commits mailing list