Lessons learned from looking at telepathy-python to better understand what it was...
[theonering] / src / channel / call.py
1 import logging
2
3 import telepathy
4
5
6 _moduleLogger = logging.getLogger("channel.call")
7
8
9 class CallChannel(
10                 telepathy.server.ChannelTypeStreamedMedia,
11                 telepathy.server.ChannelInterfaceCallState,
12         ):
13
14         def __init__(self, connection):
15                 h = None
16                 telepathy.server.ChannelTypeStreamedMedia.__init__(self, connection, h)
17                 telepathy.server.ChannelInterfaceGroup.__init__(self)
18                 telepathy.server.ChannelInterfaceChatState.__init__(self)
19
20         def ListStreams(self):
21                 """
22                 For org.freedesktop.Telepathy.Channel.Type.StreamedMedia
23                 """
24                 pass
25
26         def RemoveStreams(self, streams):
27                 """
28                 For org.freedesktop.Telepathy.Channel.Type.StreamedMedia
29                 """
30                 pass
31
32         def RequestStreamDirection(self, stream, streamDirection):
33                 """
34                 For org.freedesktop.Telepathy.Channel.Type.StreamedMedia
35
36                 @note Since streams are short lived, not bothering to implement this
37                 """
38                 _moduleLogger.info("A request was made to change the stream direction")
39
40         def RequestStreams(self, contact, streamType):
41                 """
42                 For org.freedesktop.Telepathy.Channel.Type.StreamedMedia
43
44                 @returns [(Stream ID, contact, stream type, stream state, stream direction, pending send flags)]
45                 """
46                 pass
47
48         def GetCallStates(self):
49                 """
50                 For org.freedesktop.Telepathy.Channel.Interface.CallState
51
52                 Get the current call states for all contacts involved in this call. 
53                 @returns {Contact: telepathy.constants.CHANNEL_CALL_STATE_*}
54                 """
55                 pass