1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
4 Copyright © 2005-2009 Collabora Limited
5 Copyright © 2005-2009 Nokia Corporation
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 class ChannelInterfacePassword(dbus.service.Interface):
30 Interface for channels that may have a password set that users need
31 to provide before being able to join, or may be able to view or change
32 once they have joined the channel.
34 The GetPasswordFlags method and the
35 associated PasswordFlagsChanged
36 signal indicate whether the channel has a password, whether the user
37 must now provide it to join, and whether it can be viewed or changed
42 self._interfaces.add('org.freedesktop.Telepathy.Channel.Interface.Password')
44 @dbus.service.method('org.freedesktop.Telepathy.Channel.Interface.Password', in_signature='', out_signature='u')
45 def GetPasswordFlags(self):
47 Returns the bitwise-OR of the flags relevant to the password on this
48 channel. The user interface can use this to present information about
49 which operations are currently valid.
52 raise NotImplementedError
54 @dbus.service.method('org.freedesktop.Telepathy.Channel.Interface.Password', in_signature='s', out_signature='b')
55 def ProvidePassword(self, Password):
57 Provide the password so that the channel can be joined. Must be
58 called with the correct password in order for channel joining to
59 proceed if the 'provide' password flag is set.
62 raise NotImplementedError
64 @dbus.service.signal('org.freedesktop.Telepathy.Channel.Interface.Password', signature='uu')
65 def PasswordFlagsChanged(self, Added, Removed):
67 Emitted when the flags as returned by
68 GetPasswordFlags are changed.
69 The user interface should be updated as appropriate.