1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """ Copyright © 2005-2009 Collabora Limited
4 Copyright © 2005-2009 Nokia Corporation
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 class ChannelInterfaceMediaSignalling(dbus.service.Interface):
28 An interface for signalling a channel containing synchronised media
29 sessions which can contain an arbitrary number of streams. The
30 presence of this interface on a Channel indicates that the connection
31 manager will not carry out the actual streaming for this channel,
32 and that the client handling the channel is responsible for doing
33 so; in most cases we recommend doing this by using the
34 telepathy-farsight library.
37 Streaming audio and (particularly) video requires a high level of
38 integration with the UI, and having the connection manager act as
39 a proxy would be likely to introduce unacceptable latency. As a
40 result, audio/video streaming is offloaded into the client
41 where possible, as an exception to the general design of
45 The negotiation interface is based on the API of the
47 This, in turn, is based upon the IETF MMusic ICE drafts, where
48 connections are established by signalling potential connection
49 candidates to the peer until a usable connection is found, and
50 codecs are negotiated with an SDP-style offer and answer. However,
51 the principles should be applicable to other media streaming methods
52 and the API re-used without difficulty.
54 Note that the naming conventions used in the MediaStreamHandler
55 and MediaSessionHandler interfaces are rather confusing; methods
56 have signal-like names and signals have method-like names, due to
57 the API being based rather too closely on that of Farsight. This
58 is for historical reasons and will be fixed in a future release
59 of the Telepathy specification.
63 self._interfaces.add('org.freedesktop.Telepathy.Channel.Interface.MediaSignalling')
65 @dbus.service.method('org.freedesktop.Telepathy.Channel.Interface.MediaSignalling', in_signature='', out_signature='a(os)')
66 def GetSessionHandlers(self):
68 Returns all currently active session handlers on this channel
69 as a list of (session_handler_path, type).
72 raise NotImplementedError
74 @dbus.service.signal('org.freedesktop.Telepathy.Channel.Interface.MediaSignalling', signature='os')
75 def NewSessionHandler(self, Session_Handler, Session_Type):
77 Signal that a session handler object has been created. The client
78 should create a session object and create streams for the streams