[telepathy-gabble/master] Add GTalk 03 video capabilities
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Thu Jun 25 09:59:33 PDT 2009
add GTAlk dialect 03 video capabilities as that is supported by the Google web
client. Also if we want to know if a specific dialect supports video, ask if it
supports video not ask if it's part of a certain dialect family
---
tests/twisted/jingle/jingletest2.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/tests/twisted/jingle/jingletest2.py b/tests/twisted/jingle/jingletest2.py
index 2a56587..08e5d7a 100644
--- a/tests/twisted/jingle/jingletest2.py
+++ b/tests/twisted/jingle/jingletest2.py
@@ -125,7 +125,8 @@ class JingleProtocol:
return [e] if e is not None else []
class GtalkProtocol03(JingleProtocol):
- features = [ 'http://www.google.com/xmpp/protocol/voice/v1' ]
+ features = [ 'http://www.google.com/xmpp/protocol/voice/v1',
+ 'http://www.google.com/xmpp/protocol/video/v1']
def __init__(self):
JingleProtocol.__init__(self, 'gtalk-v0.3')
@@ -156,7 +157,14 @@ class GtalkProtocol03(JingleProtocol):
return children[0]
def Description(self, type, children):
- return ('description', 'http://www.google.com/session/phone', {}, children)
+ if type == 'audio':
+ namespace = 'http://www.google.com/session/phone'
+ elif type == 'video':
+ namespace = 'http://www.google.com/session/video'
+ else:
+ namespace = 'unexistent-namespace'
+ return ('description', namespace, {}, children)
+
def match_jingle_action(self, q, action):
action = self._action_map(action)
return q is not None and q.name == 'session' and q['type'] == action
@@ -168,9 +176,6 @@ class GtalkProtocol03(JingleProtocol):
def extract_session_id(self, query):
return query['id']
- def can_do_video(self):
- return False
-
class GtalkProtocol04(JingleProtocol):
features = [ 'http://www.google.com/xmpp/protocol/voice/v1',
'http://www.google.com/transport/p2p' ]
--
1.5.6.5
More information about the telepathy-commits
mailing list