[next] telepathy-salut: Aliasing: Implement AliasFlags property

Simon McVittie smcv at kemper.freedesktop.org
Thu Feb 6 11:27:49 PST 2014


Module: telepathy-salut
Branch: next
Commit: c3257699cad5a1dfa30062e00cf884ccca46b233
URL:    http://cgit.freedesktop.org/telepathy/telepathy-salut/commit/?id=c3257699cad5a1dfa30062e00cf884ccca46b233

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Wed Sep 25 10:27:40 2013 -0400

Aliasing: Implement AliasFlags property

---

 src/connection.c               |   20 ++++++++++++++++++++
 tests/twisted/avahi/aliases.py |    3 +++
 2 files changed, 23 insertions(+)

diff --git a/src/connection.c b/src/connection.c
index 9916bd5..d49541b 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -304,6 +304,21 @@ static TpDBusPropertiesMixinPropImpl conn_avatars_properties[] = {
       { NULL }
 };
 
+static TpDBusPropertiesMixinPropImpl conn_aliasing_properties[] = {
+    { "AliasFlags", GUINT_TO_POINTER (0), NULL },
+    { NULL }
+};
+
+static void
+conn_aliasing_properties_getter (GObject *object,
+    GQuark interface,
+    GQuark name,
+    GValue *value,
+    gpointer getter_data)
+{
+  g_value_set_uint (value, GPOINTER_TO_UINT (getter_data));
+}
+
 static void
 salut_connection_init (SalutConnection *obj)
 {
@@ -763,6 +778,11 @@ salut_connection_class_init (SalutConnectionClass *salut_connection_class)
           NULL,
           conn_avatars_properties,
         },
+        { TP_IFACE_CONNECTION_INTERFACE_ALIASING,
+          conn_aliasing_properties_getter,
+          NULL,
+          conn_aliasing_properties,
+        },
         { NULL }
   };
 
diff --git a/tests/twisted/avahi/aliases.py b/tests/twisted/avahi/aliases.py
index af18ab3..799bd54 100644
--- a/tests/twisted/avahi/aliases.py
+++ b/tests/twisted/avahi/aliases.py
@@ -69,6 +69,9 @@ def test(q, bus, conn):
     q.expect('dbus-signal', signal='StatusChanged',
         args=[cs.CONN_STATUS_CONNECTED, cs.CSR_NONE_SPECIFIED])
 
+    flags = conn.Properties.Get(cs.CONN_IFACE_ALIASING, "AliasFlags")
+    assertEquals(flags, 0)
+
     assertContains(cs.CONN_IFACE_CONTACT_INFO,
         conn.Properties.Get(cs.CONN, "Interfaces"))
     ci_props = conn.Properties.GetAll(cs.CONN_IFACE_CONTACT_INFO)



More information about the telepathy-commits mailing list