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)
138 RecipientUnavailable = 12,
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);
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 QSharedDataPointer<QXmppStanzaErrorPrivate> d;
196 QXmppStanza(
const QString &from = QString(),
const QString &to = QString());
203 void setTo(
const QString &);
205 QString from()
const;
206 void setFrom(
const QString &);
209 void setId(
const QString &);
211 QString lang()
const;
212 void setLang(
const QString &);
217 QXmppElementList extensions()
const;
218 void setExtensions(
const QXmppElementList &elements);
220 QList<QXmppExtendedAddress> extendedAddresses()
const;
221 void setExtendedAddresses(
const QList<QXmppExtendedAddress> &extendedAddresses);
223 virtual bool isXmppStanza()
const;
226 virtual void parse(
const QDomElement &element);
227 virtual void toXml(QXmlStreamWriter *writer)
const = 0;
230 void extensionsToXml(QXmlStreamWriter *writer)
const;
231 void generateAndSetNextId();
235 QSharedDataPointer<QXmppStanzaPrivate> d;
236 static uint s_uniqeIdNo;
Represents an extended address as defined by XEP-0033: Extended Stanza Addressing.
Definition: QXmppStanza.h:53
QXmppExtendedAddress(const QXmppExtendedAddress &)
The Error class represents a stanza error.
Definition: QXmppStanza.h:106
~Error()
Default destructor.
Type
Definition: QXmppStanza.h:112
@ 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
@ Cancel
The error is not temporary.
Definition: QXmppStanza.h:113
@ Continue
The error was only a warning.
Definition: QXmppStanza.h:114
Condition
A detailed condition of the error.
Definition: QXmppStanza.h:121
@ ItemNotFound
The requested item could not be found.
Definition: QXmppStanza.h:128
@ ResourceConstraint
The recipient lacks system resources to perform the request.
Definition: QXmppStanza.h:143
@ UndefinedCondition
An undefined condition was hit.
Definition: QXmppStanza.h:146
@ Forbidden
The requesting entity does not posses the necessary privileges to perform the request.
Definition: QXmppStanza.h:125
@ FeatureNotImplemented
The feature is not implemented.
Definition: QXmppStanza.h:124
@ RegistrationRequired
The requesting entity needs to register first.
Definition: QXmppStanza.h:140
@ NotAcceptable
The request does not meet the defined critera.
Definition: QXmppStanza.h:130
@ Redirect
The requested resource is available elsewhere. This is used in combination with a redirection URI.
Definition: QXmppStanza.h:139
@ BadRequest
The request does not contain a valid schema.
Definition: QXmppStanza.h:122
@ NotAuthorized
The request should be resent after authentication.
Definition: QXmppStanza.h:132
@ Conflict
The request conflicts with another.
Definition: QXmppStanza.h:123
@ UnexpectedRequest
The request was unexpected.
Definition: QXmppStanza.h:147
@ InternalServerError
The server has expierienced an internal error and can not process the request.
Definition: QXmppStanza.h:127
@ Gone
The user or server can not be contacted at the address. This is used in combination with a redirectio...
Definition: QXmppStanza.h:126
@ SubscriptionRequired
The requester needs to subscribe first.
Definition: QXmppStanza.h:145
@ RemoteServerTimeout
The connection to the server could not be established or timed out.
Definition: QXmppStanza.h:142
@ RemoteServerNotFound
The remote server could not be found.
Definition: QXmppStanza.h:141
@ JidMalformed
The given JID is not valid.
Definition: QXmppStanza.h:129
@ ServiceUnavailable
The service is currently not available.
Definition: QXmppStanza.h:144
@ NotAllowed
No entity is allowed to perform the request.
Definition: QXmppStanza.h:131
@ Q_DECL_ENUMERATOR_DEPRECATED_X
Definition: QXmppStanza.h:136
Error & operator=(const Error &)
Copy operator.
Error(const Error &)
Copy constructor.
The QXmppStanza class is the base class for all XMPP stanzas.
Definition: QXmppStanza.h:100