summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-24 19:16:38 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-24 19:16:38 +0000
commite08186d6a4b36705a643021cb2abf3813210f5b0 (patch)
tree64b5c2fdae402c7cf23c3888c7fe57ee8f3d2328
parent0d3a150feecac67c5335222660f327e642d8fc3f (diff)
specify more interfacesnext-gdbus
-rw-r--r--tests/twisted/voip/add-remove-content.py14
-rw-r--r--tests/twisted/voip/calltest.py27
-rw-r--r--tests/twisted/voip/direction-change.py22
3 files changed, 41 insertions, 22 deletions
diff --git a/tests/twisted/voip/add-remove-content.py b/tests/twisted/voip/add-remove-content.py
index 8e4dd63..bfa83e9 100644
--- a/tests/twisted/voip/add-remove-content.py
+++ b/tests/twisted/voip/add-remove-content.py
@@ -25,9 +25,11 @@ class AddRemoveContent(calltest.CallTest):
self.add_candidates(content.stream)
md_path, _ = content.Get(cs.CALL_CONTENT_IFACE_MEDIA,
- 'MediaDescriptionOffer')
+ 'MediaDescriptionOffer',
+ dbus_interface=cs.PROPERTIES_IFACE)
md = self.bus.get_object (self.conn.bus_name, md_path)
- md.Accept(self.context.get_audio_md_dbus(self.remote_handle))
+ md.Accept(self.context.get_audio_md_dbus(self.remote_handle),
+ dbus_interface=cs.CALL_CONTENT_MEDIA_DESCRIPTION)
self.q.expect_many(
EventPattern('dbus-signal', signal='MediaDescriptionOfferDone'),
EventPattern('dbus-signal', signal='LocalMediaDescriptionChanged'),
@@ -81,9 +83,11 @@ class AddRemoveContent(calltest.CallTest):
self.add_candidates(content.stream)
md_path, _ = content.Get(cs.CALL_CONTENT_IFACE_MEDIA,
- 'MediaDescriptionOffer')
+ 'MediaDescriptionOffer',
+ dbus_interface=cs.PROPERTIES_IFACE)
md = self.bus.get_object (self.conn.bus_name, md_path)
- md.Accept(self.context.get_audio_md_dbus(self.remote_handle))
+ md.Accept(self.context.get_audio_md_dbus(self.remote_handle),
+ dbus_interface=cs.CALL_CONTENT_MEDIA_DESCRIPTION)
self.q.expect_many(
EventPattern('dbus-signal', signal='MediaDescriptionOfferDone'),
EventPattern('dbus-signal', signal='LocalMediaDescriptionChanged'),
@@ -126,7 +130,7 @@ class AddRemoveContent(calltest.CallTest):
def remove_content_successful(self, x):
content = self.contents[x]
self.contents.remove(content)
- content.Remove()
+ content.Remove(dbus_interface=cs.CALL_CONTENT)
reinvite_event, content_removed = self.q.expect_many(
EventPattern('sip-invite'),
diff --git a/tests/twisted/voip/calltest.py b/tests/twisted/voip/calltest.py
index dfedb9a..a93d613 100644
--- a/tests/twisted/voip/calltest.py
+++ b/tests/twisted/voip/calltest.py
@@ -89,7 +89,8 @@ class CallTest:
def check_endpoint(self, content, endpoint_path):
endpoint = self.bus.get_object(self.conn.bus_name, endpoint_path)
- endpoint_props = endpoint.GetAll(cs.CALL_STREAM_ENDPOINT)
+ endpoint_props = endpoint.GetAll(cs.CALL_STREAM_ENDPOINT,
+ dbus_interface=cs.PROPERTIES_IFACE)
assertEquals(('',''), endpoint_props['RemoteCredentials'])
assertEquals(self.context.get_remote_candidates_dbus(),
endpoint_props['RemoteCandidates'])
@@ -164,7 +165,8 @@ class CallTest:
content = self.bus.get_object (self.conn.bus_name, content_path)
- content_props = content.GetAll(cs.CALL_CONTENT)
+ content_props = content.GetAll(cs.CALL_CONTENT,
+ dbus_interface=cs.PROPERTIES_IFACE)
if initial:
assertEquals(cs.CALL_DISPOSITION_INITIAL,
content_props['Disposition'])
@@ -183,7 +185,8 @@ class CallTest:
content.media_type = content_props['Type']
- cmedia_props = content.GetAll(cs.CALL_CONTENT_IFACE_MEDIA)
+ cmedia_props = content.GetAll(cs.CALL_CONTENT_IFACE_MEDIA,
+ dbus_interface=cs.PROPERTIES_IFACE)
assertLength(0, cmedia_props['RemoteMediaDescriptions'])
assertLength(0, cmedia_props['LocalMediaDescriptions'])
if incoming:
@@ -202,7 +205,8 @@ class CallTest:
if incoming:
md = self.bus.get_object (self.conn.bus_name,
cmedia_props['MediaDescriptionOffer'][0])
- md.Accept(self.context.get_audio_md_dbus(self.remote_handle))
+ md.Accept(self.context.get_audio_md_dbus(self.remote_handle),
+ dbus_interface=cs.CALL_CONTENT_MEDIA_DESCRIPTION)
o = self.q.expect_many(
EventPattern('dbus-signal', signal='MediaDescriptionOfferDone'),
EventPattern('dbus-signal', signal='LocalMediaDescriptionChanged'),
@@ -275,10 +279,12 @@ class CallTest:
cs.CALL_STREAM_FLOW_STATE_STARTED)
mdo = c.Get(cs.CALL_CONTENT_IFACE_MEDIA,
- 'MediaDescriptionOffer')
+ 'MediaDescriptionOffer',
+ dbus_interface=cs.PROPERTIES_IFACE)
md = self.bus.get_object (self.conn.bus_name, mdo[0])
md.Accept(self.context.get_audio_md_dbus(
- self.remote_handle))
+ self.remote_handle),
+ dbus_interface=cs.CALL_CONTENT_MEDIA_DESCRIPTION)
self.q.expect_many(
EventPattern('dbus-signal', signal='MediaDescriptionOfferDone',
@@ -289,7 +295,8 @@ class CallTest:
path=c.__dbus_object_path__))
mdo = c.Get(cs.CALL_CONTENT_IFACE_MEDIA,
- 'MediaDescriptionOffer')
+ 'MediaDescriptionOffer',
+ dbus_interface=cs.PROPERTIES_IFACE)
assertEquals(('/', {}), mdo)
self.add_candidates(c.stream)
@@ -392,7 +399,8 @@ class CallTest:
i.signal != 'NewMediaDescriptionOffer':
continue
md = self.bus.get_object (self.conn.bus_name, i.args[0])
- md.Accept(self.context.get_audio_md_dbus(self.remote_handle))
+ md.Accept(self.context.get_audio_md_dbus(self.remote_handle),
+ dbus_interface=cs.CALL_CONTENT_MEDIA_DESCRIPTION)
o = self.q.expect_many(
# Call accepted
@@ -401,7 +409,8 @@ class CallTest:
assertEquals(cs.CALL_STATE_ACCEPTED, o[0].args[0])
for c in self.contents:
- mdo = c.Get(cs.CALL_CONTENT_IFACE_MEDIA, 'MediaDescriptionOffer')
+ mdo = c.Get(cs.CALL_CONTENT_IFACE_MEDIA, 'MediaDescriptionOffer',
+ dbus_interface=cs.PROPERTIES_IFACE)
assertEquals(('/', {}), mdo)
diff --git a/tests/twisted/voip/direction-change.py b/tests/twisted/voip/direction-change.py
index c9e4c41..5299a9f 100644
--- a/tests/twisted/voip/direction-change.py
+++ b/tests/twisted/voip/direction-change.py
@@ -583,7 +583,8 @@ class DirectionChange(calltest.CallTest):
content = self.bus.get_object (self.conn.bus_name, content_path)
- content_props = content.GetAll(cs.CALL_CONTENT)
+ content_props = content.GetAll(cs.CALL_CONTENT,
+ dbus_interface=cs.PROPERTIES_IFACE)
assertEquals(cs.CALL_DISPOSITION_NONE, content_props['Disposition'])
assertEquals('NewContent', content_props['Name'])
assertEquals(cs.MEDIA_STREAM_TYPE_AUDIO, content_props['Type'])
@@ -611,10 +612,12 @@ class DirectionChange(calltest.CallTest):
smedia_props['ReceivingState'])
mdo = content.Get(cs.CALL_CONTENT_IFACE_MEDIA,
- 'MediaDescriptionOffer')
+ 'MediaDescriptionOffer',
+ dbus_interface=cs.PROPERTIES_IFACE)
md = self.bus.get_object (self.conn.bus_name, mdo[0])
md.Accept(self.context.get_audio_md_dbus(
- self.remote_handle))
+ self.remote_handle),
+ dbus_interface=cs.CALL_CONTENT_MEDIA_DESCRIPTION)
self.add_candidates(stream)
@@ -630,7 +633,7 @@ class DirectionChange(calltest.CallTest):
ack_cseq = "%s ACK" % reinvite_event.cseq.split()[0]
self.q.expect('sip-ack', cseq=ack_cseq)
- content.Remove()
+ content.Remove(dbus_interface=cs.CALL_CONTENT)
reinvite_event = self.q.expect('sip-invite')
@@ -662,7 +665,8 @@ class DirectionChange(calltest.CallTest):
content = self.bus.get_object (self.conn.bus_name, ca.args[0])
- content_props = content.GetAll(cs.CALL_CONTENT)
+ content_props = content.GetAll(cs.CALL_CONTENT,
+ dbus_interface=cs.PROPERTIES_IFACE)
assertEquals(cs.CALL_DISPOSITION_NONE, content_props['Disposition'])
assertEquals(cs.MEDIA_STREAM_TYPE_AUDIO, content_props['Type'])
@@ -689,10 +693,12 @@ class DirectionChange(calltest.CallTest):
smedia_props['ReceivingState'])
mdo = content.Get(cs.CALL_CONTENT_IFACE_MEDIA,
- 'MediaDescriptionOffer')
+ 'MediaDescriptionOffer',
+ dbus_interface=cs.PROPERTIES_IFACE)
md = self.bus.get_object (self.conn.bus_name, mdo[0])
md.Accept(self.context.get_audio_md_dbus(
- self.remote_handle))
+ self.remote_handle),
+ dbus_interface=cs.CALL_CONTENT_MEDIA_DESCRIPTION)
self.add_candidates(stream)
@@ -702,7 +708,7 @@ class DirectionChange(calltest.CallTest):
[('audio', 'sendonly'), ('audio', 'inactive')])
self.context.ack(acc.sip_message)
- content.Remove()
+ content.Remove(dbus_interface=cs.CALL_CONTENT)
reinvite_event = self.q.expect('sip-invite')