1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """Copyright © 2008-2009 Collabora Ltd.
4 Copyright © 2008-2009 Nokia Corporation
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.
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.
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.
26 class Account(dbus.service.Object):
28 An Account object encapsulates the necessary details to make a
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:
36 cm is the same Connection_Manager_Name
37 that appears in the connection manager's well-known bus name and
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
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
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.
65 There is deliberately no functionality here for opening channels;
66 we intend to provide that in the channel dispatcher.
68 Other missing features which would be better in their own
72 dynamic parameter-providing (aka provisioning)
73 saved server capabilities
81 @dbus.service.method('org.freedesktop.Telepathy.Account', in_signature='', out_signature='')
83 """Delete the account.
85 raise NotImplementedError
87 @dbus.service.method('org.freedesktop.Telepathy.Account', in_signature='a{sv}as', out_signature='as')
88 def UpdateParameters(self, Set, Unset):
90 Change the value of the Parameters
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.
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.
109 raise NotImplementedError
111 @dbus.service.method('org.freedesktop.Telepathy.Account', in_signature='', out_signature='')
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.
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.
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
131 Clients desiring "instant apply" semantics for CM parameters MAY
132 call this method to achieve that.
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.
141 This is necessary to ensure that the new parameters are
146 raise NotImplementedError
148 @dbus.service.signal('org.freedesktop.Telepathy.Account', signature='')
151 This account has been removed.
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.
164 @dbus.service.signal('org.freedesktop.Telepathy.Account', signature='a{sv}')
165 def AccountPropertyChanged(self, Properties):
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.