[telepathy-gabble/master] DBusTube.{Offer, Accept} now have an access_control argument

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon May 25 09:40:36 PDT 2009


---
 src/tube-dbus.c                                 |    2 ++
 tests/twisted/tubes/accept-muc-dbus-tube.py     |    2 +-
 tests/twisted/tubes/accept-private-dbus-tube.py |    2 +-
 tests/twisted/tubes/offer-muc-dbus-tube.py      |    2 +-
 tests/twisted/tubes/offer-no-caps.py            |    2 +-
 tests/twisted/tubes/offer-private-dbus-tube.py  |    2 +-
 6 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index c8b1490..e388fa6 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -1850,6 +1850,7 @@ gabble_tube_dbus_get_interfaces (TpSvcChannel *iface,
 static void
 gabble_tube_dbus_offer_async (GabbleSvcChannelTypeDBusTube *self,
     GHashTable *parameters,
+    guint access_control,
     DBusGMethodInvocation *context)
 {
   GabbleTubeDBus *tube = GABBLE_TUBE_DBUS (self);
@@ -1878,6 +1879,7 @@ gabble_tube_dbus_offer_async (GabbleSvcChannelTypeDBusTube *self,
  */
 static void
 gabble_tube_dbus_accept_async (GabbleSvcChannelTypeDBusTube *self,
+    guint access_control,
     DBusGMethodInvocation *context)
 {
   GabbleTubeDBus *tube = GABBLE_TUBE_DBUS (self);
diff --git a/tests/twisted/tubes/accept-muc-dbus-tube.py b/tests/twisted/tubes/accept-muc-dbus-tube.py
index 788658e..12e119f 100644
--- a/tests/twisted/tubes/accept-muc-dbus-tube.py
+++ b/tests/twisted/tubes/accept-muc-dbus-tube.py
@@ -69,7 +69,7 @@ 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, 'Accept')
+    call_async(q, dbus_tube_iface, 'Accept', c.SOCKET_ACCESS_CONTROL_CREDENTIALS)
 
     return_event, names_changed, presence_event = q.expect_many(
         EventPattern('dbus-return', method='Accept'),
diff --git a/tests/twisted/tubes/accept-private-dbus-tube.py b/tests/twisted/tubes/accept-private-dbus-tube.py
index 3165d8c..7e4efb4 100644
--- a/tests/twisted/tubes/accept-private-dbus-tube.py
+++ b/tests/twisted/tubes/accept-private-dbus-tube.py
@@ -160,7 +160,7 @@ 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, 'Accept')
+    call_async(q, dbus_tube_iface, 'Accept', cs.SOCKET_ACCESS_CONTROL_CREDENTIALS)
 
     # Init the bytestream
     events, state_event = bytestream.open_bytestream(
diff --git a/tests/twisted/tubes/offer-muc-dbus-tube.py b/tests/twisted/tubes/offer-muc-dbus-tube.py
index 81f9cdf..b564f68 100644
--- a/tests/twisted/tubes/offer-muc-dbus-tube.py
+++ b/tests/twisted/tubes/offer-muc-dbus-tube.py
@@ -245,7 +245,7 @@ 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, 'Offer', sample_parameters)
+    call_async(q, dbus_tube_iface, 'Offer', sample_parameters, cs.SOCKET_ACCESS_CONTROL_CREDENTIALS)
 
     new_tube_event, presence_event, return_event, status_event, dbus_changed_event = q.expect_many(
         EventPattern('dbus-signal', signal='NewTube'),
diff --git a/tests/twisted/tubes/offer-no-caps.py b/tests/twisted/tubes/offer-no-caps.py
index c659ac3..3b9783d 100644
--- a/tests/twisted/tubes/offer-no-caps.py
+++ b/tests/twisted/tubes/offer-no-caps.py
@@ -104,7 +104,7 @@ def test(q, bus, conn, stream):
         { 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, 'Offer', {})
+    call_async(q, dt, 'Offer', {}, cs.SOCKET_ACCESS_CONTROL_CREDENTIALS)
     e = q.expect('dbus-error', method='Offer').error
     assert e.get_dbus_name() == cs.NOT_AVAILABLE, e.get_dbus_name()
 
diff --git a/tests/twisted/tubes/offer-private-dbus-tube.py b/tests/twisted/tubes/offer-private-dbus-tube.py
index 57fef08..c0fb265 100644
--- a/tests/twisted/tubes/offer-private-dbus-tube.py
+++ b/tests/twisted/tubes/offer-private-dbus-tube.py
@@ -244,7 +244,7 @@ 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, 'Offer', sample_parameters)
+    call_async(q, dbus_tube_iface, 'Offer', sample_parameters, cs.SOCKET_ACCESS_CONTROL_CREDENTIALS)
     offer_return_event, iq_event, new_tube_event, state_event = q.expect_many(
         EventPattern('dbus-return', method='Offer'),
         EventPattern('stream-iq', to='alice at localhost/Test'),
-- 
1.5.6.5




More information about the telepathy-commits mailing list