21#include "QXmppElement.h"
22#include "QXmppNonza.h"
24#include <QXmlStreamWriter>
27class QXmppExtendedAddressPrivate;
49 QString description()
const;
50 void setDescription(
const QString &description);
53 void setJid(
const QString &jid);
56 void setType(
const QString &type);
58 bool isDelivered()
const;
59 void setDelivered(
bool);
64 void parse(
const QDomElement &element);
65 void toXml(QXmlStreamWriter *writer)
const;
69 QSharedDataPointer<QXmppExtendedAddressPrivate> d;
72class QXmppStanzaPrivate;
73class QXmppStanzaErrorPrivate;
123#if QXMPP_DEPRECATED_SINCE(1, 3)
128 RecipientUnavailable = 12,
145 Error(
const QString &type,
const QString &cond,
const QString &text = QString());
147 Error(QSharedDataPointer<QXmppStanzaErrorPrivate> d);
155 void setCode(
int code);
157 QString text()
const;
158 void setText(
const QString &text);
164 void setType(
Type type);
167 void setBy(
const QString &by);
169 QString redirectionUri()
const;
170 void setRedirectionUri(
const QString &redirectionUri);
173 bool fileTooLarge()
const;
174 void setFileTooLarge(
bool);
176 qint64 maxFileSize()
const;
177 void setMaxFileSize(qint64);
179 QDateTime retryDate()
const;
180 void setRetryDate(
const QDateTime &);
183 void parse(
const QDomElement &element);
184 void toXml(QXmlStreamWriter *writer)
const;
190 QSharedDataPointer<QXmppStanzaErrorPrivate> d;
193 QXmppStanza(
const QString &from = QString(),
const QString &to = QString());
202 void setTo(
const QString &);
204 QString from()
const;
205 void setFrom(
const QString &);
208 void setId(
const QString &);
210 QString lang()
const;
211 void setLang(
const QString &);
214 std::optional<Error> errorOptional()
const;
216 void setError(
const std::optional<Error> &error);
218 QXmppElementList extensions()
const;
219 void setExtensions(
const QXmppElementList &elements);
221 QList<QXmppExtendedAddress> extendedAddresses()
const;
222 void setExtendedAddresses(
const QList<QXmppExtendedAddress> &extendedAddresses);
224 std::optional<QXmppE2eeMetadata> e2eeMetadata()
const;
225 void setE2eeMetadata(
const std::optional<QXmppE2eeMetadata> &e2eeMetadata);
228 void parse(
const QDomElement &element)
override;
232 void generateAndSetNextId();
236 QSharedDataPointer<QXmppStanzaPrivate> d;
237 static uint s_uniqeIdNo;
238 friend class TestClient;
Represents an extended address as defined by XEP-0033: Extended Stanza Addressing.
Definition QXmppStanza.h:39
QXmppExtendedAddress(const QXmppExtendedAddress &)
Default copy-constructur.
QXmppExtendedAddress(QXmppExtendedAddress &&)
Default move-constructur.
QXmppExtendedAddress & operator=(const QXmppExtendedAddress &)
Default assignment operator.
QXmppExtendedAddress & operator=(QXmppExtendedAddress &&)
Default assignment operator.
Definition QXmppNonza.h:14
The Error class represents a stanza error.
Definition QXmppStanza.h:94
Error & operator=(Error &&)
Move operator.
~Error()
Default destructor.
Error(Error &&)
Move constructor.
Type
Definition QXmppStanza.h:100
@ Auth
The request needs to be resent after authentication.
Definition QXmppStanza.h:105
@ Modify
The request needs to be changed and resent.
Definition QXmppStanza.h:104
@ Cancel
The error is not temporary.
Definition QXmppStanza.h:102
@ Continue
The error was only a warning.
Definition QXmppStanza.h:103
Condition
A detailed condition of the error.
Definition QXmppStanza.h:110
@ ItemNotFound
The requested item could not be found.
Definition QXmppStanza.h:118
@ ResourceConstraint
The recipient lacks system resources to perform the request.
Definition QXmppStanza.h:133
@ UndefinedCondition
An undefined condition was hit.
Definition QXmppStanza.h:136
@ Forbidden
The requesting entity does not posses the necessary privileges to perform the request.
Definition QXmppStanza.h:115
@ FeatureNotImplemented
The feature is not implemented.
Definition QXmppStanza.h:114
@ RegistrationRequired
The requesting entity needs to register first.
Definition QXmppStanza.h:130
@ NotAcceptable
The request does not meet the defined critera.
Definition QXmppStanza.h:120
@ Redirect
The requested resource is available elsewhere. This is used in combination with a redirection URI.
Definition QXmppStanza.h:129
@ BadRequest
The request does not contain a valid schema.
Definition QXmppStanza.h:112
@ NotAuthorized
The request should be resent after authentication.
Definition QXmppStanza.h:122
@ Conflict
The request conflicts with another.
Definition QXmppStanza.h:113
@ UnexpectedRequest
The request was unexpected.
Definition QXmppStanza.h:137
@ InternalServerError
The server has expierienced an internal error and can not process the request.
Definition QXmppStanza.h:117
@ Gone
The user or server can not be contacted at the address. This is used in combination with a redirectio...
Definition QXmppStanza.h:116
@ SubscriptionRequired
The requester needs to subscribe first.
Definition QXmppStanza.h:135
@ RemoteServerTimeout
The connection to the server could not be established or timed out.
Definition QXmppStanza.h:132
@ RemoteServerNotFound
The remote server could not be found.
Definition QXmppStanza.h:131
@ JidMalformed
The given JID is not valid.
Definition QXmppStanza.h:119
@ ServiceUnavailable
The service is currently not available.
Definition QXmppStanza.h:134
@ NotAllowed
No entity is allowed to perform the request.
Definition QXmppStanza.h:121
@ Q_DECL_ENUMERATOR_DEPRECATED_X
Definition QXmppStanza.h:126
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:88
QXmppStanza(QXmppStanza &&)
Move constructor.
QXmppStanza & operator=(const QXmppStanza &other)
Assigns other to this stanza.
virtual ~QXmppStanza()
Destroys a QXmppStanza.
QXmppStanza & operator=(QXmppStanza &&)
Move-assignment operator.
QXmppStanza(const QXmppStanza &other)
Constructs a copy of other.
SceMode
Definition QXmppGlobal.h:136
@ SceAll
Processes all known elements.
Definition QXmppGlobal.h:137