| 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_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_ERRORS tp_errors_quark ()
The error domain for the D-Bus errors described in the Telepathy specification.
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,
} 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. | |
| org.freedesktop.Telepathy.Error.InvalidHandle: The contact name specified is unknown on this channel or connection. | |
| 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. |
void tp_g_set_error_invalid_handle_type (guint type,
GError **error);
Set the error InvalidArgument corresponding to an invalid handle type, with an appropriate message.
|
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 InvalidArgument for a handle type which is valid but is not supported by this connection manager, with an appropriate message.
FIXME: Shouldn't the error be NotImplemented? The spec doesn't always allow us to return that, though.
|
An unsupported handle type |
|
Either NULL, or used to return an error (as for g_set_error)
|