1 /* 2 * <telepathy-glib/errors.h> - Header for Telepathy error types 3 * Copyright (C) 2005-2009 Collabora Ltd. 4 * Copyright (C) 2005-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 St, Fifth Floor, Boston, MA 02110-1301 USA 19 */ 20 21 #if defined (TP_DISABLE_SINGLE_INCLUDE) && !defined (_TP_IN_META_HEADER) && !defined (_TP_COMPILATION) 22 #error "Only <telepathy-glib/telepathy-glib.h> and <telepathy-glib/telepathy-glib-dbus.h> can be included directly." 23 #endif 24 25 #ifndef __TP_ERRORS_H__ 26 #define __TP_ERRORS_H__ 27 28 #include <glib-object.h> 29 30 #include <telepathy-glib/defs.h> 31 32 #include <telepathy-glib/_gen/error-str.h> 33 #include <telepathy-glib/_gen/genums.h> 34 35 G_BEGIN_DECLS 36 37 #ifndef TP_DISABLE_DEPRECATED 38 _TP_DEPRECATED_FOR (TP_ERROR) 39 GQuark tp_errors_quark (void); 40 41 /* this is deliberately the old one, so that it expands to a call to a 42 * deprecated function, so that gcc will warn */ 43 #define TP_ERRORS (tp_errors_quark ()) 44 #endif 45 46 GQuark tp_error_quark (void); 47 48 #define TP_ERROR_PREFIX "org.freedesktop.Telepathy.Error" 49 50 #define TP_ERROR (tp_error_quark ()) 51 52 void tp_g_set_error_invalid_handle_type (guint type, GError **error); 53 void tp_g_set_error_unsupported_handle_type (guint type, GError **error); 54 55 typedef enum { 56 TP_ERROR_NETWORK_ERROR, /*< nick=NetworkError >*/ 57 TP_ERROR_NOT_IMPLEMENTED, /*< nick=NotImplemented >*/ 58 TP_ERROR_INVALID_ARGUMENT, /*< nick=InvalidArgument >*/ 59 TP_ERROR_NOT_AVAILABLE, /*< nick=NotAvailable >*/ 60 TP_ERROR_PERMISSION_DENIED, /*< nick=PermissionDenied >*/ 61 TP_ERROR_DISCONNECTED, /*< nick=Disconnected >*/ 62 TP_ERROR_INVALID_HANDLE, /*< nick=InvalidHandle >*/ 63 TP_ERROR_CHANNEL_BANNED, /*< nick=Channel.Banned >*/ 64 TP_ERROR_CHANNEL_FULL, /*< nick=Channel.Full >*/ 65 TP_ERROR_CHANNEL_INVITE_ONLY, /*< nick=Channel.InviteOnly >*/ 66 TP_ERROR_NOT_YOURS, /*< nick=NotYours >*/ 67 TP_ERROR_CANCELLED, /*< nick=Cancelled >*/ 68 TP_ERROR_AUTHENTICATION_FAILED, /*< nick=AuthenticationFailed >*/ 69 TP_ERROR_ENCRYPTION_NOT_AVAILABLE, /*< nick=EncryptionNotAvailable >*/ 70 TP_ERROR_ENCRYPTION_ERROR, /*< nick=EncryptionError >*/ 71 TP_ERROR_CERT_NOT_PROVIDED, /*< nick=Cert.NotProvided >*/ 72 TP_ERROR_CERT_UNTRUSTED, /*< nick=Cert.Untrusted >*/ 73 TP_ERROR_CERT_EXPIRED, /*< nick=Cert.Expired >*/ 74 TP_ERROR_CERT_NOT_ACTIVATED, /*< nick=Cert.NotActivated >*/ 75 TP_ERROR_CERT_FINGERPRINT_MISMATCH, /*< nick=Cert.FingerprintMismatch >*/ 76 TP_ERROR_CERT_HOSTNAME_MISMATCH, /*< nick=Cert.HostnameMismatch >*/ 77 TP_ERROR_CERT_SELF_SIGNED, /*< nick=Cert.SelfSigned >*/ 78 TP_ERROR_CERT_INVALID, /*< nick=Cert.Invalid >*/ 79 TP_ERROR_NOT_CAPABLE, /*< nick=NotCapable >*/ 80 TP_ERROR_OFFLINE, /*< nick=Offline >*/ 81 TP_ERROR_CHANNEL_KICKED, /*< nick=Channel.Kicked >*/ 82 TP_ERROR_BUSY, /*< nick=Busy >*/ 83 TP_ERROR_NO_ANSWER, /*< nick=NoAnswer >*/ 84 TP_ERROR_DOES_NOT_EXIST, /*< nick=DoesNotExist >*/ 85 TP_ERROR_TERMINATED, /*< nick=Terminated >*/ 86 TP_ERROR_CONNECTION_REFUSED, /*< nick=ConnectionRefused >*/ 87 TP_ERROR_CONNECTION_FAILED, /*< nick=ConnectionFailed >*/ 88 TP_ERROR_CONNECTION_LOST, /*< nick=ConnectionLost >*/ 89 TP_ERROR_ALREADY_CONNECTED, /*< nick=AlreadyConnected >*/ 90 TP_ERROR_CONNECTION_REPLACED, /*< nick=ConnectionReplaced >*/ 91 TP_ERROR_REGISTRATION_EXISTS, /*< nick=RegistrationExists >*/ 92 TP_ERROR_SERVICE_BUSY, /*< nick=ServiceBusy >*/ 93 TP_ERROR_RESOURCE_UNAVAILABLE, /*< nick=ResourceUnavailable >*/ 94 TP_ERROR_WOULD_BREAK_ANONYMITY, /*< nick=WouldBreakAnonymity >*/ 95 TP_ERROR_CERT_REVOKED, /*< nick=Cert.Revoked >*/ 96 TP_ERROR_CERT_INSECURE, /*< nick=Cert.Insecure >*/ 97 TP_ERROR_CERT_LIMIT_EXCEEDED, /*< nick=Cert.LimitExceeded >*/ 98 TP_ERROR_NOT_YET, /*< nick=NotYet >*/ 99 TP_ERROR_REJECTED, /*< nick=Rejected >*/ 100 TP_ERROR_PICKED_UP_ELSEWHERE, /*< nick=PickedUpElsewhere >*/ 101 TP_ERROR_CONFUSED, /*< nick=Confused >*/ 102 TP_ERROR_SERVICE_CONFUSED, /*< nick=ServiceConfused >*/ 103 TP_ERROR_EMERGENCY_CALLS_NOT_SUPPORTED, /*< nick=EmergencyCallsNotSupported >*/ 104 TP_ERROR_SOFTWARE_UPGRADE_REQUIRED, /*< nick=SoftwareUpgradeRequired >*/ 105 TP_ERROR_INSUFFICIENT_BALANCE, /*< nick=InsufficientBalance >*/ 106 TP_ERROR_MEDIA_CODECS_INCOMPATIBLE, /*< nick=Media.CodecsIncompatible >*/ 107 TP_ERROR_MEDIA_UNSUPPORTED_TYPE, /*< nick=Media.UnsupportedType >*/ 108 TP_ERROR_MEDIA_STREAMING_ERROR, /*< nick=Media.StreamingError >*/ 109 TP_ERROR_CAPTCHA_NOT_SUPPORTED, /*< nick=CaptchaNotSupported >*/ 110 } TpError; 111 112 const gchar *tp_error_get_dbus_name (TpError error); 113 114 G_END_DECLS 115 116 #endif 117