![]() |
![]() |
![]() |
telepathy-glib Reference Manual | ![]() |
---|---|---|---|---|
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); const gchar* tp_error_get_dbus_name (TpError error); #define TP_ERROR_STR_NETWORK_ERROR #define TP_ERROR_STR_NOT_IMPLEMENTED #define TP_ERROR_STR_INVALID_ARGUMENT #define TP_ERROR_STR_NOT_AVAILABLE #define TP_ERROR_STR_PERMISSION_DENIED #define TP_ERROR_STR_DISCONNECTED #define TP_ERROR_STR_INVALID_HANDLE #define TP_ERROR_STR_CHANNEL_BANNED #define TP_ERROR_STR_CHANNEL_FULL #define TP_ERROR_STR_CHANNEL_INVITE_ONLY #define TP_ERROR_STR_NOT_YOURS #define TP_ERROR_STR_CANCELLED #define TP_ERROR_STR_AUTHENTICATION_FAILED #define TP_ERROR_STR_ENCRYPTION_NOT_AVAILABLE #define TP_ERROR_STR_ENCRYPTION_ERROR #define TP_ERROR_STR_CERT_NOT_PROVIDED #define TP_ERROR_STR_CERT_UNTRUSTED #define TP_ERROR_STR_CERT_EXPIRED #define TP_ERROR_STR_CERT_NOT_ACTIVATED #define TP_ERROR_STR_CERT_FINGERPRINT_MISMATCH #define TP_ERROR_STR_CERT_HOSTNAME_MISMATCH #define TP_ERROR_STR_CERT_SELF_SIGNED #define TP_ERROR_STR_CERT_INVALID #define TP_ERROR_STR_NOT_CAPABLE #define TP_ERROR_STR_OFFLINE #define TP_ERROR_STR_CHANNEL_KICKED #define TP_ERROR_STR_BUSY #define TP_ERROR_STR_NO_ANSWER #define TP_ERROR_STR_DOES_NOT_EXIST #define TP_ERROR_STR_TERMINATED #define TP_ERROR_STR_CONNECTION_REFUSED #define TP_ERROR_STR_CONNECTION_FAILED #define TP_ERROR_STR_CONNECTION_LOST #define TP_ERROR_STR_ALREADY_CONNECTED #define TP_ERROR_STR_CONNECTION_REPLACED #define TP_ERROR_STR_REGISTRATION_EXISTS #define TP_ERROR_STR_SERVICE_BUSY #define TP_ERROR_STR_RESOURCE_UNAVAILABLE
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, TP_ERROR_CONNECTION_REFUSED, TP_ERROR_CONNECTION_FAILED, TP_ERROR_CONNECTION_LOST, TP_ERROR_ALREADY_CONNECTED, TP_ERROR_CONNECTION_REPLACED, TP_ERROR_REGISTRATION_EXISTS, TP_ERROR_SERVICE_BUSY, TP_ERROR_RESOURCE_UNAVAILABLE, } TpError;
Enumerated type representing the Telepathy D-Bus errors.
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.
type : |
An invalid handle type |
error : |
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.
type : |
An unsupported handle type |
error : |
Either NULL , or used to return an error (as for g_set_error)
|
const gchar* tp_error_get_dbus_name (TpError error);
error : |
a member of the TpError enum. |
Returns : | the D-Bus error name corresponding to error .
|
Since 0.7.31
#define TP_ERROR_STR_NETWORK_ERROR
The D-Bus error name org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network.
#define TP_ERROR_STR_NOT_IMPLEMENTED
The D-Bus error name org.freedesktop.Telepathy.Error.NotImplemented
Raised when the requested method, channel, etc is not available on this connection.
#define TP_ERROR_STR_INVALID_ARGUMENT
The D-Bus error name org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid.
#define TP_ERROR_STR_NOT_AVAILABLE
The D-Bus error name org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable.
#define TP_ERROR_STR_PERMISSION_DENIED
The D-Bus error name org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation.
#define TP_ERROR_STR_DISCONNECTED
The D-Bus error name 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 <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">StatusChanged</tp:dbus-ref> has signalled status Disconnected for reason None. <tp:rationale> The second usage corresponds to None in the <tp:type>Connection_Status_Reason</tp:type> enum; if a better reason is available, the corresponding error should be used instead. </tp:rationale>
#define TP_ERROR_STR_INVALID_HANDLE
The D-Bus error name org.freedesktop.Telepathy.Error.InvalidHandle
The handle specified is unknown on this channel or connection.
#define TP_ERROR_STR_CHANNEL_BANNED
The D-Bus error name org.freedesktop.Telepathy.Error.Channel.Banned
You are banned from the channel.
#define TP_ERROR_STR_CHANNEL_FULL
The D-Bus error name org.freedesktop.Telepathy.Error.Channel.Full
The channel is full.
#define TP_ERROR_STR_CHANNEL_INVITE_ONLY
The D-Bus error name org.freedesktop.Telepathy.Error.Channel.InviteOnly
The requested channel is invite-only.
#define TP_ERROR_STR_NOT_YOURS
The D-Bus error name org.freedesktop.Telepathy.Error.NotYours
<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The requested channel or other resource already exists, and another user interface in this session is responsible for it.</p> <p>User interfaces SHOULD handle this error unobtrusively, since it indicates that some other user interface is already processing the channel.</p>
#define TP_ERROR_STR_CANCELLED
The D-Bus error name 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). <tp:rationale> The second form can be used to correspond to the Requested member in the <tp:type>Connection_Status_Reason</tp:type> enum, or to to represent the situation where disconnecting a Connection, closing a Channel, etc. has been requested by the user but this request has not yet been acted on, for instance because the service will only act on the request when it has finished processing an event queue. </tp:rationale>
#define TP_ERROR_STR_AUTHENTICATION_FAILED
The D-Bus error name org.freedesktop.Telepathy.Error.AuthenticationFailed
Raised when authentication with a service was unsuccessful. <tp:rationale> This corresponds to Authentication_Failed in the <tp:type>Connection_Status_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_ENCRYPTION_NOT_AVAILABLE
The D-Bus error name org.freedesktop.Telepathy.Error.EncryptionNotAvailable
Raised if a user request insisted that encryption should be used, but encryption was not actually available. <tp:rationale> This corresponds to part of Encryption_Error in the <tp:type>Connection_Status_Reason</tp:type> enum. It's been separated into a distinct error here because the two concepts that were part of EncryptionError seem to be things that could reasonably appear differently in the UI. </tp:rationale>
#define TP_ERROR_STR_ENCRYPTION_ERROR
The D-Bus error name 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). <tp:rationale> This corresponds to part of Encryption_Error in the <tp:type>Connection_Status_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_CERT_NOT_PROVIDED
The D-Bus error name org.freedesktop.Telepathy.Error.Cert.NotProvided
Raised if the server did not provide a SSL/TLS certificate. This error MUST NOT be used to represent the absence of a client certificate provided by the Telepathy connection manager. <tp:rationale> This corresponds to Cert_Not_Provided in the <tp:type>Connection_Status_Reason</tp:type> enum. That error explicitly applied only to server SSL certificates, so this one is similarly limited; having the CM present a client certificate is a possible future feature, but it should have its own error handling. </tp:rationale>
#define TP_ERROR_STR_CERT_UNTRUSTED
The D-Bus error name org.freedesktop.Telepathy.Error.Cert.Untrusted
Raised if the server provided a SSL/TLS certificate signed by an untrusted certifying authority. This error SHOULD NOT be used to represent a self-signed certificate: see the Self Signed error for that. <tp:rationale> This corresponds to Cert_Untrusted in the <tp:type>Connection_Status_Reason</tp:type> enum, with a clarification to avoid ambiguity. </tp:rationale>
#define TP_ERROR_STR_CERT_EXPIRED
The D-Bus error name org.freedesktop.Telepathy.Error.Cert.Expired
Raised if the server provided an expired SSL/TLS certificate. <tp:rationale> This corresponds to Cert_Expired in the <tp:type>Connection_Status_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_CERT_NOT_ACTIVATED
The D-Bus error name 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. <tp:rationale> This corresponds to Cert_Not_Activated in the <tp:type>Connection_Status_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_CERT_FINGERPRINT_MISMATCH
The D-Bus error name org.freedesktop.Telepathy.Error.Cert.FingerprintMismatch
Raised if the server provided an SSL/TLS certificate that did not have the expected fingerprint. <tp:rationale> This corresponds to Cert_Fingerprint_Mismatch in the <tp:type>Connection_Status_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_CERT_HOSTNAME_MISMATCH
The D-Bus error name org.freedesktop.Telepathy.Error.Cert.HostnameMismatch
Raised if the server provided an SSL/TLS certificate that did not match its hostname. <tp:rationale> This corresponds to Cert_Hostname_Mismatch in the <tp:type>Connection_Status_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_CERT_SELF_SIGNED
The D-Bus error name org.freedesktop.Telepathy.Error.Cert.SelfSigned
Raised if the server provided an SSL/TLS certificate that is self-signed and untrusted. <tp:rationale> This corresponds to Cert_Hostname_Mismatch in the <tp:type>Connection_Status_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_CERT_INVALID
The D-Bus error name 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. <tp:rationale> This corresponds to Cert_Other_Error in the <tp:type>Connection_Status_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_NOT_CAPABLE
The D-Bus error name org.freedesktop.Telepathy.Error.NotCapable
Raised when requested functionality is unavailable due to contact not having required capabilities.
#define TP_ERROR_STR_OFFLINE
The D-Bus error name org.freedesktop.Telepathy.Error.Offline
Raised when requested functionality is unavailable because a contact is offline. <tp:rationale> This corresponds to Offline in the <tp:type>Channel_Group_Change_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_CHANNEL_KICKED
The D-Bus error name 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. <tp:rationale> This corresponds to Kicked in the <tp:type>Channel_Group_Change_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_BUSY
The D-Bus error name org.freedesktop.Telepathy.Error.Busy
Used to represent a user being removed from a channel because of a "busy" indication. This error SHOULD NOT be used to represent a server or other infrastructure being too busy to process a request - for that, see ServerBusy. <tp:rationale> This corresponds to Busy in the <tp:type>Channel_Group_Change_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_NO_ANSWER
The D-Bus error name 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. <tp:rationale> This corresponds to No_Answer in the <tp:type>Channel_Group_Change_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_DOES_NOT_EXIST
The D-Bus error name org.freedesktop.Telepathy.Error.DoesNotExist
Raised when the requested user does not, in fact, exist. <tp:rationale> This corresponds to Invalid_Contact in the <tp:type>Channel_Group_Change_Reason</tp:type> enum, but can also be used to represent other things not existing (like chatrooms, perhaps). </tp:rationale>
#define TP_ERROR_STR_TERMINATED
The D-Bus error name 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. <tp:rationale> This corresponds to None in the <tp:type>Channel_Group_Change_Reason</tp:type> enum. </tp:rationale>
#define TP_ERROR_STR_CONNECTION_REFUSED
The D-Bus error name org.freedesktop.Telepathy.Error.ConnectionRefused
Raised when a connection is refused.
#define TP_ERROR_STR_CONNECTION_FAILED
The D-Bus error name org.freedesktop.Telepathy.Error.ConnectionFailed
Raised when a connection can't be established.
#define TP_ERROR_STR_CONNECTION_LOST
The D-Bus error name org.freedesktop.Telepathy.Error.ConnectionLost
Raised when a connection is broken.
#define TP_ERROR_STR_ALREADY_CONNECTED
The D-Bus error name org.freedesktop.Telepathy.Error.AlreadyConnected
Raised when the user attempts to connect to an account but they are already connected (perhaps from another client or computer), and the protocol or account settings do not allow this. <tp:rationale> XMPP can have this behaviour if the user chooses the same resource in both clients (it is server-dependent whether the result is AlreadyConnected on the new connection, ConnectionReplaced on the old connection, or two successful connections). </tp:rationale>
#define TP_ERROR_STR_CONNECTION_REPLACED
The D-Bus error name org.freedesktop.Telepathy.Error.ConnectionReplaced
Raised by an existing connection to an account if it is replaced by a new connection (perhaps from another client or computer). <tp:rationale> In MSNP, when connecting twice with the same Passport, the new connection "wins" and the old one is automatically disconnected. XMPP can also have this behaviour if the user chooses the same resource in two clients (it is server-dependent whether the result is AlreadyConnected on the new connection, ConnectionReplaced on the old connection, or two successful connections). </tp:rationale>
#define TP_ERROR_STR_REGISTRATION_EXISTS
The D-Bus error name org.freedesktop.Telepathy.Error.RegistrationExists
Raised during in-band registration if the server indicates that the requested account already exists.
#define TP_ERROR_STR_SERVICE_BUSY
The D-Bus error name org.freedesktop.Telepathy.Error.ServiceBusy
<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> Raised if a server or some other piece of infrastructure cannot process the request, e.g. due to resource limitations. Clients MAY try again later. <tp:rationale> This is not the same error as Busy, which indicates that a <em>user</em> is busy. </tp:rationale>
#define TP_ERROR_STR_RESOURCE_UNAVAILABLE
The D-Bus error name org.freedesktop.Telepathy.Error.ResourceUnavailable
Raised if a request cannot be satisfied because a process local to the user has insufficient resources. Clients MAY try again later. <tp:rationale> For instance, the <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelDispatcher</tp:dbus-ref> might raise this error for some or all channel requests if it has detected that there is not enough free memory. </tp:rationale>