What I said was 0.8.15 was really 0.8.16
[theonering] / src / tp / _generated / errors.py
1 # -*- coding: utf-8 -*-
2     
3 """Exception classes, generated from the Telepathy spec
4
5 Copyright © 2005-2009 Collabora Limited
6 Copyright © 2005-2009 Nokia Corporation
7
8
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.
13
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.
18
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.
22   
23 """
24
25 from dbus import DBusException
26
27 __all__ = (
28 "NetworkError",
29 "NotImplemented",
30 "InvalidArgument",
31 "NotAvailable",
32 "PermissionDenied",
33 "Disconnected",
34 "InvalidHandle",
35 "ChannelBanned",
36 "ChannelFull",
37 "ChannelInviteOnly",
38 "NotYours",
39 "Cancelled",
40 "AuthenticationFailed",
41 "EncryptionNotAvailable",
42 "EncryptionError",
43 "CertNotProvided",
44 "CertUntrusted",
45 "CertExpired",
46 "CertNotActivated",
47 "CertFingerprintMismatch",
48 "CertHostnameMismatch",
49 "CertSelfSigned",
50 "CertInvalid",
51 "NotCapable",
52 "Offline",
53 "ChannelKicked",
54 "Busy",
55 "NoAnswer",
56 "DoesNotExist",
57 "Terminated",
58 "ConnectionRefused",
59 "ConnectionFailed",
60 "ConnectionLost",
61 "AlreadyConnected",
62 "ConnectionReplaced",
63 "RegistrationExists",
64 "ServiceBusy",
65 "ResourceUnavailable",
66 )
67
68
69 class NetworkError(DBusException):
70     """\
71     Raised when there is an error reading from or writing to the network.
72     
73     """
74     _dbus_error_name = 'org.freedesktop.Telepathy.Error.NetworkError'
75   
76 class NotImplemented(DBusException):
77     """\
78     Raised when the requested method, channel, etc is not available on this connection.
79     
80     """
81     _dbus_error_name = 'org.freedesktop.Telepathy.Error.NotImplemented'
82   
83 class InvalidArgument(DBusException):
84     """\
85     Raised when one of the provided arguments is invalid.
86     
87     """
88     _dbus_error_name = 'org.freedesktop.Telepathy.Error.InvalidArgument'
89   
90 class NotAvailable(DBusException):
91     """\
92     Raised when the requested functionality is temporarily unavailable.
93     
94     """
95     _dbus_error_name = 'org.freedesktop.Telepathy.Error.NotAvailable'
96   
97 class PermissionDenied(DBusException):
98     """\
99     The user is not permitted to perform the requested operation.
100     
101     """
102     _dbus_error_name = 'org.freedesktop.Telepathy.Error.PermissionDenied'
103   
104 class Disconnected(DBusException):
105     """\
106       The connection is not currently connected and cannot be used.
107       This error may also be raised when operations are performed on a
108       Connection for which
109       StatusChanged
110       has signalled status Disconnected for reason None.
111
112       
113         The second usage corresponds to None in the
114         Connection_Status_Reason enum; if a better reason
115         is available, the corresponding error should be used instead.
116       
117     
118     """
119     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Disconnected'
120   
121 class InvalidHandle(DBusException):
122     """\
123     The handle specified is unknown on this channel or connection.
124     
125     """
126     _dbus_error_name = 'org.freedesktop.Telepathy.Error.InvalidHandle'
127   
128 class ChannelBanned(DBusException):
129     """\
130     You are banned from the channel.
131     
132     """
133     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Channel.Banned'
134   
135 class ChannelFull(DBusException):
136     """\
137     The channel is full.
138     
139     """
140     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Channel.Full'
141   
142 class ChannelInviteOnly(DBusException):
143     """\
144     The requested channel is invite-only.
145     
146     """
147     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Channel.InviteOnly'
148   
149 class NotYours(DBusException):
150     """\
151       The requested channel or other resource already exists, and another
152         user interface in this session is responsible for it.
153
154       User interfaces SHOULD handle this error unobtrusively, since it
155         indicates that some other user interface is already processing the
156         channel.
157     
158     """
159     _dbus_error_name = 'org.freedesktop.Telepathy.Error.NotYours'
160   
161 class Cancelled(DBusException):
162     """\
163       Raised by an ongoing request if it is cancelled by user request before
164       it has completed, or when operations are performed on an object which
165       the user has asked to close (for instance, a Connection where the user
166       has called Disconnect, or a Channel where the user has called Close).
167
168       
169         The second form can be used to correspond to the Requested member in
170         the Connection_Status_Reason enum, or to
171         to represent the situation where disconnecting a Connection,
172         closing a Channel, etc. has been requested by the user but this
173         request has not yet been acted on, for instance because the
174         service will only act on the request when it has finished processing
175         an event queue.
176       
177     
178     """
179     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Cancelled'
180   
181 class AuthenticationFailed(DBusException):
182     """\
183       Raised when authentication with a service was unsuccessful.
184       
185         This corresponds to Authentication_Failed in the
186         Connection_Status_Reason enum.
187       
188     
189     """
190     _dbus_error_name = 'org.freedesktop.Telepathy.Error.AuthenticationFailed'
191   
192 class EncryptionNotAvailable(DBusException):
193     """\
194       Raised if a user request insisted that encryption should be used,
195       but encryption was not actually available.
196
197       
198         This corresponds to part of Encryption_Error in the
199         Connection_Status_Reason enum. It's been separated
200         into a distinct error here because the two concepts that were part
201         of EncryptionError seem to be things that could reasonably appear
202         differently in the UI.
203       
204     
205     """
206     _dbus_error_name = 'org.freedesktop.Telepathy.Error.EncryptionNotAvailable'
207   
208 class EncryptionError(DBusException):
209     """\
210       Raised if encryption appears to be available, but could not actually be
211       used (for instance if SSL/TLS negotiation fails).
212       
213         This corresponds to part of Encryption_Error in the
214         Connection_Status_Reason enum.
215       
216     
217     """
218     _dbus_error_name = 'org.freedesktop.Telepathy.Error.EncryptionError'
219   
220 class CertNotProvided(DBusException):
221     """\
222       Raised if the server did not provide a SSL/TLS certificate. This error
223       MUST NOT be used to represent the absence of a client certificate
224       provided by the Telepathy connection manager.
225       
226         This corresponds to Cert_Not_Provided in the
227         Connection_Status_Reason enum. That error
228         explicitly applied only to server SSL certificates, so this one
229         is similarly limited; having the CM present a client certificate
230         is a possible future feature, but it should have its own error
231         handling.
232       
233     
234     """
235     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Cert.NotProvided'
236   
237 class CertUntrusted(DBusException):
238     """\
239       Raised if the server provided a SSL/TLS certificate signed by an
240       untrusted certifying authority. This error SHOULD NOT be used to
241       represent a self-signed certificate: see the Self Signed error for that.
242       
243         This corresponds to Cert_Untrusted in the
244         Connection_Status_Reason enum, with a clarification
245         to avoid ambiguity.
246       
247     
248     """
249     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Cert.Untrusted'
250   
251 class CertExpired(DBusException):
252     """\
253       Raised if the server provided an expired SSL/TLS certificate.
254       
255         This corresponds to Cert_Expired in the
256         Connection_Status_Reason enum.
257       
258     
259     """
260     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Cert.Expired'
261   
262 class CertNotActivated(DBusException):
263     """\
264       Raised if the server provided an SSL/TLS certificate that will become
265       valid at some point in the future.
266       
267         This corresponds to Cert_Not_Activated in the
268         Connection_Status_Reason enum.
269       
270     
271     """
272     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Cert.NotActivated'
273   
274 class CertFingerprintMismatch(DBusException):
275     """\
276       Raised if the server provided an SSL/TLS certificate that did not have
277       the expected fingerprint.
278       
279         This corresponds to Cert_Fingerprint_Mismatch in the
280         Connection_Status_Reason enum.
281       
282     
283     """
284     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Cert.FingerprintMismatch'
285   
286 class CertHostnameMismatch(DBusException):
287     """\
288       Raised if the server provided an SSL/TLS certificate that did not match
289       its hostname.
290       
291         This corresponds to Cert_Hostname_Mismatch in the
292         Connection_Status_Reason enum.
293       
294     
295     """
296     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Cert.HostnameMismatch'
297   
298 class CertSelfSigned(DBusException):
299     """\
300       Raised if the server provided an SSL/TLS certificate that is self-signed
301       and untrusted.
302       
303         This corresponds to Cert_Hostname_Mismatch in the
304         Connection_Status_Reason enum.
305       
306     
307     """
308     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Cert.SelfSigned'
309   
310 class CertInvalid(DBusException):
311     """\
312       Raised if the server provided an SSL/TLS certificate that is
313       unacceptable in some way that does not have a more specific error.
314       
315         This corresponds to Cert_Other_Error in the
316         Connection_Status_Reason enum.
317       
318     
319     """
320     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Cert.Invalid'
321   
322 class NotCapable(DBusException):
323     """\
324     Raised when requested functionality is unavailable due to contact
325     not having required capabilities.
326     
327     """
328     _dbus_error_name = 'org.freedesktop.Telepathy.Error.NotCapable'
329   
330 class Offline(DBusException):
331     """\
332       Raised when requested functionality is unavailable because a contact is
333       offline.
334
335       
336         This corresponds to Offline in the
337         Channel_Group_Change_Reason enum.
338       
339     
340     """
341     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Offline'
342   
343 class ChannelKicked(DBusException):
344     """\
345       Used to represent a user being ejected from a channel by another user,
346       for instance being kicked from a chatroom.
347
348       
349         This corresponds to Kicked in the
350         Channel_Group_Change_Reason enum.
351       
352     
353     """
354     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Channel.Kicked'
355   
356 class Busy(DBusException):
357     """\
358       Used to represent a user being removed from a channel because of a
359       "busy" indication. This error SHOULD NOT be used to represent a server
360       or other infrastructure being too busy to process a request - for that,
361       see ServerBusy.
362
363       
364         This corresponds to Busy in the
365         Channel_Group_Change_Reason enum.
366       
367     
368     """
369     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Busy'
370   
371 class NoAnswer(DBusException):
372     """\
373       Used to represent a user being removed from a channel because they did
374       not respond, e.g. to a StreamedMedia call.
375
376       
377         This corresponds to No_Answer in the
378         Channel_Group_Change_Reason enum.
379       
380     
381     """
382     _dbus_error_name = 'org.freedesktop.Telepathy.Error.NoAnswer'
383   
384 class DoesNotExist(DBusException):
385     """\
386       Raised when the requested user does not, in fact, exist.
387
388       
389         This corresponds to Invalid_Contact in the
390         Channel_Group_Change_Reason enum, but can also be
391         used to represent other things not existing (like chatrooms, perhaps).
392       
393     
394     """
395     _dbus_error_name = 'org.freedesktop.Telepathy.Error.DoesNotExist'
396   
397 class Terminated(DBusException):
398     """\
399       Raised when a channel is terminated for an unspecified reason. In
400       particular, this error SHOULD be used whenever normal termination of
401       a 1-1 StreamedMedia call by the remote user is represented as a D-Bus
402       error name.
403
404       
405         This corresponds to None in the
406         Channel_Group_Change_Reason enum.
407       
408     
409     """
410     _dbus_error_name = 'org.freedesktop.Telepathy.Error.Terminated'
411   
412 class ConnectionRefused(DBusException):
413     """\
414       Raised when a connection is refused.
415     
416     """
417     _dbus_error_name = 'org.freedesktop.Telepathy.Error.ConnectionRefused'
418   
419 class ConnectionFailed(DBusException):
420     """\
421       Raised when a connection can't be established.
422     
423     """
424     _dbus_error_name = 'org.freedesktop.Telepathy.Error.ConnectionFailed'
425   
426 class ConnectionLost(DBusException):
427     """\
428       Raised when a connection is broken.
429     
430     """
431     _dbus_error_name = 'org.freedesktop.Telepathy.Error.ConnectionLost'
432   
433 class AlreadyConnected(DBusException):
434     """\
435       Raised when the user attempts to connect to an account but they are
436       already connected (perhaps from another client or computer), and the
437       protocol or account settings do not allow this.
438
439       
440         XMPP can have this behaviour if the user chooses the same resource
441         in both clients (it is server-dependent whether the result is
442         AlreadyConnected on the new connection, ConnectionReplaced on the
443         old connection, or two successful connections).
444       
445     
446     """
447     _dbus_error_name = 'org.freedesktop.Telepathy.Error.AlreadyConnected'
448   
449 class ConnectionReplaced(DBusException):
450     """\
451       Raised by an existing connection to an account if it is replaced by
452       a new connection (perhaps from another client or computer).
453
454       
455         In MSNP, when connecting twice with the same Passport, the new
456         connection "wins" and the old one is automatically disconnected.
457         XMPP can also have this behaviour if the user chooses the same
458         resource in two clients (it is server-dependent whether the result is
459         AlreadyConnected on the new connection, ConnectionReplaced on the
460         old connection, or two successful connections).
461       
462     
463     """
464     _dbus_error_name = 'org.freedesktop.Telepathy.Error.ConnectionReplaced'
465   
466 class RegistrationExists(DBusException):
467     """\
468       Raised during in-band registration if the server indicates that the
469       requested account already exists.
470     
471     """
472     _dbus_error_name = 'org.freedesktop.Telepathy.Error.RegistrationExists'
473   
474 class ServiceBusy(DBusException):
475     """\
476       Raised if a server or some other piece of infrastructure cannot process
477       the request, e.g. due to resource limitations. Clients MAY try again
478       later.
479
480       
481         This is not the same error as Busy, which indicates that a
482         user is busy.
483       
484     
485     """
486     _dbus_error_name = 'org.freedesktop.Telepathy.Error.ServiceBusy'
487   
488 class ResourceUnavailable(DBusException):
489     """\
490       Raised if a request cannot be satisfied because a process local to the
491       user has insufficient resources. Clients MAY try again
492       later.
493
494       
495         For instance, the ChannelDispatcher
496         might raise this error for some or all channel requests if it has
497         detected that there is not enough free memory.
498       
499     
500     """
501     _dbus_error_name = 'org.freedesktop.Telepathy.Error.ResourceUnavailable'
502