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