📄 gloox.h
字号:
* not exist. Use ClientBase::authError() to find the reason. */ ConnUserDisconnected, /**< The user (or higher-level protocol) requested a disconnect. */ ConnNotConnected /**< There is no active connection. */ }; /** * ClientBase's policy regarding TLS usage. Use with ClientBase::setTls(). */ enum TLSPolicy { TLSDisabled, /**< Don't use TLS. */ TLSOptional, /**< Use TLS if compiled in and offered by the server. */ TLSRequired /**< Don't attempt to log in if the server didn't offer TLS * or if TLS was not compiled in. Disconnect error will be * ConnTlsNotAvailable. */ }; /** * Supported Stream Features. */ enum StreamFeature { StreamFeatureBind = 1, /**< The server supports resource binding. */ StreamFeatureSession = 2, /**< The server supports sessions. */ StreamFeatureStartTls = 8, /**< The server supports <starttls>. */ StreamFeatureIqRegister = 16, /**< The server supports XEP-0077 (In-Band * Registration). */ StreamFeatureIqAuth = 32, /**< The server supports XEP-0078 (Non-SASL * Authentication). */ StreamFeatureCompressZlib = 64, /**< The server supports XEP-0138 (Stream * Compression) (Zlib). */ StreamFeatureCompressDclz = 128 /**< The server supports XEP-0138 (Stream * Compression) (LZW/DCLZ). */ // SASLMechanism below must be adjusted accordingly. }; /** * Supported SASL mechanisms. */ // must be adjusted with changes to StreamFeature enum above enum SaslMechanism { SaslMechNone = 0, /**< Invalid SASL Mechanism. */ SaslMechDigestMd5 = 256, /**< SASL Digest-MD5 according to RFC 2831. */ SaslMechPlain = 512, /**< SASL PLAIN according to RFC 2595 Section 6. */ SaslMechAnonymous = 1024, /**< SASL ANONYMOUS according to draft-ietf-sasl-anon-05.txt/ * RFC 2245 Section 6. */ SaslMechExternal = 2048, /**< SASL EXTERNAL according to RFC 2222 Section 7.4. */ SaslMechGssapi = 4096, /**< SASL GSSAPI (Win32 only). */ SaslMechAll = 65535 /**< Includes all supported SASL mechanisms. */ }; /** * This decribes stream error conditions as defined in RFC 3920 Sec. 4.7.3. */ enum StreamError { StreamErrorUndefined, /**< An undefined/unknown error occured. Also used if a diconnect was * user-initiated. Also set before and during a established connection * (where obviously no error occured). */ StreamErrorBadFormat, /**< The entity has sent XML that cannot be processed; * this error MAY be used instead of the more specific XML-related * errors, such as <bad-namespace-prefix/>, <invalid-xml/>, * <restricted-xml/>, <unsupported-encoding/>, and * <xml-not-well-formed/>, although the more specific errors are * preferred. */ StreamErrorBadNamespacePrefix, /**< The entity has sent a namespace prefix that is unsupported, or has * sent no namespace prefix on an element that requires such a prefix * (see XML Namespace Names and Prefixes (Section 11.2)). */ StreamErrorConflict, /**< The server is closing the active stream for this entity because a * new stream has been initiated that conflicts with the existing * stream. */ StreamErrorConnectionTimeout, /**< The entity has not generated any traffic over the stream for some * period of time (configurable according to a local service policy).*/ StreamErrorHostGone, /**< 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.*/ StreamErrorHostUnknown, /**< 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. */ StreamErrorImproperAddressing, /**< A stanza sent between two servers lacks a 'to' or 'from' attribute * (or the attribute has no value). */ StreamErrorInternalServerError, /**< the server has experienced a misconfiguration or an * otherwise-undefined internal error that prevents it from servicing the * stream. */ StreamErrorInvalidFrom, /**< 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.*/ StreamErrorInvalidId, /**< The stream ID or dialback ID is invalid or does not match an ID * previously provided. */ StreamErrorInvalidNamespace, /**< 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" (see XML Namespace Names * and Prefixes (Section 11.2)). */ StreamErrorInvalidXml, /**< The entity has sent invalid XML over the stream to a server that * performs validation (see Validation (Section 11.3)). */ StreamErrorNotAuthorized, /**< 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 receiving entity MUST NOT process * the offending stanza before sending the stream error. */ StreamErrorPolicyViolation, /**< The entity has violated some local service policy; the server MAY * choose to specify the policy in the <text/> element or an * application-specific condition element. */ StreamErrorRemoteConnectionFailed,/**< The server is unable to properly connect to a remote entity that is * required for authentication or authorization. */ StreamErrorResourceConstraint, /**< the server lacks the system resources necessary to service the * stream. */ StreamErrorRestrictedXml, /**< The entity has attempted to send restricted XML features such as a * comment, processing instruction, DTD, entity reference, or unescaped * character (see Restrictions (Section 11.1)). */ StreamErrorSeeOtherHost, /**< The server will not provide service to the initiating entity but is * redirecting traffic to another host; the server SHOULD specify the * alternate hostname or IP address (which MUST be a valid domain * identifier) as the XML character data of the <see-other-host/> * element. */ StreamErrorSystemShutdown, /**< The server is being shut down and all active streams are being * closed. */ StreamErrorUndefinedCondition, /**< The error condition is not one of those defined by the other * conditions in this list; this error condition SHOULD be used only in * conjunction with an application-specific condition. */ StreamErrorUnsupportedEncoding, /**< The initiating entity has encoded the stream in an encoding that is * not supported by the server (see Character Encoding (Section 11.5)). */ StreamErrorUnsupportedStanzaType,/**< The initiating entity has sent a first-level child of the stream * that is not supported by the server. */ StreamErrorUnsupportedVersion, /**< 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 server MAY specify the version(s) it * supports in the <text/> element. */ StreamErrorXmlNotWellFormed /**< The initiating entity has sent XML that is not well-formed as * defined by [XML]. */ }; /** * Describes the possible stanza types. */ enum StanzaType { StanzaUndefined, /**< Undefined. */ StanzaIq, /**< An Info/Query stanza. */ StanzaMessage, /**< A message stanza. */ StanzaS10n, /**< A presence/subscription stanza. */ StanzaPresence /**< A presence stanza. */ }; /** * Describes the possible stanza-sub-types. */ enum StanzaSubType { StanzaSubUndefined = 0, /**< Undefined. */ StanzaIqGet = 1, /**< The stanza is a request for information or requirements. */ StanzaIqSet = 2, /**< * The stanza provides required data, sets new values, or * replaces existing values. */ StanzaIqResult = 4, /**< The stanza is a response to a successful get or set request. */ StanzaIqError = 8, /**< * An error has occurred regarding processing or * delivery of a previously-sent get or set (see Stanza Errors * (Section 9.3)). */ StanzaPresenceUnavailable = 16, /**< * Signals that the entity is no longer available for * communication. */ StanzaPresenceAvailable = 32, /**< * Signals to the server that the sender is online and available * for communication. */ StanzaPresenceProbe = 64, /**< * A request for an entity's current presence; SHOULD be * generated only by a server on behalf of a user. */ StanzaPresenceError = 128, /**< * An error has occurred regarding processing or delivery of * a previously-sent presence stanza. */ StanzaS10nSubscribe = 256, /**< * The sender wishes to subscribe to the recipient's * presence. */ StanzaS10nSubscribed = 512, /**< * The sender has allowed the recipient to receive * their presence. */ StanzaS10nUnsubscribe = 1024, /**< * The sender is unsubscribing from another entity's * presence. */ StanzaS10nUnsubscribed = 2048, /**< * The subscription request has been denied or a * previously-granted subscription has been cancelled. */ StanzaMessageChat = 4096, /**< * The message is sent in the context of a one-to-one chat * conversation. A compliant client SHOULD present the message in an * interface enabling one-to-one chat between the two parties, * including an appropriate conversation history. */ StanzaMessageError = 8192, /**< * An error has occurred related to a previous message sent * by the sender (for details regarding stanza error syntax, refer to * [XMPP-CORE]). A compliant client SHOULD present an appropriate * interface informing the sender of the nature of the error. */ StanzaMessageGroupchat = 16384, /**< * The message is sent in the context of a multi-user * chat environment (similar to that of [IRC]). A compliant client * SHOULD present the message in an interface enabling many-to-many * chat between the parties, including a roster of parties in the * chatroom and an appropriate conversation history. */ StanzaMessageHeadline = 32768, /**< * The message is probably generated by an automated * service that delivers or broadcasts content (news, sports, market * information, RSS feeds, etc.). No reply to the message is * expected, and a compliant client SHOULD present the message in an * interface that appropriately differentiates the message from * standalone messages, chat sessions, or groupchat sessions (e.g., * by not providing the recipient with the ability to reply). */ StanzaMessageNormal = 65536 /**< * The message is a single message that is sent outside the * context of a one-to-one conversation or groupchat, and to which it * is expected that the recipient will reply. A compliant client * SHOULD present the message in an interface enabling the recipient * to reply, but without a conversation history. */ }; /** * Describes types of stanza errors. */ enum StanzaErrorType { StanzaErrorTypeUndefined, /**< No error. */ StanzaErrorTypeCancel, /**< Do not retry (the error is unrecoverable). */ StanzaErrorTypeContinue, /**< Proceed (the condition was only a warning). */ StanzaErrorTypeModify, /**< Retry after changing the data sent. */ StanzaErrorTypeAuth, /**< Retry after providing credentials. */ StanzaErrorTypeWait /**< Retry after waiting (the error is temporary). */ }; /** * Describes the defined stanza error conditions of RFC 3920. * Used by, eg., Stanza::error(). */ enum StanzaError { StanzaErrorUndefined = 0, /**< No stanza error occured. */ StanzaErrorBadRequest, /**< The sender has sent XML that is malformed or that cannot be * processed (e.g., an IQ stanza that includes an unrecognized value * of the 'type' attribute); the associated error type SHOULD be * "modify". */ StanzaErrorConflict, /**< Access cannot be granted because an existing resource or session * exists with the same name or address; the associated error type * SHOULD be "cancel". */ StanzaErrorFeatureNotImplemented,/**< The feature requested is not implemented by the recipient or server * and therefore cannot be processed; the associated error type SHOULD be * "cancel". */ StanzaErrorForbidden, /**< The requesting entity does not possess the required permissions to * perform the action; the associated error type SHOULD be "auth". */ StanzaErrorGone, /**< The recipient or server can no longer be contacted at this address * (the error stanza MAY contain a new address in the XML character data * of the <gone/> element); the associated error type SHOULD be * "modify". */ StanzaErrorInternalServerError, /**< The server could not process the stanza because of a * misconfiguration or an otherwise-undefined internal server error; the * associated error type SHOULD be "wait". */ StanzaErrorItemNotFound, /**< The addressed JID or item requested cannot be found; the associated * error type SHOULD be "cancel". */ StanzaErrorJidMalformed, /**< The sending entity has provided or communicated an XMPP address * (e.g., a value of the 'to' attribute) or aspect thereof (e.g., a * resource identifier) that does not adhere to the syntax defined in * Addressing Scheme (Section 3); the associated error type SHOULD be * "modify". */ StanzaErrorNotAcceptable, /**< 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 (e.g., a local policy regarding acceptable words in * messages); the associated error type SHOULD be "modify". */ StanzaErrorNotAllowed, /**< The recipient or server does not allow any entity to perform the * action; the associated error type SHOULD be "cancel". */ StanzaErrorNotAuthorized, /**< The sender must provide proper credentials before being allowed to * perform the action, or has provided improper credentials; the * associated error type SHOULD be "auth". */ StanzaErrorPaymentRequired, /**< The requesting entity is not authorized to access the requested * service because payment is required; the associated error type SHOULD * be "auth". */ StanzaErrorRecipientUnavailable,/**< The intended recipient is temporarily unavailable; the associated * error type SHOULD be "wait" (note: an application MUST NOT return this
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -