[Telepathy-commits] [telepathy-gabble/master] Add the property Service on stream tube channels, and add a unit test for it

Alban Crequy alban.crequy at collabora.co.uk
Mon Nov 3 11:20:56 PST 2008


---
 src/tube-stream.c                    |    9 +++++++++
 tests/twisted/tubes/test-si-tubes.py |    2 +-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/tube-stream.c b/src/tube-stream.c
index 17d2be3..cb52aeb 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -1189,6 +1189,10 @@ gabble_tube_stream_class_init (GabbleTubeStreamClass *gabble_tube_stream_class)
       { "InitiatorID", "initiator-id", NULL },
       { NULL }
   };
+  static TpDBusPropertiesMixinPropImpl stream_tube_props[] = {
+      { "Service", "service", NULL },
+      { NULL }
+  };
   static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
       { TP_IFACE_CHANNEL,
         tp_dbus_properties_mixin_getter_gobject_properties,
@@ -1200,6 +1204,11 @@ gabble_tube_stream_class_init (GabbleTubeStreamClass *gabble_tube_stream_class)
         NULL,
         future_props,
       },
+      { GABBLE_IFACE_CHANNEL_TYPE_STREAM_TUBE,
+        tp_dbus_properties_mixin_getter_gobject_properties,
+        NULL,
+        stream_tube_props,
+      },
       { NULL }
   };
   GObjectClass *object_class = G_OBJECT_CLASS (gabble_tube_stream_class);
diff --git a/tests/twisted/tubes/test-si-tubes.py b/tests/twisted/tubes/test-si-tubes.py
index 3a8e65c..072489d 100644
--- a/tests/twisted/tubes/test-si-tubes.py
+++ b/tests/twisted/tubes/test-si-tubes.py
@@ -228,7 +228,7 @@ def test(q, bus, conn, stream):
     tube_props = tube_chan.GetAll(
             'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
             dbus_interface='org.freedesktop.DBus.Properties')
-    #assert tube_props.get("StreamService") == "echo"
+    assert tube_props.get("Service") == "echo"
 
     # The CM is the server, so fake a client wanting to talk to it
     iq = IQ(stream, 'set')
-- 
1.5.6.5




More information about the Telepathy-commits mailing list