![]() |
![]() |
![]() |
telepathy-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
Telepathy protocol errorsTelepathy protocol errors — The errors from the Telepathy D-Bus spec, as a GLib error domain |
#include <telepathy-glib/errors.h> #define TP_ERROR_PREFIX #define TP_ERRORS #define TP_TYPE_ERROR enum TpError; void tp_g_set_error_invalid_handle_type (guint type, GError **error); void tp_g_set_error_unsupported_handle_type (guint type, GError **error);
This header provides the Telepathy D-Bus errors, in the form of a GLib error domain. For D-Bus methods which fail with one of these errors, dbus-glib will generate a reply message with the appropriate error.
It also provides utility functions used by functions which return an error.
#define TP_ERROR_PREFIX "org.freedesktop.Telepathy.Error"
The common prefix of Telepathy errors, as a string constant, without the trailing '.' character.
Since 0.7.1
#define TP_ERRORS (tp_errors_quark ())
The error domain for the D-Bus errors described in the Telepathy specification. Error codes in this domain come from the TpError enumeration.
This macro expands to a call to a function returning the Telepathy error
domain. Since 0.7.17, this function automatically registers the domain with
dbus-glib for server-side use (using dbus_g_error_domain_register()
) when
called.
#define TP_TYPE_ERROR (tp_error_get_type())
The GType of the Telepathy error enumeration.
typedef enum { TP_ERROR_NETWORK_ERROR, TP_ERROR_NOT_IMPLEMENTED, TP_ERROR_INVALID_ARGUMENT, TP_ERROR_NOT_AVAILABLE, TP_ERROR_PERMISSION_DENIED, TP_ERROR_DISCONNECTED, TP_ERROR_INVALID_HANDLE, TP_ERROR_CHANNEL_BANNED, TP_ERROR_CHANNEL_FULL, TP_ERROR_CHANNEL_INVITE_ONLY, TP_ERROR_NOT_YOURS, TP_ERROR_CANCELLED, TP_ERROR_AUTHENTICATION_FAILED, TP_ERROR_ENCRYPTION_NOT_AVAILABLE, TP_ERROR_ENCRYPTION_ERROR, TP_ERROR_CERT_NOT_PROVIDED, TP_ERROR_CERT_UNTRUSTED, TP_ERROR_CERT_EXPIRED, TP_ERROR_CERT_NOT_ACTIVATED, TP_ERROR_CERT_FINGERPRINT_MISMATCH, TP_ERROR_CERT_HOSTNAME_MISMATCH, TP_ERROR_CERT_SELF_SIGNED, TP_ERROR_CERT_INVALID, TP_ERROR_NOT_CAPABLE, TP_ERROR_OFFLINE, TP_ERROR_CHANNEL_KICKED, TP_ERROR_BUSY, TP_ERROR_NO_ANSWER, TP_ERROR_DOES_NOT_EXIST, TP_ERROR_TERMINATED, } TpError;
Enumerated type representing the Telepathy D-Bus errors.
org.freedesktop.Telepathy.Error.NetworkError: Raised when there is an error reading from or writing to the network. | |
org.freedesktop.Telepathy.Error.NotImplemented: Raised when the requested method, channel, etc is not available on this connection. | |
org.freedesktop.Telepathy.Error.InvalidArgument: Raised when one of the provided arguments is invalid. | |
org.freedesktop.Telepathy.Error.NotAvailable: Raised when the requested functionality is temporarily unavailable. | |
org.freedesktop.Telepathy.Error.PermissionDenied: The user is not permitted to perform the requested operation. | |
org.freedesktop.Telepathy.Error.Disconnected: The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None. | |
org.freedesktop.Telepathy.Error.InvalidHandle: An identifier being converted to a handle was syntactically invalid, or an invalid handle was used. | |
org.freedesktop.Telepathy.Error.Channel.Banned: You are banned from the channel. | |
org.freedesktop.Telepathy.Error.Channel.Full: The channel is full. | |
org.freedesktop.Telepathy.Error.Channel.InviteOnly: The requested channel is invite-only. | |
org.freedesktop.Telepathy.Error.NotYours: The requested channel or other resource already exists, and another client is responsible for it | |
org.freedesktop.Telepathy.Error.Cancelled: Raised by an ongoing request if it is cancelled by user request before it has completed, or when operations are performed on an object which the user has asked to close (for instance, a Connection where the user has called Disconnect, or a Channel where the user has called Close). | |
org.freedesktop.Telepathy.Error.AuthenticationFailed: Raised when authentication with a service was unsuccessful. | |
org.freedesktop.Telepathy.Error.EncryptionNotAvailable: Raised if a user request insisted that encryption should be used, but encryption was not actually available. | |
org.freedesktop.Telepathy.Error.EncryptionError: Raised if encryption appears to be available, but could not actually be used (for instance if SSL/TLS negotiation fails). | |
org.freedesktop.Telepathy.Error.Cert.NotProvided: Raised if the server did not provide a SSL/TLS certificate. | |
org.freedesktop.Telepathy.Error.Cert.Untrusted: Raised if the server provided a SSL/TLS certificate signed by an untrusted certifying authority. | |
org.freedesktop.Telepathy.Error.Cert.Expired: Raised if the server provided an expired SSL/TLS certificate. | |
org.freedesktop.Telepathy.Error.Cert.NotActivated: Raised if the server provided an SSL/TLS certificate that will become valid at some point in the future. | |
org.freedesktop.Telepathy.Error.Cert.FingerprintMismatch: Raised if the server provided an SSL/TLS certificate that did not have the expected fingerprint. | |
org.freedesktop.Telepathy.Error.Cert.HostnameMismatch: Raised if the server provided an SSL/TLS certificate that did not match its hostname. | |
org.freedesktop.Telepathy.Error.Cert.SelfSigned: Raised if the server provided an SSL/TLS certificate that is self-signed and untrusted. | |
org.freedesktop.Telepathy.Error.Cert.Invalid: Raised if the server provided an SSL/TLS certificate that is unacceptable in some way that does not have a more specific error. | |
org.freedesktop.Telepathy.Error.NotCapable: Raised when requested functionality is unavailable due to a contact not having the required capabilities. | |
org.freedesktop.Telepathy.Error.Offline: Raised when requested functionality is unavailable because a contact is offline. | |
org.freedesktop.Telepathy.Error.Channel.Kicked: Used to represent a user being ejected from a channel by another user, for instance being kicked from a chatroom. | |
org.freedesktop.Telepathy.Error.Busy: Used to represent a user being removed from a channel because of a "busy" indication. | |
org.freedesktop.Telepathy.Error.NoAnswer: Used to represent a user being removed from a channel because they did not respond, e.g. to a StreamedMedia call. | |
org.freedesktop.Telepathy.Error.DoesNotExist: Raised when the requested user does not, in fact, exist. | |
org.freedesktop.Telepathy.Error.Terminated: Raised when a channel is terminated for an unspecified reason. In particular, this error SHOULD be used whenever normal termination of a 1-1 StreamedMedia call by the remote user is represented as a D-Bus error name. |
void tp_g_set_error_invalid_handle_type (guint type, GError **error);
Set the error NotImplemented for an invalid handle type, with an appropriate message.
Changed in version 0.7.23: previously, the error was InvalidArgument.
|
An invalid handle type |
|
Either NULL , or used to return an error (as for g_set_error)
|
void tp_g_set_error_unsupported_handle_type (guint type, GError **error);
Set the error NotImplemented for a handle type which is valid but is not supported by this connection manager, with an appropriate message.
Changed in version 0.7.23: previously, the error was InvalidArgument.
|
An unsupported handle type |
|
Either NULL , or used to return an error (as for g_set_error)
|