Include _generated now so I get all the latest fancy stuff
[theonering] / src / tp / _generated / Connection_Interface_Aliasing.py
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 
6
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.
11
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.
16
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.
20   
21 """
22
23 import dbus.service
24
25
26 class ConnectionInterfaceAliasing(dbus.service.Interface):
27     """\
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.
32
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.
38
39     Aliases are intended to be used as the main displayed name for the
40     contact, where available.
41     """
42
43     def __init__(self):
44         self._interfaces.add('org.freedesktop.Telepathy.Connection.Interface.Aliasing')
45
46     @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Aliasing', in_signature='', out_signature='u')
47     def GetAliasFlags(self):
48         """
49         Return a bitwise OR of flags detailing the behaviour of aliases on this
50         connection.
51       
52         """
53         raise NotImplementedError
54   
55     @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Aliasing', in_signature='au', out_signature='as')
56     def RequestAliases(self, Contacts):
57         """
58         Request the value of several contacts' aliases at once.
59       
60         """
61         raise NotImplementedError
62   
63     @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Aliasing', in_signature='au', out_signature='a{us}')
64     def GetAliases(self, Contacts):
65         """
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
71         AliasesChanged.
72       
73         """
74         raise NotImplementedError
75   
76     @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Aliasing', in_signature='a{us}', out_signature='')
77     def SetAliases(self, Aliases):
78         """
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).
84       
85         """
86         raise NotImplementedError
87   
88     @dbus.service.signal('org.freedesktop.Telepathy.Connection.Interface.Aliasing', signature='a(us)')
89     def AliasesChanged(self, Aliases):
90         """
91         Signal emitted when a contact's alias (or that of the user) is changed.
92       
93         """
94         pass
95