diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2010-03-19 23:44:33 +0000 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2010-03-19 23:44:33 +0000 |
commit | a4d4ef99455e801e11dbb6b5f702ed8f964b2d3f (patch) | |
tree | 07e78b4f120af4a9d6e89ff7df6ba7a6dc0de9d4 | |
parent | cdc5d5dc11bf0dbb5c781628e52ec624fdcc7d9b (diff) |
capabilities: advertise webcam protocol, but not sipwebcam
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | butterfly/capabilities.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/butterfly/capabilities.py b/butterfly/capabilities.py index e03184c..1bdce27 100644 --- a/butterfly/capabilities.py +++ b/butterfly/capabilities.py @@ -40,14 +40,14 @@ class ButterflyCapabilities( dbus_interface = telepathy.CONNECTION_INTERFACE_CAPABILITIES def AdvertiseCapabilities(self, add, remove): - #for caps, specs in add: - #if caps == telepathy.CHANNEL_TYPE_STREAMED_MEDIA: - #if specs & telepathy.CHANNEL_MEDIA_CAPABILITY_VIDEO: - #self._self_handle.profile.client_id.has_webcam = True + for caps, specs in add: + if caps == telepathy.CHANNEL_TYPE_STREAMED_MEDIA: + if specs & telepathy.CHANNEL_MEDIA_CAPABILITY_VIDEO: + self._self_handle.profile.client_id.has_webcam = True #self._self_handle.profile.client_id.supports_rtc_video = True - #for caps in remove: - #if caps == telepathy.CHANNEL_TYPE_STREAMED_MEDIA: - #self._self_handle.profile.client_id.has_webcam = False + for caps in remove: + if caps == telepathy.CHANNEL_TYPE_STREAMED_MEDIA: + self._self_handle.profile.client_id.has_webcam = False return telepathy.server.ConnectionInterfaceCapabilities.\ AdvertiseCapabilities(self, add, remove) @@ -112,8 +112,10 @@ class ButterflyCapabilities( #spec_caps |= telepathy.CHANNEL_MEDIA_CAPABILITY_AUDIO #spec_caps |= telepathy.CHANNEL_MEDIA_CAPABILITY_NAT_TRAVERSAL_STUN - #if caps.has_webcam: - #spec_caps |= telepathy.CHANNEL_MEDIA_CAPABILITY_VIDEO + if caps.has_webcam: + gen_caps |= telepathy.CONNECTION_CAPABILITY_FLAG_CREATE + gen_caps |= telepathy.CONNECTION_CAPABILITY_FLAG_INVITE + spec_caps |= telepathy.CHANNEL_MEDIA_CAPABILITY_VIDEO return gen_caps, spec_caps |