1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """ Copyright (C) 2005, 2006 Collabora Limited
4 Copyright (C) 2005, 2006 Nokia Corporation
5 Copyright (C) 2006 INdT
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.
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.
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.
26 class ConnectionInterfaceAliasing(dbus.service.Interface):
28 An interface on connections to support protocols where contacts have an
29 alias which they can change at will. Provides a method for the user to set
30 their own alias, and a signal which should be emitted when a contact's
31 alias is changed or first discovered.
33 On connections where the user is allowed to set aliases for contacts and
34 store them on the server, the GetAliasFlags
35 method will have the CONNECTION_ALIAS_FLAG_USER_SET flag set, and the
36 SetAliases method may be called on contact
37 handles other than the user themselves.
39 Aliases are intended to be used as the main displayed name for the
40 contact, where available.
44 self._interfaces.add('org.freedesktop.Telepathy.Connection.Interface.Aliasing')
46 @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Aliasing', in_signature='', out_signature='u')
47 def GetAliasFlags(self):
49 Return a bitwise OR of flags detailing the behaviour of aliases on this
53 raise NotImplementedError
55 @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Aliasing', in_signature='au', out_signature='as')
56 def RequestAliases(self, Contacts):
58 Request the value of several contacts' aliases at once.
61 raise NotImplementedError
63 @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Aliasing', in_signature='au', out_signature='a{us}')
64 def GetAliases(self, Contacts):
66 Request the value of several contacts' aliases at once. This SHOULD
67 only return cached aliases, falling back on the contact identifier
68 (i.e. the string corresponding to the handle) if none is present. Also
69 if there was no cached alias, a request SHOULD be started of which the
70 result is later signalled by
74 raise NotImplementedError
76 @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Aliasing', in_signature='a{us}', out_signature='')
77 def SetAliases(self, Aliases):
79 Request that the alias of the given contact be changed. Success will be
80 indicated by emitting an AliasesChanged
81 signal. On connections where the CONNECTION_ALIAS_FLAG_USER_SET flag is
82 not set, this method will only ever succeed if the contact is the
83 user's own handle (as returned by Connection.GetSelfHandle).
86 raise NotImplementedError
88 @dbus.service.signal('org.freedesktop.Telepathy.Connection.Interface.Aliasing', signature='a(us)')
89 def AliasesChanged(self, Aliases):
91 Signal emitted when a contact's alias (or that of the user) is changed.