Adding option to log to a debug text channel
[theonering] / src / tp / _generated / Media_Stream_Handler.py
1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """ Copyright (C) 2005-2008 Collabora Limited 
4  Copyright (C) 2005-2008 Nokia Corporation 
5  Copyright (C) 2006 INdT 
6
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.
11
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.
16
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.
20   
21 """
22
23 import dbus.service
24
25
26 class MediaStreamHandler(dbus.service.Object):
27     """\
28     Handles signalling the information pertaining to a specific media stream.
29     A client should provide information to this handler as and when it is
30     available.
31     """
32
33     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='u', out_signature='')
34     def CodecChoice(self, Codec_ID):
35         """
36         Inform the connection manager of codec used to receive data.
37       
38         """
39         raise NotImplementedError
40   
41     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='us', out_signature='')
42     def Error(self, Error_Code, Message):
43         """
44         Inform the connection manager that an error occured in this stream. The
45         connection manager should emit the StreamError signal for the stream on
46         the relevant channel, and remove the stream from the session.
47       
48         """
49         raise NotImplementedError
50   
51     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='', out_signature='')
52     def NativeCandidatesPrepared(self):
53         """
54         Informs the connection manager that all possible native candisates
55         have been discovered for the moment.
56       
57         """
58         raise NotImplementedError
59   
60     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='ss', out_signature='')
61     def NewActiveCandidatePair(self, Native_Candidate_ID, Remote_Candidate_ID):
62         """
63         Informs the connection manager that a valid candidate pair
64         has been discovered and streaming is in progress.
65       
66         """
67         raise NotImplementedError
68   
69     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='sa(usuussduss)', out_signature='')
70     def NewNativeCandidate(self, Candidate_ID, Transports):
71         """
72         Inform this MediaStreamHandler that a new native transport candidate
73         has been ascertained.
74       
75         """
76         raise NotImplementedError
77   
78     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='a(usuuua{ss})', out_signature='')
79     def Ready(self, Codecs):
80         """
81         Inform the connection manager that a client is ready to handle
82         this StreamHandler. Also provide it with info about all supported
83         codecs.
84       
85         """
86         raise NotImplementedError
87   
88     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='a(usuuua{ss})', out_signature='')
89     def SetLocalCodecs(self, Codecs):
90         """
91         Used to provide codecs after Ready(), so the media client can go
92           ready for an incoming call and exchange candidates/codecs before
93           knowing what local codecs are available.
94
95         This is useful for gatewaying calls between two connection managers.
96           Given an incoming call, you need to call
97           Ready to get the remote codecs before
98           you can use them as the "local" codecs to place the outgoing call,
99           and hence receive the outgoing call's remote codecs to use as the
100           incoming call's "local" codecs.
101
102         In this situation, you would pass an empty list of codecs to the
103           incoming call's Ready method, then later call SetLocalCodecs on the
104           incoming call in order to respond to the offer.
105       
106         """
107         raise NotImplementedError
108   
109     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='u', out_signature='')
110     def StreamState(self, State):
111         """
112         Informs the connection manager of the stream's current state, as
113         as specified in Channel.Type.StreamedMedia::ListStreams.
114       
115         """
116         raise NotImplementedError
117   
118     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='a(usuuua{ss})', out_signature='')
119     def SupportedCodecs(self, Codecs):
120         """
121         Inform the connection manager of the supported codecs for this session.
122         This is called after the connection manager has emitted SetRemoteCodecs
123         to notify what codecs are supported by the peer, and will thus be an
124         intersection of all locally supported codecs (passed to Ready)
125         and those supported by the peer.
126       
127         """
128         raise NotImplementedError
129   
130     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='a(usuuua{ss})', out_signature='')
131     def CodecsUpdated(self, Codecs):
132         """
133         Inform the connection manager that the parameters of the supported
134         codecs for this session have changed. The connection manager should
135         send the new parameters to the remote contact.
136
137         
138           This is required for H.264 and Theora, for example.
139         
140       
141         """
142         raise NotImplementedError
143   
144     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='b', out_signature='')
145     def HoldState(self, Held):
146         """
147         Notify the connection manager that the stream's hold state has
148         been changed successfully in response to SetStreamHeld.
149       
150         """
151         raise NotImplementedError
152   
153     @dbus.service.method('org.freedesktop.Telepathy.Media.StreamHandler', in_signature='', out_signature='')
154     def UnholdFailure(self):
155         """
156         Notify the connection manager that an attempt to reacquire the
157         necessary hardware or software resources to unhold the stream,
158         in response to SetStreamHeld, has failed.
159       
160         """
161         raise NotImplementedError
162   
163     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='sa(usuussduss)')
164     def AddRemoteCandidate(self, Candidate_ID, Transports):
165         """
166         Signal emitted when the connection manager wishes to inform the
167         client of a new remote candidate.
168       
169         """
170         pass
171   
172     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='')
173     def Close(self):
174         """
175         Signal emitted when the connection manager wishes the stream to be
176         closed.
177       
178         """
179         pass
180   
181     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='s')
182     def RemoveRemoteCandidate(self, Candidate_ID):
183         """
184         Signal emitted when the connection manager wishes to inform the
185         client that the remote end has removed a previously usable
186         candidate.
187
188         
189           It seemed like a good idea at the time, but wasn't.
190         
191       
192         """
193         pass
194   
195     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='ss')
196     def SetActiveCandidatePair(self, Native_Candidate_ID, Remote_Candidate_ID):
197         """
198         Emitted by the connection manager to inform the client that a
199         valid candidate pair has been discovered by the remote end
200         and streaming is in progress.
201       
202         """
203         pass
204   
205     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='a(sa(usuussduss))')
206     def SetRemoteCandidateList(self, Remote_Candidates):
207         """
208         Signal emitted when the connection manager wishes to inform the
209         client of all the available remote candidates at once.
210       
211         """
212         pass
213   
214     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='a(usuuua{ss})')
215     def SetRemoteCodecs(self, Codecs):
216         """
217         Signal emitted when the connection manager wishes to inform the
218         client of the codecs supported by the remote end.
219         If these codecs are compatible with the remote codecs, then the client
220         must call SupportedCodecs,
221         otherwise call Error.
222       
223         """
224         pass
225   
226     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='b')
227     def SetStreamPlaying(self, Playing):
228         """
229         If emitted with argument TRUE, this means that the connection manager
230         wishes to set the stream playing; this means that the streaming
231         implementation should expect to receive data. If emitted with argument
232         FALSE this signal is basically meaningless and should be ignored.
233
234         
235           We're very sorry.
236         
237       
238         """
239         pass
240   
241     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='b')
242     def SetStreamSending(self, Sending):
243         """
244         Signal emitted when the connection manager wishes to set whether or not
245         the stream sends to the remote end.
246       
247         """
248         pass
249   
250     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='y')
251     def StartTelephonyEvent(self, Event):
252         """
253         Request that a telephony event (as defined by RFC 4733) is transmitted
254         over this stream until StopTelephonyEvent is called.
255       
256         """
257         pass
258   
259     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='')
260     def StopTelephonyEvent(self):
261         """
262         Request that any ongoing telephony events (as defined by RFC 4733)
263         being transmitted over this stream are stopped.
264       
265         """
266         pass
267   
268     @dbus.service.signal('org.freedesktop.Telepathy.Media.StreamHandler', signature='b')
269     def SetStreamHeld(self, Held):
270         """
271         Emitted when the connection manager wishes to place the stream on
272           hold (so the streaming client should free hardware or software
273           resources) or take the stream off hold (so the streaming client
274           should reacquire the necessary resources).
275
276         When placing a channel's streams on hold, the connection manager
277           SHOULD notify the remote contact that this will be done (if
278           appropriate in the protocol) before it emits this signal.
279
280         
281           It is assumed that relinquishing a resource will not fail.
282             If it does, the call is probably doomed anyway.
283         
284
285         When unholding a channel's streams, the connection manager
286           SHOULD emit this signal and wait for success to be indicated
287           via HoldState before it notifies the remote contact that the
288           channel has been taken off hold.
289
290         
291           This means that if a resource is unavailable, the remote
292             contact will never even be told that we tried to acquire it.
293         
294       
295         """
296         pass
297