[telepathy-butterfly/master] Create StreamedMedia channel on webcam invitation

Louis-Francis Ratté-Boulianne louis-francis.ratte-boulianne at collabora.co.uk
Thu Sep 10 06:48:10 PDT 2009


---
 butterfly/connection.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/butterfly/connection.py b/butterfly/connection.py
index 94dd8fa..f80034d 100644
--- a/butterfly/connection.py
+++ b/butterfly/connection.py
@@ -294,6 +294,18 @@ class ButterflyConnection(telepathy.server.Connection,
         channel = self._channel_manager.channel_for_props(props,
                 signal=True, call=call)
 
+    # papyon.event.InviteEventInterface
+    def on_invite_webcam(self, session, producer):
+        direction = producer and "send" or "receive"
+        logger.debug("Invitation to %s webcam" % direction)
+
+        handle = ButterflyHandleFactory(self, 'contact', session.peer.account,
+                session.peer.network_id)
+        props = self._generate_props(telepathy.CHANNEL_TYPE_STREAMED_MEDIA,
+                handle, False)
+        channel = self._channel_manager.channel_for_props(props, signal=True,
+                call=session)
+
     def _advertise_disconnected(self):
         self._manager.disconnected(self)
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list