[telepathy-gabble/master] Add seperate_contents and can_do_video_only dialect features

Sjoerd Simons sjoerd.simons at collabora.co.uk
Thu Jun 25 09:59:36 PDT 2009


add features to ask the dialect if it can do a video only call and whether its
contents are in seperate content trees or if they are all put together like in
GTalk 03
---
 tests/twisted/jingle/initial-audio-video.py |    2 ++
 tests/twisted/jingle/jingletest2.py         |   13 +++++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/jingle/initial-audio-video.py b/tests/twisted/jingle/initial-audio-video.py
index ed038c9..d949885 100644
--- a/tests/twisted/jingle/initial-audio-video.py
+++ b/tests/twisted/jingle/initial-audio-video.py
@@ -140,6 +140,8 @@ def incoming(jp, q, bus, conn, stream):
     for a, v in [(True, False), (False, True), (True, True)]:
         if v and not jp.can_do_video():
             continue
+        if not a and v and not jp.can_do_video_only():
+            continue
 
         jt.incoming_call(audio=a, video=v)
         e = q.expect('dbus-signal', signal='NewChannels')
diff --git a/tests/twisted/jingle/jingletest2.py b/tests/twisted/jingle/jingletest2.py
index 6d731d8..62802f4 100644
--- a/tests/twisted/jingle/jingletest2.py
+++ b/tests/twisted/jingle/jingletest2.py
@@ -114,6 +114,12 @@ class JingleProtocol:
     def can_do_video(self):
         return True
 
+    def can_do_video_only(self):
+        return True
+
+    def seperate_contents(self):
+        return True
+
     def is_modern_jingle(self):
         return False
 
@@ -176,6 +182,12 @@ class GtalkProtocol03(JingleProtocol):
     def extract_session_id(self, query):
         return query['id']
 
+    def can_do_video_only(self):
+        return False
+
+    def seperate_contents(self):
+        return False
+
 class GtalkProtocol04(JingleProtocol):
     features = [ 'http://www.google.com/xmpp/protocol/voice/v1',
           'http://www.google.com/transport/p2p' ]
@@ -419,6 +431,7 @@ class JingleTest2:
         Accepts a content-add stanza containing a single <content> of the given
         media type.
         """
+        assert self.seperate_contents()
         jp = self.jp
         c = query.firstChildElement()
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list