1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """ Copyright (C) 2007 Collabora Limited
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 class ChannelInterfaceChatState(dbus.service.Interface):
26 An interface for channels for receiving notifications of remote contacts'
27 state, and for notifying remote contacts of the local state.
29 Clients should assume that a contact's state is Channel_Chat_State_Inactive
30 unless they receive a notification otherwise.
32 The Channel_Chat_State_Gone state is treated differently to other states:
34 It may not be used for multi-user chats
35 It may not be explicitly sent
36 It should be automatically sent when the channel is closed
37 It must not be sent to the peer if a channel is closed without being used
38 Receiving it must not cause a new channel to be opened
41 The different states are defined by XEP-0085, but may be applied to any suitable protocol.
45 self._interfaces.add('org.freedesktop.Telepathy.Channel.Interface.ChatState')
47 @dbus.service.method('org.freedesktop.Telepathy.Channel.Interface.ChatState', in_signature='u', out_signature='')
48 def SetChatState(self, State):
50 Set the local state and notify other members of the channel that it
54 raise NotImplementedError
56 @dbus.service.signal('org.freedesktop.Telepathy.Channel.Interface.ChatState', signature='uu')
57 def ChatStateChanged(self, Contact, State):
59 Emitted when the state of a member of the channel has changed.
60 This includes local state.