[telepathy-gabble/master] Sync with latest tube spec DRAFT

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed Apr 29 04:24:42 PDT 2009


{Offer,Accept}{DBus,Stream}Tube methods and the StreamTubeNewConnection
signal have been renamed.
---
 extensions/Channel_Interface_Tube.xml             |   16 ++++----
 extensions/Channel_Type_DBus_Tube.xml             |    8 ++--
 extensions/Channel_Type_Stream_Tube.xml           |   16 ++++----
 src/tube-dbus.c                                   |   30 +++++++-------
 src/tube-stream.c                                 |   46 ++++++++++----------
 tests/twisted/test-fallback-socks5-proxy.py       |    2 +-
 tests/twisted/tubes/accept-muc-dbus-tube.py       |    4 +-
 tests/twisted/tubes/accept-private-dbus-tube.py   |    4 +-
 tests/twisted/tubes/accept-private-stream-tube.py |   16 ++++----
 tests/twisted/tubes/offer-muc-dbus-tube.py        |    4 +-
 tests/twisted/tubes/offer-muc-stream-tube.py      |    6 +-
 tests/twisted/tubes/offer-no-caps.py              |    8 ++--
 tests/twisted/tubes/offer-private-dbus-tube.py    |    4 +-
 tests/twisted/tubes/offer-private-stream-tube.py  |    4 +-
 14 files changed, 84 insertions(+), 84 deletions(-)

diff --git a/extensions/Channel_Interface_Tube.xml b/extensions/Channel_Interface_Tube.xml
index 3e9a527..36addef 100644
--- a/extensions/Channel_Interface_Tube.xml
+++ b/extensions/Channel_Interface_Tube.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" ?>
 <node name="/Channel_Interface_Tube" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-  <tp:copyright>Copyright (C) 2008 Collabora Limited</tp:copyright>
-  <tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
+  <tp:copyright>Copyright © 2008-2009 Collabora Limited</tp:copyright>
+  <tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
   <tp:license>
     This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -26,9 +26,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       systems to communicate without having to establish network
       connections themselves. Currently, two types of tube exist:
       <tp:dbus-ref namespace="org.freedesktop.Telepathy"
-      >Channel.Type.DBusTube</tp:dbus-ref> and
+      >Channel.Type.DBusTube.DRAFT</tp:dbus-ref> and
       <tp:dbus-ref namespace="org.freedesktop.Telepathy"
-      >Channel.Type.StreamTube</tp:dbus-ref>. This interface contains
+      >Channel.Type.StreamTube.DRAFT</tp:dbus-ref>. This interface contains
       the properties, signals and methods common to both types of tube;
       you can only create channels of a specific tube type, not of this
       type. A tube channel contains exactly one tube; if you need several
@@ -42,8 +42,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       <p>As an exception to the usual handling of capabilities, connection managers
         for protocols with capability discovery, such as XMPP, SHOULD advertise the
         capability representing each Tube type that they support
-       (<tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Type.DBusTube</tp:dbus-ref> and/or
-        <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Type.StreamTube</tp:dbus-ref>)
+       (<tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Type.DBusTube.DRAFT</tp:dbus-ref> and/or
+        <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Type.StreamTube.DRAFT</tp:dbus-ref>)
         even if no client has indicated via
         <tp:dbus-ref
           namespace="org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities.DRAFT">SetSelfCapabilities</tp:dbus-ref>
@@ -80,8 +80,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
         <p>When requesting a channel with
           <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
           this property MUST NOT be included in the request. This property is undefined until the tube is offered
-          (using <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT">OfferStreamTube</tp:dbus-ref>
-          or <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT">OfferDBusTube</tp:dbus-ref>).
+          (using <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT">Offer</tp:dbus-ref>
+          or <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT">Offer</tp:dbus-ref>).
           Once it has been offered, this property MUST NOT change.</p>
         <p>When receiving an incoming tube, this property is immutable and so advertised in the
           <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.NewChannels</tp:dbus-ref>
diff --git a/extensions/Channel_Type_DBus_Tube.xml b/extensions/Channel_Type_DBus_Tube.xml
index 06a899d..fe2c949 100644
--- a/extensions/Channel_Type_DBus_Tube.xml
+++ b/extensions/Channel_Type_DBus_Tube.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" ?>
 <node name="/Channel_Type_DBus_Tube" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-  <tp:copyright>Copyright (C) 2008 Collabora Limited</tp:copyright>
-  <tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
+  <tp:copyright>Copyright © 2008-2009 Collabora Limited</tp:copyright>
+  <tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
   <tp:license>
     This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -54,7 +54,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
     </tp:docstring>
 
-    <method name="OfferDBusTube" tp:name-for-bindings="Offer_DBus_Tube">
+    <method name="Offer" tp:name-for-bindings="Offer">
       <tp:docstring>
         Offers a D-Bus tube providing the service specified.
       </tp:docstring>
@@ -83,7 +83,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       </tp:possible-errors>
     </method>
 
-    <method name="AcceptDBusTube" tp:name-for-bindings="Accept_DBus_Tube">
+    <method name="Accept" tp:name-for-bindings="Accept">
       <tp:docstring>
         Accept a D-Bus tube that's in the "local pending" state. The
         connection manager will attempt to open the tube. The tube remains in
diff --git a/extensions/Channel_Type_Stream_Tube.xml b/extensions/Channel_Type_Stream_Tube.xml
index 1c721d0..a655ece 100644
--- a/extensions/Channel_Type_Stream_Tube.xml
+++ b/extensions/Channel_Type_Stream_Tube.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" ?>
 <node name="/Channel_Type_Stream_Tube" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-  <tp:copyright>Copyright (C) 2008 Collabora Limited</tp:copyright>
-  <tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
+  <tp:copyright>Copyright © 2008-2009 Collabora Limited</tp:copyright>
+  <tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
   <tp:license>
     This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -27,9 +27,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
       <p>When offering a stream tube, the initiating client creates a local
         listening socket and offers it to the recipient client using the
-        <tp:member-ref>OfferStreamTube</tp:member-ref> method.  When a
+        <tp:member-ref>Offer</tp:member-ref> method.  When a
         recipient accepts a stream tube using the
-        <tp:member-ref>AcceptStreamTube</tp:member-ref> method, the
+        <tp:member-ref>Accept</tp:member-ref> method, the
         recipient's connection manager creates a new local listening socket.
         Each time the recipient's client connects to this socket, the
         initiator's connection manager proxies this connection to the
@@ -37,7 +37,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
     </tp:docstring>
 
-    <method name="OfferStreamTube" tp:name-for-bindings="Offer_Stream_Tube">
+    <method name="Offer" tp:name-for-bindings="Offer">
       <tp:docstring>
         Offer a stream tube exporting the local socket specified.
       </tp:docstring>
@@ -91,7 +91,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       </tp:possible-errors>
     </method>
 
-    <method name="AcceptStreamTube" tp:name-for-bindings="Accept_Stream_Tube">
+    <method name="Accept" tp:name-for-bindings="Accept">
       <tp:docstring>
         Accept a stream tube that's in the "local pending" state. The
         connection manager will attempt to open the tube. The tube remains in
@@ -137,8 +137,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       </tp:possible-errors>
     </method>
 
-    <signal name="StreamTubeNewConnection"
-            tp:name-for-bindings="Stream_Tube_New_Connection">
+    <signal name="NewConnection"
+            tp:name-for-bindings="New_Connection">
       <tp:docstring>
         Emitted on a stream tube when a participant opens a new connection
         to its socket.
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index a6efb52..c8b1490 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -1842,15 +1842,15 @@ gabble_tube_dbus_get_interfaces (TpSvcChannel *iface,
 }
 
 /**
- * gabble_tube_dbus_offer_d_bus_tube
+ * gabble_tube_dbus_offer_async
  *
- * Implemnets D-Bus method OfferDBusTube on interface
+ * Implemnets D-Bus method Offer on interface
  * org.freedesktop.Telepathy.Channel.Type.DBusTube
  */
 static void
-gabble_tube_dbus_offer_d_bus_tube (GabbleSvcChannelTypeDBusTube *self,
-                                   GHashTable *parameters,
-                                   DBusGMethodInvocation *context)
+gabble_tube_dbus_offer_async (GabbleSvcChannelTypeDBusTube *self,
+    GHashTable *parameters,
+    DBusGMethodInvocation *context)
 {
   GabbleTubeDBus *tube = GABBLE_TUBE_DBUS (self);
   GError *error = NULL;
@@ -1859,7 +1859,7 @@ gabble_tube_dbus_offer_d_bus_tube (GabbleSvcChannelTypeDBusTube *self,
 
   if (gabble_tube_dbus_offer (tube, &error))
     {
-      gabble_svc_channel_type_dbus_tube_return_from_offer_d_bus_tube (context,
+      gabble_svc_channel_type_dbus_tube_return_from_offer (context,
           tube->priv->dbus_srv_addr);
     }
   else
@@ -1871,21 +1871,21 @@ gabble_tube_dbus_offer_d_bus_tube (GabbleSvcChannelTypeDBusTube *self,
 }
 
 /**
- * gabble_tube_dbus_accept_d_bus_tube
+ * gabble_tube_dbus_accept_async
  *
- * Implements D-Bus method AcceptDBusTube on interface
+ * Implements D-Bus method Accept on interface
  * org.freedesktop.Telepathy.Channel.Type.DBusTube
  */
 static void
-gabble_tube_dbus_accept_d_bus_tube (GabbleSvcChannelTypeDBusTube *self,
-                                    DBusGMethodInvocation *context)
+gabble_tube_dbus_accept_async (GabbleSvcChannelTypeDBusTube *self,
+    DBusGMethodInvocation *context)
 {
   GabbleTubeDBus *tube = GABBLE_TUBE_DBUS (self);
   GError *error = NULL;
 
   if (gabble_tube_dbus_accept (GABBLE_TUBE_IFACE (tube), &error))
     {
-      gabble_svc_channel_type_dbus_tube_return_from_accept_d_bus_tube (context,
+      gabble_svc_channel_type_dbus_tube_return_from_accept (context,
           tube->priv->dbus_srv_addr);
       ;
     }
@@ -1936,9 +1936,9 @@ dbustube_iface_init (gpointer g_iface,
   GabbleSvcChannelTypeDBusTubeClass *klass =
       (GabbleSvcChannelTypeDBusTubeClass *) g_iface;
 
-#define IMPLEMENT(x) gabble_svc_channel_type_dbus_tube_implement_##x (\
-    klass, gabble_tube_dbus_##x)
-  IMPLEMENT(offer_d_bus_tube);
-  IMPLEMENT(accept_d_bus_tube);
+#define IMPLEMENT(x, suffix) gabble_svc_channel_type_dbus_tube_implement_##x (\
+    klass, gabble_tube_dbus_##x##suffix)
+  IMPLEMENT(offer,_async);
+  IMPLEMENT(accept,_async);
 #undef IMPLEMENT
 }
diff --git a/src/tube-stream.c b/src/tube-stream.c
index fb1cc4b..f6ea49a 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -1951,25 +1951,25 @@ stream_unix_tube_new_connection_cb (GabbleTubeStream *self,
                                     guint contact,
                                     gpointer user_data)
 {
-  gabble_svc_channel_type_stream_tube_emit_stream_tube_new_connection (self,
+  gabble_svc_channel_type_stream_tube_emit_new_connection (self,
       contact);
 }
 
 
 /**
- * gabble_tube_stream_offer_stream_tube
+ * gabble_tube_stream_offer_async
  *
- * Implements D-Bus method OfferStreamTube
+ * Implements D-Bus method Offer
  * on org.freedesktop.Telepathy.Channel.Type.StreamTube
  */
 static void
-gabble_tube_stream_offer_stream_tube (GabbleSvcChannelTypeStreamTube *iface,
-                                      guint address_type,
-                                      const GValue *address,
-                                      guint access_control,
-                                      const GValue *access_control_param,
-                                      GHashTable *parameters,
-                                      DBusGMethodInvocation *context)
+gabble_tube_stream_offer_async (GabbleSvcChannelTypeStreamTube *iface,
+    guint address_type,
+    const GValue *address,
+    guint access_control,
+    const GValue *access_control_param,
+    GHashTable *parameters,
+    DBusGMethodInvocation *context)
 {
   GabbleTubeStream *self = GABBLE_TUBE_STREAM (iface);
   GabbleTubeStreamPrivate *priv = GABBLE_TUBE_STREAM_GET_PRIVATE (self);
@@ -2029,21 +2029,21 @@ gabble_tube_stream_offer_stream_tube (GabbleSvcChannelTypeStreamTube *iface,
   g_signal_connect (self, "tube-new-connection",
       G_CALLBACK (stream_unix_tube_new_connection_cb), self);
 
-  gabble_svc_channel_type_stream_tube_return_from_offer_stream_tube (context);
+  gabble_svc_channel_type_stream_tube_return_from_offer (context);
 }
 
 /**
- * gabble_tube_stream_accept_stream_tube
+ * gabble_tube_stream_accept_async
  *
- * Implements D-Bus method AcceptStreamTube
+ * Implements D-Bus method Accept
  * on org.freedesktop.Telepathy.Channel.Type.StreamTube
  */
 static void
-gabble_tube_stream_accept_stream_tube (GabbleSvcChannelTypeStreamTube *iface,
-                                       guint address_type,
-                                       guint access_control,
-                                       const GValue *access_control_param,
-                                       DBusGMethodInvocation *context)
+gabble_tube_stream_accept_async (GabbleSvcChannelTypeStreamTube *iface,
+    guint address_type,
+    guint access_control,
+    const GValue *access_control_param,
+    DBusGMethodInvocation *context)
 {
   GabbleTubeStream *self = GABBLE_TUBE_STREAM (iface);
   GabbleTubeStreamPrivate *priv = GABBLE_TUBE_STREAM_GET_PRIVATE (self);
@@ -2069,7 +2069,7 @@ gabble_tube_stream_accept_stream_tube (GabbleSvcChannelTypeStreamTube *iface,
     gabble_muc_channel_send_presence (self->muc, NULL);
 #endif
 
-  gabble_svc_channel_type_stream_tube_return_from_accept_stream_tube (context,
+  gabble_svc_channel_type_stream_tube_return_from_accept (context,
       priv->address);
 }
 
@@ -2183,9 +2183,9 @@ streamtube_iface_init (gpointer g_iface,
   GabbleSvcChannelTypeStreamTubeClass *klass =
       (GabbleSvcChannelTypeStreamTubeClass *) g_iface;
 
-#define IMPLEMENT(x) gabble_svc_channel_type_stream_tube_implement_##x (\
-    klass, gabble_tube_stream_##x)
-  IMPLEMENT(offer_stream_tube);
-  IMPLEMENT(accept_stream_tube);
+#define IMPLEMENT(x, suffix) gabble_svc_channel_type_stream_tube_implement_##x (\
+    klass, gabble_tube_stream_##x##suffix)
+  IMPLEMENT(offer,_async);
+  IMPLEMENT(accept,_async);
 #undef IMPLEMENT
 }
diff --git a/tests/twisted/test-fallback-socks5-proxy.py b/tests/twisted/test-fallback-socks5-proxy.py
index d0900a7..739df69 100644
--- a/tests/twisted/test-fallback-socks5-proxy.py
+++ b/tests/twisted/test-fallback-socks5-proxy.py
@@ -55,7 +55,7 @@ def test(q, bus, conn, stream):
     tube_chan = bus.get_object(conn.bus_name, path)
     dbus_tube_iface = dbus.Interface(tube_chan, cs.CHANNEL_TYPE_DBUS_TUBE)
 
-    dbus_tube_iface.OfferDBusTube({})
+    dbus_tube_iface.Offer({})
 
     e = q.expect('stream-iq', to='alice at localhost/Test')
 
diff --git a/tests/twisted/tubes/accept-muc-dbus-tube.py b/tests/twisted/tubes/accept-muc-dbus-tube.py
index 695c3cf..788658e 100644
--- a/tests/twisted/tubes/accept-muc-dbus-tube.py
+++ b/tests/twisted/tubes/accept-muc-dbus-tube.py
@@ -69,10 +69,10 @@ def test(q, bus, conn, stream):
     dbus_names = tube_chan.Get(c.CHANNEL_TYPE_DBUS_TUBE, 'DBusNames', dbus_interface=c.PROPERTIES_IFACE)
     assert dbus_names == {bob_handle: bob_bus_name}
 
-    call_async(q, dbus_tube_iface, 'AcceptDBusTube')
+    call_async(q, dbus_tube_iface, 'Accept')
 
     return_event, names_changed, presence_event = q.expect_many(
-        EventPattern('dbus-return', method='AcceptDBusTube'),
+        EventPattern('dbus-return', method='Accept'),
         EventPattern('dbus-signal', signal='DBusNamesChanged', interface=c.CHANNEL_TYPE_DBUS_TUBE),
         EventPattern('stream-presence', to='chat at conf.localhost/test'))
 
diff --git a/tests/twisted/tubes/accept-private-dbus-tube.py b/tests/twisted/tubes/accept-private-dbus-tube.py
index 0029b22..5dd4624 100644
--- a/tests/twisted/tubes/accept-private-dbus-tube.py
+++ b/tests/twisted/tubes/accept-private-dbus-tube.py
@@ -160,12 +160,12 @@ def test(q, bus, conn, stream, bytestream_cls):
     assert status == cs.TUBE_STATE_LOCAL_PENDING
 
     # accept the tube (new API)
-    call_async(q, dbus_tube_iface, 'AcceptDBusTube')
+    call_async(q, dbus_tube_iface, 'Accept')
 
     # Init the bytestream
     events, state_event = bytestream.open_bytestream(
             [EventPattern('stream-iq', iq_type='result', query_ns=ns.SI),
-                EventPattern('dbus-return', method='AcceptDBusTube')],
+                EventPattern('dbus-return', method='Accept')],
             [EventPattern('dbus-signal', signal='TubeChannelStateChanged')])
 
     iq_event = events[0]
diff --git a/tests/twisted/tubes/accept-private-stream-tube.py b/tests/twisted/tubes/accept-private-stream-tube.py
index 3c3f5f6..e9f96a7 100644
--- a/tests/twisted/tubes/accept-private-stream-tube.py
+++ b/tests/twisted/tubes/accept-private-stream-tube.py
@@ -170,12 +170,12 @@ def test(q, bus, conn, stream, bytestream_cls):
     q.expect('dbus-error', method='AcceptStreamTube')
 
     # Try bad parameters on the new iface
-    call_async(q, new_tube_iface, 'AcceptStreamTube', 20, 0, '',
+    call_async(q, new_tube_iface, 'Accept', 20, 0, '',
             byte_arrays=True)
-    q.expect('dbus-error', method='AcceptStreamTube')
-    call_async(q, new_tube_iface, 'AcceptStreamTube', 0, 1, '',
+    q.expect('dbus-error', method='Accept')
+    call_async(q, new_tube_iface, 'Accept', 0, 1, '',
             byte_arrays=True)
-    q.expect('dbus-error', method='AcceptStreamTube')
+    q.expect('dbus-error', method='Accept')
 
     # Accept the tube with old iface, and use IPv4
     call_async(q, tubes_iface, 'AcceptStreamTube', stream_tube_id, 2, 0, '',
@@ -224,11 +224,11 @@ def test(q, bus, conn, stream, bytestream_cls):
         receive_tube_offer(q, bus, conn, stream)
 
     # Accept the tube with new iface, and use IPv4
-    call_async(q, new_tube_iface, 'AcceptStreamTube', 2, 0, '',
+    call_async(q, new_tube_iface, 'Accept', 2, 0, '',
             byte_arrays=True)
 
     accept_return_event, _ = q.expect_many(
-        EventPattern('dbus-return', method='AcceptStreamTube'),
+        EventPattern('dbus-return', method='Accept'),
         EventPattern('dbus-signal', signal='TubeStateChanged',
             args=[stream_tube_id, 2]))
 
@@ -248,11 +248,11 @@ def test(q, bus, conn, stream, bytestream_cls):
         receive_tube_offer(q, bus, conn, stream)
 
     # Accept the tube with new iface, and use UNIX sockets
-    call_async(q, new_tube_iface, 'AcceptStreamTube', 0, 0, '',
+    call_async(q, new_tube_iface, 'Accept', 0, 0, '',
             byte_arrays=True)
 
     accept_return_event, _ = q.expect_many(
-        EventPattern('dbus-return', method='AcceptStreamTube'),
+        EventPattern('dbus-return', method='Accept'),
         EventPattern('dbus-signal', signal='TubeStateChanged',
             args=[stream_tube_id, 2]))
 
diff --git a/tests/twisted/tubes/offer-muc-dbus-tube.py b/tests/twisted/tubes/offer-muc-dbus-tube.py
index 7d24e25..81f9cdf 100644
--- a/tests/twisted/tubes/offer-muc-dbus-tube.py
+++ b/tests/twisted/tubes/offer-muc-dbus-tube.py
@@ -245,12 +245,12 @@ def test(q, bus, conn, stream):
     assert tube_props['State'] == cs.TUBE_CHANNEL_STATE_NOT_OFFERED
 
     # offer the tube
-    call_async(q, dbus_tube_iface, 'OfferDBusTube', sample_parameters)
+    call_async(q, dbus_tube_iface, 'Offer', sample_parameters)
 
     new_tube_event, presence_event, return_event, status_event, dbus_changed_event = q.expect_many(
         EventPattern('dbus-signal', signal='NewTube'),
         EventPattern('stream-presence', to='chat2 at conf.localhost/test'),
-        EventPattern('dbus-return', method='OfferDBusTube'),
+        EventPattern('dbus-return', method='Offer'),
         EventPattern('dbus-signal', signal='TubeChannelStateChanged', args=[cs.TUBE_CHANNEL_STATE_OPEN]),
         EventPattern('dbus-signal', signal='DBusNamesChanged', interface=cs.CHANNEL_TYPE_DBUS_TUBE))
 
diff --git a/tests/twisted/tubes/offer-muc-stream-tube.py b/tests/twisted/tubes/offer-muc-stream-tube.py
index 211adff..84d091f 100644
--- a/tests/twisted/tubes/offer-muc-stream-tube.py
+++ b/tests/twisted/tubes/offer-muc-stream-tube.py
@@ -273,14 +273,14 @@ def test(q, bus, conn, stream, bytestream_cls):
     assert tube_props['State'] == cs.TUBE_CHANNEL_STATE_NOT_OFFERED
 
     # offer the tube
-    call_async(q, stream_tube_iface, 'OfferStreamTube',
+    call_async(q, stream_tube_iface, 'Offer',
         cs.SOCKET_ADDRESS_TYPE_UNIX, dbus.ByteArray(srv_path), cs.SOCKET_ACCESS_CONTROL_LOCALHOST, "",
         {'foo': 'bar'})
 
     new_tube_event, stream_event, _, status_event = q.expect_many(
         EventPattern('dbus-signal', signal='NewTube'),
         EventPattern('stream-presence', to='chat2 at conf.localhost/test'),
-        EventPattern('dbus-return', method='OfferStreamTube'),
+        EventPattern('dbus-return', method='Offer'),
         EventPattern('dbus-signal', signal='TubeChannelStateChanged', args=[cs.TUBE_CHANNEL_STATE_OPEN]))
 
     tube_self_handle = tube_chan.GetSelfHandle(dbus_interface=cs.CHANNEL_IFACE_GROUP)
@@ -329,7 +329,7 @@ def test(q, bus, conn, stream, bytestream_cls):
     iq_event, socket_event, conn_event = q.expect_many(
         EventPattern('stream-iq', iq_type='result'),
         EventPattern('socket-connected'),
-        EventPattern('dbus-signal', signal='StreamTubeNewConnection',
+        EventPattern('dbus-signal', signal='NewConnection',
             interface=cs.CHANNEL_TYPE_STREAM_TUBE))
 
     assert conn_event.args == [bob_handle]
diff --git a/tests/twisted/tubes/offer-no-caps.py b/tests/twisted/tubes/offer-no-caps.py
index 88627f4..3a63775 100644
--- a/tests/twisted/tubes/offer-no-caps.py
+++ b/tests/twisted/tubes/offer-no-caps.py
@@ -94,17 +94,17 @@ def test(q, bus, conn, stream):
         {cs.STREAM_TUBE_SERVICE: "newecho"}))
     st_chan = bus.get_object(conn.bus_name, st_path)
     st = dbus.Interface(st_chan, cs.CHANNEL_TYPE_STREAM_TUBE)
-    call_async(q, st, 'OfferStreamTube', cs.SOCKET_ADDRESS_TYPE_UNIX,
+    call_async(q, st, 'Offer', cs.SOCKET_ADDRESS_TYPE_UNIX,
         dbus.ByteArray(echo_path), cs.SOCKET_ACCESS_CONTROL_LOCALHOST, "", {})
-    e = q.expect('dbus-error', method='OfferStreamTube').error
+    e = q.expect('dbus-error', method='Offer').error
     assert e.get_dbus_name() == cs.NOT_AVAILABLE, e.get_dbus_name()
 
     dt_path, _ = requests.CreateChannel(props(cs.CHANNEL_TYPE_DBUS_TUBE,
         { cs.DBUS_TUBE_SERVICE_NAME: "com.newecho" }))
     dt_chan = bus.get_object(conn.bus_name, dt_path)
     dt = dbus.Interface(dt_chan, cs.CHANNEL_TYPE_DBUS_TUBE)
-    call_async(q, dt, 'OfferDBusTube', {})
-    e = q.expect('dbus-error', method='OfferDBusTube').error
+    call_async(q, dt, 'Offer', {})
+    e = q.expect('dbus-error', method='Offer').error
     assert e.get_dbus_name() == cs.NOT_AVAILABLE, e.get_dbus_name()
 
     conn.Disconnect()
diff --git a/tests/twisted/tubes/offer-private-dbus-tube.py b/tests/twisted/tubes/offer-private-dbus-tube.py
index 3d8d4d6..57fef08 100644
--- a/tests/twisted/tubes/offer-private-dbus-tube.py
+++ b/tests/twisted/tubes/offer-private-dbus-tube.py
@@ -244,9 +244,9 @@ def offer_new_dbus_tube(q, bus, conn, stream, self_handle, alice_handle, bytestr
     # IQ be sent to Alice. We sync the stream to ensure the IQ would have
     # arrived if it had been sent.
     sync_stream(q, stream)
-    call_async(q, dbus_tube_iface, 'OfferDBusTube', sample_parameters)
+    call_async(q, dbus_tube_iface, 'Offer', sample_parameters)
     offer_return_event, iq_event, new_tube_event, state_event = q.expect_many(
-        EventPattern('dbus-return', method='OfferDBusTube'),
+        EventPattern('dbus-return', method='Offer'),
         EventPattern('stream-iq', to='alice at localhost/Test'),
         EventPattern('dbus-signal', signal='NewTube'),
         EventPattern('dbus-signal', signal='TubeChannelStateChanged'),
diff --git a/tests/twisted/tubes/offer-private-stream-tube.py b/tests/twisted/tubes/offer-private-stream-tube.py
index 9cbecf7..a091870 100644
--- a/tests/twisted/tubes/offer-private-stream-tube.py
+++ b/tests/twisted/tubes/offer-private-stream-tube.py
@@ -258,7 +258,7 @@ def test(q, bus, conn, stream, bytestream_cls):
             cs.TUBE_CHANNEL_STATE_REMOTE_PENDING)
 
     # Offer the first tube created (new API)
-    call_async(q, new_tube_iface, 'OfferStreamTube',
+    call_async(q, new_tube_iface, 'Offer',
         0, dbus.ByteArray(echo2_path), 0, "", new_sample_parameters)
 
     msg_event, new_tube_sig, state_event = q.expect_many(
@@ -363,7 +363,7 @@ def test(q, bus, conn, stream, bytestream_cls):
         si_reply_event.stanza)
     assert len(tube) == 1
 
-    q.expect('dbus-signal', signal='StreamTubeNewConnection',
+    q.expect('dbus-signal', signal='NewConnection',
         args=[bob_handle])
 
     expected_tube = (new_stream_tube_id, self_handle, cs.TUBE_TYPE_STREAM,
-- 
1.5.6.5



More information about the telepathy-commits mailing list