30 #include <QSharedData>
37 #include "QXmppElement.h"
39 #include <QXmlStreamWriter>
41 class QXmppExtendedAddressPrivate;
58 QString description()
const;
59 void setDescription(
const QString &description);
62 void setJid(
const QString &jid);
65 void setType(
const QString &type);
67 bool isDelivered()
const;
68 void setDelivered(
bool);
73 void parse(
const QDomElement &element);
74 void toXml(QXmlStreamWriter *writer)
const;
78 QSharedDataPointer<QXmppExtendedAddressPrivate> d;
81 class QXmppStanzaPrivate;
82 class QXmppStanzaErrorPrivate;
145 Error(Type type, Condition cond,
const QString &text = QString());
146 Error(
const QString &type,
const QString &cond,
const QString &text = QString());
152 void setCode(
int code);
154 QString text()
const;
155 void setText(
const QString &text);
157 Condition condition()
const;
158 void setCondition(Condition cond);
160 void setType(Type type);
164 bool fileTooLarge()
const;
165 void setFileTooLarge(
bool);
167 qint64 maxFileSize()
const;
168 void setMaxFileSize(qint64);
170 QDateTime retryDate()
const;
171 void setRetryDate(
const QDateTime &);
174 void parse(
const QDomElement &element);
175 void toXml(QXmlStreamWriter *writer)
const;
179 QString getConditionStr()
const;
180 void setConditionFromStr(
const QString &cond);
182 QString getTypeStr()
const;
183 void setTypeFromStr(
const QString &type);
185 QSharedDataPointer<QXmppStanzaErrorPrivate> d;
188 QXmppStanza(
const QString &from = QString(),
const QString &to = QString());
195 void setTo(
const QString &);
197 QString from()
const;
198 void setFrom(
const QString &);
201 void setId(
const QString &);
203 QString lang()
const;
204 void setLang(
const QString &);
209 QXmppElementList extensions()
const;
210 void setExtensions(
const QXmppElementList &elements);
212 QList<QXmppExtendedAddress> extendedAddresses()
const;
213 void setExtendedAddresses(
const QList<QXmppExtendedAddress> &extendedAddresses);
215 virtual bool isXmppStanza()
const;
218 virtual void parse(
const QDomElement &element);
219 virtual void toXml(QXmlStreamWriter *writer)
const = 0;
222 void extensionsToXml(QXmlStreamWriter *writer)
const;
223 void generateAndSetNextId();
227 QSharedDataPointer<QXmppStanzaPrivate> d;
228 static uint s_uniqeIdNo;
231 #endif // QXMPPSTANZA_H
@ NotAcceptable
The request does not meet the defined critera.
Definition: QXmppStanza.h:127
@ NotAuthorized
The request should be resent after authentication.
Definition: QXmppStanza.h:129
@ JidMalformed
The given JID is not valid.
Definition: QXmppStanza.h:126
@ RegistrationRequired
The requesting entity needs to register first.
Definition: QXmppStanza.h:133
Represents an extended address as defined by XEP-0033: Extended Stanza Addressing.
Definition: QXmppStanza.h:49
@ RemoteServerTimeout
The connection to the server could not be established or timed out.
Definition: QXmppStanza.h:135
The Error class represents a stanza error.
Definition: QXmppStanza.h:102
@ Forbidden
The requesting entity does not posses the necessary privileges to perform the request.
Definition: QXmppStanza.h:122
@ Conflict
The request conflicts with another.
Definition: QXmppStanza.h:120
@ PaymentRequired
Payment is required to perform the request.
Definition: QXmppStanza.h:130
@ Auth
The request needs to be resent after authentication.
Definition: QXmppStanza.h:113
@ Modify
The request needs to be changed and resent.
Definition: QXmppStanza.h:112
@ RecipientUnavailable
The recipient is unavailable.
Definition: QXmppStanza.h:131
@ UndefinedCondition
An undefined condition was hit.
Definition: QXmppStanza.h:139
The QXmppStanza class is the base class for all XMPP stanzas.
Definition: QXmppStanza.h:96
@ RemoteServerNotFound
The remote server could not be found.
Definition: QXmppStanza.h:134
@ ItemNotFound
The requested item could not be found.
Definition: QXmppStanza.h:125
@ NotAllowed
No entity is allowed to perform the request.
Definition: QXmppStanza.h:128
@ FeatureNotImplemented
The feature is not implemented.
Definition: QXmppStanza.h:121
@ InternalServerError
The server has expierienced an internal error and can not process the request.
Definition: QXmppStanza.h:124
@ SubscriptionRequired
The requester needs to subscribe first.
Definition: QXmppStanza.h:138
Condition
A detailed condition of the error.
Definition: QXmppStanza.h:118
@ Gone
The user or server can not be contacted at the address.
Definition: QXmppStanza.h:123
@ ServiceUnavailable
The service is currently not available.
Definition: QXmppStanza.h:137
@ Continue
The error was only a warning.
Definition: QXmppStanza.h:111
@ Redirect
The requested resource is available elsewhere.
Definition: QXmppStanza.h:132
@ Cancel
The error is not temporary.
Definition: QXmppStanza.h:110
@ BadRequest
The request does not contain a valid schema.
Definition: QXmppStanza.h:119
Type
Definition: QXmppStanza.h:109
@ ResourceConstraint
The recipient lacks system resources to perform the request.
Definition: QXmppStanza.h:136