|  |  |  | Wocky Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#define WOCKY_JINGLE_ERROR #define WOCKY_SI_ERROR #define WOCKY_XMPP_ERROR #define WOCKY_XMPP_STREAM_ERROR enum WockyJingleError; enum WockySIError; enum WockyXmppError; struct WockyXmppErrorDomain; struct WockyXmppErrorSpecialization; enum WockyXmppErrorType; enum WockyXmppStreamError; GQuark wocky_jingle_error_quark (void); GQuark wocky_si_error_quark (void); WockyNode * wocky_stanza_error_to_node (const GError *error,WockyNode *parent_node); void wocky_xmpp_error_deinit (void); const gchar * wocky_xmpp_error_description (WockyXmppError error); void wocky_xmpp_error_extract (WockyNode *error,WockyXmppErrorType *type,GError **core,GError **specialized,WockyNode **specialized_node); void wocky_xmpp_error_init (void); GQuark wocky_xmpp_error_quark (void); void wocky_xmpp_error_register_domain (WockyXmppErrorDomain *domain); const gchar * wocky_xmpp_error_string (WockyXmppError error); const gchar * wocky_xmpp_stanza_error_to_string (GError *error); GError * wocky_xmpp_stream_error_from_node (WockyNode *error); GQuark wocky_xmpp_stream_error_quark (void);
GEnum +----WockyJingleError
GEnum +----WockySIError
GEnum +----WockyXmppError
GEnum +----WockyXmppErrorType
GEnum +----WockyXmppStreamError
#define WOCKY_XMPP_STREAM_ERROR (wocky_xmpp_stream_error_quark ())
Get access to the error quark of the xmpp stream errors.
typedef enum {
    WOCKY_JINGLE_ERROR_OUT_OF_ORDER,
    WOCKY_JINGLE_ERROR_TIE_BREAK,
    WOCKY_JINGLE_ERROR_UNKNOWN_SESSION,
    WOCKY_JINGLE_ERROR_UNSUPPORTED_INFO
} WockyJingleError;
Jingle specific errors.
| the request cannot occur at this point in the state machine | |
| the request is rejected because it was sent while the initiator was awaiting a reply on a similar request | |
| the 'sid' attribute specifies a session that is unknown to the recipient | |
| the recipient does not support the informational payload of a session-info action. | 
typedef enum {
    WOCKY_SI_ERROR_NO_VALID_STREAMS,
    WOCKY_SI_ERROR_BAD_PROFILE
} WockySIError;
SI specific errors.
typedef enum {
    WOCKY_XMPP_ERROR_UNDEFINED_CONDITION = 0, /* 500 */
    WOCKY_XMPP_ERROR_REDIRECT,                /* 302 */
    WOCKY_XMPP_ERROR_GONE,                    /* 302 */
    WOCKY_XMPP_ERROR_BAD_REQUEST,             /* 400 */
    WOCKY_XMPP_ERROR_UNEXPECTED_REQUEST,      /* 400 */
    WOCKY_XMPP_ERROR_JID_MALFORMED,           /* 400 */
    WOCKY_XMPP_ERROR_NOT_AUTHORIZED,          /* 401 */
    WOCKY_XMPP_ERROR_PAYMENT_REQUIRED,        /* 402 */
    WOCKY_XMPP_ERROR_FORBIDDEN,               /* 403 */
    WOCKY_XMPP_ERROR_ITEM_NOT_FOUND,          /* 404 */
    WOCKY_XMPP_ERROR_RECIPIENT_UNAVAILABLE,   /* 404 */
    WOCKY_XMPP_ERROR_REMOTE_SERVER_NOT_FOUND, /* 404 */
    WOCKY_XMPP_ERROR_NOT_ALLOWED,             /* 405 */
    WOCKY_XMPP_ERROR_NOT_ACCEPTABLE,          /* 406 */
    WOCKY_XMPP_ERROR_REGISTRATION_REQUIRED,   /* 407 */
    WOCKY_XMPP_ERROR_SUBSCRIPTION_REQUIRED,   /* 407 */
    WOCKY_XMPP_ERROR_REMOTE_SERVER_TIMEOUT,   /* 408, 504 */
    WOCKY_XMPP_ERROR_CONFLICT,                /* 409 */
    WOCKY_XMPP_ERROR_INTERNAL_SERVER_ERROR,   /* 500 */
    WOCKY_XMPP_ERROR_RESOURCE_CONSTRAINT,     /* 500 */
    WOCKY_XMPP_ERROR_FEATURE_NOT_IMPLEMENTED, /* 501 */
    WOCKY_XMPP_ERROR_SERVICE_UNAVAILABLE,     /* 502, 503, 510 */
} WockyXmppError;
Possible XMPP stream errors, as defined by RFC 3920 §9.3.3.
| he error condition is not one of those defined by the other conditions in this list | |
| the recipient or server is redirecting requests for this information to another entity | |
| the recipient or server can no longer be contacted at this address | |
| the sender has sent XML that is malformed or that cannot be processed | |
| the recipient or server understood the request but was not expecting it at this time | |
| the sending entity has provided or communicated an XMPP address | |
| the sender must provide proper credentials before being allowed to perform the action, or has provided improper credentials | |
| the requesting entity is not authorized to access the requested service because payment is required | |
| the requesting entity does not possess the required permissions to perform the action | |
| he addressed JID or item requested cannot be found | |
| the intended recipient is temporarily unavailable | |
| a remote server or service specified as part or all of the JID of the intended recipient does not exist | |
| the recipient or server does not allow any entity to perform the action | |
| the recipient or server understands the request but is refusing to process it because it does not meet criteria defined by the recipient or server | |
| the requesting entity is not authorized to access the requested service because registration is required | |
| the requesting entity is not authorized to access the requested service because a subscription is required | |
| a remote server or service specified as part or all of the JID of the intended recipient (or required to fulfill a request) could not be contacted within a reasonable amount of time | |
| access cannot be granted because an existing resource or session exists with the same name or address | |
| the server could not process the stanza because of a misconfiguration or an otherwise-undefined internal server error | |
| the server or recipient lacks the system resources necessary to service the request | |
| the feature requested is not implemented by the recipient or server and therefore cannot be processed | |
| the server or recipient does not currently provide the requested service | 
struct WockyXmppErrorDomain {
  GQuark domain;
  GType enum_type;
  WockyXmppErrorSpecialization *codes;
};
A struct to represent extra XMPP error domains added.
| GQuark  | a GQuark of the error domain | 
| GType  | the GType of the error enum | 
| WockyXmppErrorSpecialization * | a NULL-terminated array of of WockyXmppErrorSpecializations | 
struct WockyXmppErrorSpecialization {
  const gchar *description;
  WockyXmppError specializes;
  gboolean override_type;
  WockyXmppErrorType type;
};
A struct to represent a specialization of an existing WockyXmppError member.
| const gchar * | description of the error | 
| WockyXmppError  | which WockyXmppError this error specializes | 
| gboolean  | TRUEiftypeshould be used, orFALSEif the
default error type forspecializesshould be used | 
| WockyXmppErrorType  | the XMPP error type | 
typedef enum {
  WOCKY_XMPP_ERROR_TYPE_CANCEL,
  WOCKY_XMPP_ERROR_TYPE_CONTINUE,
  WOCKY_XMPP_ERROR_TYPE_MODIFY,
  WOCKY_XMPP_ERROR_TYPE_AUTH,
  WOCKY_XMPP_ERROR_TYPE_WAIT
} WockyXmppErrorType;
XMPP error types as described in RFC 3920 §9.3.2.
| do not retry (the error is unrecoverable) | |
| proceed (the condition was only a warning) | |
| retry after changing the data sent | |
| retry after providing credentials | |
| retry after waiting (the error is temporary) | 
typedef enum {
  WOCKY_XMPP_STREAM_ERROR_BAD_FORMAT,
  WOCKY_XMPP_STREAM_ERROR_BAD_NAMESPACE_PREFIX,
  WOCKY_XMPP_STREAM_ERROR_CONFLICT,
  WOCKY_XMPP_STREAM_ERROR_CONNECTION_TIMEOUT,
  WOCKY_XMPP_STREAM_ERROR_HOST_GONE,
  WOCKY_XMPP_STREAM_ERROR_HOST_UNKNOWN,
  WOCKY_XMPP_STREAM_ERROR_IMPROPER_ADDRESSING,
  WOCKY_XMPP_STREAM_ERROR_INTERNAL_SERVER_ERROR,
  WOCKY_XMPP_STREAM_ERROR_INVALID_FROM,
  WOCKY_XMPP_STREAM_ERROR_INVALID_ID,
  WOCKY_XMPP_STREAM_ERROR_INVALID_NAMESPACE,
  WOCKY_XMPP_STREAM_ERROR_INVALID_XML,
  WOCKY_XMPP_STREAM_ERROR_NOT_AUTHORIZED,
  WOCKY_XMPP_STREAM_ERROR_POLICY_VIOLATION,
  WOCKY_XMPP_STREAM_ERROR_REMOTE_CONNECTION_FAILED,
  WOCKY_XMPP_STREAM_ERROR_RESOURCE_CONSTRAINT,
  WOCKY_XMPP_STREAM_ERROR_RESTRICTED_XML,
  WOCKY_XMPP_STREAM_ERROR_SEE_OTHER_HOST,
  WOCKY_XMPP_STREAM_ERROR_SYSTEM_SHUTDOWN,
  WOCKY_XMPP_STREAM_ERROR_UNDEFINED_CONDITION,
  WOCKY_XMPP_STREAM_ERROR_UNSUPPORTED_ENCODING,
  WOCKY_XMPP_STREAM_ERROR_UNSUPPORTED_STANZA_TYPE,
  WOCKY_XMPP_STREAM_ERROR_UNSUPPORTED_VERSION,
  WOCKY_XMPP_STREAM_ERROR_XML_NOT_WELL_FORMED,
  WOCKY_XMPP_STREAM_ERROR_UNKNOWN,
} WockyXmppStreamError;
Stream-level error conditions as described in RFC 3920 §4.7.3.
| the entity has sent XML that cannot be processed | |
| the entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix | |
| the server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream | |
| the entity has not generated any traffic over the stream for some period of time | |
| the value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server | |
| the value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server | |
| a stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value) | |
| the server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream | |
| the JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource binding | |
| the stream ID or dialback ID is invalid or does not match an ID previously provided | |
| the streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback" | |
| the entity has sent invalid XML over the stream to a server that performs validation | |
| the entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation | |
| the entity has violated some local service policy | |
| the server is unable to properly connect to a remote entity that is required for authentication or authorization | |
| the server lacks the system resources necessary to service the stream | |
| the entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character | |
| the server will not provide service to the initiating entity but is redirecting traffic to another host | |
| the server is being shut down and all active streams are being closed | |
| the error condition is not one of those defined by the other conditions in this list | |
| the initiating entity has encoded the stream in an encoding that is not supported by the server | |
| the initiating entity has sent a first-level child of the stream that is not supported by the server | |
| the value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server | |
| the initiating entity has sent XML that is not well-formed | |
| an unknown stream error | 
WockyNode * wocky_stanza_error_to_node (const GError *error,WockyNode *parent_node);
const gchar *       wocky_xmpp_error_description        (WockyXmppError error);
| 
 | a core stanza error | 
| Returns : | a description of the error, in English, as specified in XMPP Core | 
void wocky_xmpp_error_extract (WockyNode *error,WockyXmppErrorType *type,GError **core,GError **specialized,WockyNode **specialized_node);
Given an <error/> node, breaks it down into values describing the error.
type and core are guaranteed to be set; specialized and specialized_node
will be set if a recognised application-specific error is found, and the
latter will be set to NULL if no application-specific error is found.
Any or all of the out parameters may be NULL to ignore the value.  The
value stored in specialized_node is borrowed from stanza, and is only
valid as long as the latter is alive.
| 
 | the <error/> child of a stanza with type='error' | 
| 
 | location at which to store the error type | 
| 
 | location at which to store an error in the domain WOCKY_XMPP_ERROR | 
| 
 | location at which to store an error in an application-specific domain, if one is found | 
| 
 | location at which to store the node representing an application-specific error, if one is found | 
void                wocky_xmpp_error_register_domain    (WockyXmppErrorDomain *domain);
Registers a new set of application-specific stanza errors. This allows
GErrors in that domain to be passed to wocky_stanza_error_to_node(), and to
be recognized and returned by wocky_xmpp_error_extract() (and
wocky_stanza_extract_errors(), by extension).
| 
 | a description of the error domain | 
const gchar *       wocky_xmpp_error_string             (WockyXmppError error);
| 
 | a core stanza error | 
| Returns : | the name of the tag corresponding to error | 
const gchar *       wocky_xmpp_stanza_error_to_string   (GError *error);
Returns the name of the XMPP stanza error element represented by error.
This is intended for use in debugging messages, with GErrors returned by
wocky_stanza_extract_errors().
| 
 | an error in the domain WOCKY_XMPP_ERROR, or another domain
registered withwocky_xmpp_error_register_domain()(such asWOCKY_JINGLE_ERROR). | 
| Returns : | the error code as a string, or NULLiferror->domainis not known to Wocky. | 
GError *            wocky_xmpp_stream_error_from_node   (WockyNode *error);
| 
 | the root node of a WOCKY_STANZA_TYPE_STREAM_ERROR stanza | 
| Returns : | a GError in the WOCKY_XMPP_STREAM_ERROR domain. | 
GQuark              wocky_xmpp_stream_error_quark       (void);
Get the error quark used for stream errors
| Returns : | the quark for stream errors. |