telepathy-gabble: Pass RemoteContact key into UpdateLocalMediaDescription

Sjoerd Simons sjoerd at kemper.freedesktop.org
Tue Sep 11 02:59:56 PDT 2012


Module: telepathy-gabble
Branch: master
Commit: 36b4819e116fbbcca22c7c87d72d31353b6802bb
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=36b4819e116fbbcca22c7c87d72d31353b6802bb

Author: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
Date:   Tue Sep 11 11:45:16 2012 +0200

Pass RemoteContact key into UpdateLocalMediaDescription

Now that telepathy-glib actually correctly checks what is passed to
UpdateLocalMediaDescription ensure we always pass the RemoteContact key
in the dictionary.

---

 tests/twisted/jingle/call-codecoffer.py |    2 +-
 tests/twisted/jingle/call_helper.py     |   10 +++++-----
 tests/twisted/jingle/jingletest2.py     |   14 ++++++++++----
 3 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/tests/twisted/jingle/call-codecoffer.py b/tests/twisted/jingle/call-codecoffer.py
index 90848fe..0ccf941 100644
--- a/tests/twisted/jingle/call-codecoffer.py
+++ b/tests/twisted/jingle/call-codecoffer.py
@@ -189,7 +189,7 @@ def test_outgoing(jp, q, bus, conn, stream):
     assertEquals(ret[1].args[1][cs.CALL_CONTENT_MEDIADESCRIPTION + ".Codecs"], [])
 
     # get a list of audio codecs we can support
-    md = jt2.get_call_audio_md_dbus()
+    md = jt2.get_call_audio_md_dbus(remote_handle)
 
     # make sure UpdateCodecs fails
     props = chan.GetAll(cs.CHANNEL_TYPE_CALL,
diff --git a/tests/twisted/jingle/call_helper.py b/tests/twisted/jingle/call_helper.py
index 2bed8cc..402f1c9 100644
--- a/tests/twisted/jingle/call_helper.py
+++ b/tests/twisted/jingle/call_helper.py
@@ -619,13 +619,13 @@ class CallTest(object):
             # Setup media description
             contents.append(self.audio_content)
             streams.append(self.audio_stream)
-            mds.append(self.jt2.get_call_audio_md_dbus())
+            mds.append(self.jt2.get_call_audio_md_dbus(self.peer_handle))
 
         if self.initial_video:
             contents.append(self.video_content)
             streams.append(self.video_stream)
-            mds.append(self.jt2.get_call_video_md_dbus())
-        
+            mds.append(self.jt2.get_call_video_md_dbus(self.peer_handle))
+
         self.connect_streams(contents, streams, mds,
                 expect_after_si=expect_after_si)
 
@@ -728,11 +728,11 @@ class CallTest(object):
                         ret[1].args[0])
 
             if self.initial_audio:
-                md = self.jt2.get_call_audio_md_dbus()
+                md = self.jt2.get_call_audio_md_dbus(self.peer_handle)
                 self.check_and_accept_offer(self.audio_content, md,
                         md_changed = False)
             if self.initial_video:
-                md = self.jt2.get_call_video_md_dbus()
+                md = self.jt2.get_call_video_md_dbus(self.peer_handle)
                 self.check_and_accept_offer(self.video_content, md,
                         md_changed = False)
 
diff --git a/tests/twisted/jingle/jingletest2.py b/tests/twisted/jingle/jingletest2.py
index a3fb73b..5ca91d4 100644
--- a/tests/twisted/jingle/jingletest2.py
+++ b/tests/twisted/jingle/jingletest2.py
@@ -820,15 +820,21 @@ class JingleTest2:
     def __get_call_video_codecs_dbus(self):
         return self.dbusify_call_codecs(self.video_codecs)
 
-    def get_call_audio_md_dbus(self):
-        return dbus.Dictionary(
+    def get_call_audio_md_dbus(self, handle = 0):
+        d =  dbus.Dictionary(
             { cs.CALL_CONTENT_MEDIADESCRIPTION + '.Codecs': self.__get_call_audio_codecs_dbus(),
             }, signature='sv')
+        if handle != 0:
+            d[cs.CALL_CONTENT_MEDIADESCRIPTION + '.RemoteContact'] = dbus.UInt32 (handle)
+        return d
 
-    def get_call_video_md_dbus(self):
-        return dbus.Dictionary(
+    def get_call_video_md_dbus(self, handle = 0):
+        d = dbus.Dictionary(
             { cs.CALL_CONTENT_MEDIADESCRIPTION + '.Codecs': self.__get_call_video_codecs_dbus(),
             }, signature='sv')
+        if handle != 0:
+            d[cs.CALL_CONTENT_MEDIADESCRIPTION + '.RemoteContact'] = dbus.UInt32 (handle)
+        return d
 
     def get_remote_transports_dbus(self):
         return dbus.Array([



More information about the telepathy-commits mailing list