30 #include <QSharedData>
37 #include "QXmppElement.h"
39 #include <QXmlStreamWriter>
41 class QXmppExtendedAddressPrivate;
61 QString description()
const;
62 void setDescription(
const QString &description);
65 void setJid(
const QString &jid);
68 void setType(
const QString &type);
70 bool isDelivered()
const;
71 void setDelivered(
bool);
76 void parse(
const QDomElement &element);
77 void toXml(QXmlStreamWriter *writer)
const;
81 QSharedDataPointer<QXmppExtendedAddressPrivate> d;
84 class QXmppStanzaPrivate;
85 class QXmppStanzaErrorPrivate;
133 #if QXMPP_DEPRECATED_SINCE(1, 3)
134 PaymentRequired Q_DECL_ENUMERATOR_DEPRECATED_X(
"The <payment-required/> error was removed in RFC6120"),
138 RecipientUnavailable = 12,
153 Error(Type type, Condition cond,
const QString &text = QString());
154 Error(
const QString &type,
const QString &cond,
const QString &text = QString());
160 void setCode(
int code);
162 QString text()
const;
163 void setText(
const QString &text);
165 Condition condition()
const;
166 void setCondition(Condition cond);
168 void setType(Type type);
172 void setBy(
const QString &by);
174 QString redirectionUri()
const;
175 void setRedirectionUri(
const QString &redirectionUri);
178 bool fileTooLarge()
const;
179 void setFileTooLarge(
bool);
181 qint64 maxFileSize()
const;
182 void setMaxFileSize(qint64);
184 QDateTime retryDate()
const;
185 void setRetryDate(
const QDateTime &);
188 void parse(
const QDomElement &element);
189 void toXml(QXmlStreamWriter *writer)
const;
193 QString getConditionStr()
const;
194 void setConditionFromStr(
const QString &cond);
196 QString getTypeStr()
const;
197 void setTypeFromStr(
const QString &type);
199 QSharedDataPointer<QXmppStanzaErrorPrivate> d;
202 QXmppStanza(
const QString &from = QString(),
const QString &to = QString());
209 void setTo(
const QString &);
211 QString from()
const;
212 void setFrom(
const QString &);
215 void setId(
const QString &);
217 QString lang()
const;
218 void setLang(
const QString &);
223 QXmppElementList extensions()
const;
224 void setExtensions(
const QXmppElementList &elements);
226 QList<QXmppExtendedAddress> extendedAddresses()
const;
227 void setExtendedAddresses(
const QList<QXmppExtendedAddress> &extendedAddresses);
229 virtual bool isXmppStanza()
const;
232 virtual void parse(
const QDomElement &element);
233 virtual void toXml(QXmlStreamWriter *writer)
const = 0;
236 void extensionsToXml(QXmlStreamWriter *writer)
const;
237 void generateAndSetNextId();
241 QSharedDataPointer<QXmppStanzaPrivate> d;
242 static uint s_uniqeIdNo;
248 #endif // QXMPPSTANZA_H
@ NotAcceptable
The request does not meet the defined critera.
Definition: QXmppStanza.h:130
@ NotAuthorized
The request should be resent after authentication.
Definition: QXmppStanza.h:132
@ JidMalformed
The given JID is not valid.
Definition: QXmppStanza.h:129
@ RegistrationRequired
The requesting entity needs to register first.
Definition: QXmppStanza.h:140
Represents an extended address as defined by XEP-0033: Extended Stanza Addressing.
Definition: QXmppStanza.h:52
@ RemoteServerTimeout
The connection to the server could not be established or timed out.
Definition: QXmppStanza.h:142
The Error class represents a stanza error.
Definition: QXmppStanza.h:105
@ Forbidden
The requesting entity does not posses the necessary privileges to perform the request.
Definition: QXmppStanza.h:125
@ UnexpectedRequest
The request was unexpected.
Definition: QXmppStanza.h:147
@ Conflict
The request conflicts with another.
Definition: QXmppStanza.h:123
@ Auth
The request needs to be resent after authentication.
Definition: QXmppStanza.h:116
@ Modify
The request needs to be changed and resent.
Definition: QXmppStanza.h:115
@ UndefinedCondition
An undefined condition was hit.
Definition: QXmppStanza.h:146
The QXmppStanza class is the base class for all XMPP stanzas.
Definition: QXmppStanza.h:99
@ RemoteServerNotFound
The remote server could not be found.
Definition: QXmppStanza.h:141
@ ItemNotFound
The requested item could not be found.
Definition: QXmppStanza.h:128
@ NotAllowed
No entity is allowed to perform the request.
Definition: QXmppStanza.h:131
@ FeatureNotImplemented
The feature is not implemented.
Definition: QXmppStanza.h:124
@ InternalServerError
The server has expierienced an internal error and can not process the request.
Definition: QXmppStanza.h:127
@ SubscriptionRequired
The requester needs to subscribe first.
Definition: QXmppStanza.h:145
Condition
A detailed condition of the error.
Definition: QXmppStanza.h:121
@ Gone
The user or server can not be contacted at the address. This is used in combination with a redirectio...
Definition: QXmppStanza.h:126
@ ServiceUnavailable
The service is currently not available.
Definition: QXmppStanza.h:144
@ Continue
The error was only a warning.
Definition: QXmppStanza.h:114
@ Redirect
The requested resource is available elsewhere. This is used in combination with a redirection URI.
Definition: QXmppStanza.h:139
@ Cancel
The error is not temporary.
Definition: QXmppStanza.h:113
@ BadRequest
The request does not contain a valid schema.
Definition: QXmppStanza.h:122
Type
Definition: QXmppStanza.h:112
@ ResourceConstraint
The recipient lacks system resources to perform the request.
Definition: QXmppStanza.h:143