519d58f7535a97faa70991702451b6fee4207120
[theonering] / src / tp / _generated / Account.py
1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """Copyright © 2008-2009 Collabora Ltd.
4 Copyright © 2008-2009 Nokia Corporation
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
20   
21 """
22
23 import dbus.service
24
25
26 class Account(dbus.service.Object):
27     """\
28       An Account object encapsulates the necessary details to make a
29         Telepathy connection.
30
31       Accounts are uniquely identified by object path. The object path
32         of an Account MUST take the form
33         /org/freedesktop/Telepathy/Account/cm/proto/acct, where:
34
35       
36         cm is the same Connection_Manager_Name
37           that appears in the connection manager's well-known bus name and
38           object path
39         proto is the Protocol name as seen in
40           ConnectionManager.ListProtocols,
41           but with "-" replaced with "_"
42           (i.e. the same as in the object-path of a Connection)
43         acct is an arbitrary string of ASCII letters, digits
44           and underscores, starting with a letter or underscore, which
45           uniquely identifies this account
46         Clients SHOULD parse the object path to discover the
47           connection manager and protocol
48         Clients MUST NOT attempt to parse acct
49         Clients MUST NOT assume that acct matches
50           the connection-specific part of a Connection's object-path and
51           bus name
52         The account manager SHOULD choose acct such that if
53           an account is deleted, its object path will be re-used if and only
54           if the new account is in some sense "the same"
55           (incorporating the 'account' parameter in some way is
56           recommended)
57       
58
59       
60         This API avoids specifying the "profiles" used in Mission Control
61           4.x or the "presets" that have been proposed to replace them. An
62           optional interface will be provided for AM implementations
63           that want to provide presets.
64
65         There is deliberately no functionality here for opening channels;
66           we intend to provide that in the channel dispatcher.
67
68         Other missing features which would be better in their own
69           interfaces:
70
71         
72           dynamic parameter-providing (aka provisioning)
73           saved server capabilities
74           account conditions
75           account grouping
76         
77       
78
79     """
80
81     @dbus.service.method('org.freedesktop.Telepathy.Account', in_signature='', out_signature='')
82     def Remove(self):
83         """Delete the account.
84         """
85         raise NotImplementedError
86   
87     @dbus.service.method('org.freedesktop.Telepathy.Account', in_signature='a{sv}as', out_signature='as')
88     def UpdateParameters(self, Set, Unset):
89         """
90         Change the value of the Parameters
91           property.
92
93         If any of the changed parameters'
94           Conn_Mgr_Param_Flags include
95           DBus_Property, the change will be applied to the
96           corresponding D-Bus Property on the active
97           Connection, if there is one. Changes to
98           other parameters will not take effect until the next time the account
99           is disconnected and reconnected.
100
101         
102           In general, reconnecting is a destructive operation that shouldn't
103             happen as a side-effect. In particular, migration tools that
104             twiddle the settings of all accounts shouldn't cause an automatic
105             disconnect and reconnect.
106         
107       
108         """
109         raise NotImplementedError
110   
111     @dbus.service.method('org.freedesktop.Telepathy.Account', in_signature='', out_signature='')
112     def Reconnect(self):
113         """
114         Re-connect this account. If the account is currently disconnected
115           and the requested presence is offline, or if the account
116           is not Enabled or not
117           Valid, this does nothing.
118
119         If the account is disconnected and the requested presence is not
120           offline, this forces an attempt to connect with the requested
121           presence immediately.
122
123         If the account is connecting or connected, this is equivalent to
124           remembering the current value of
125           RequestedPresence, setting its value
126           to (OFFLINE, "offline", ""), waiting for the change to take effect,
127           then setting its value to the value that was previously
128           remembered.
129
130         
131           Clients desiring "instant apply" semantics for CM parameters MAY
132             call this method to achieve that.
133         
134
135         In particular, if the account's
136           Connection is in the Connecting
137           state, calling this method causes the attempt to connect to be
138           aborted and re-tried.
139
140         
141           This is necessary to ensure that the new parameters are
142             picked up.
143         
144       
145         """
146         raise NotImplementedError
147   
148     @dbus.service.signal('org.freedesktop.Telepathy.Account', signature='')
149     def Removed(self):
150         """
151         This account has been removed.
152
153         
154           This is redundant with AccountRemoved,
155           but it's still worth having,
156           to avoid having to bind to AccountManager.AccountRemoved to tell
157           you whether your Account is valid — ideally, an account-editing UI
158           should only care about a single Account.
159         
160       
161         """
162         pass
163   
164     @dbus.service.signal('org.freedesktop.Telepathy.Account', signature='a{sv}')
165     def AccountPropertyChanged(self, Properties):
166         """
167         The values of one or more properties on this interface (that do not
168         specify that this signal does not apply to them) may have changed.
169         This does not cover properties of other interfaces, which must
170         provide their own change notification if appropriate.
171       
172         """
173         pass
174