21#include "QXmppConstants_p.h"
22#include "QXmppElement.h"
23#include "QXmppNonza.h"
25#include <QXmlStreamWriter>
28class QXmppExtendedAddressPrivate;
50 QString description()
const;
51 void setDescription(
const QString &description);
54 void setJid(
const QString &jid);
57 void setType(
const QString &type);
59 bool isDelivered()
const;
60 void setDelivered(
bool);
65 static constexpr std::tuple XmlTag = { u
"address", QXmpp::Private::ns_extended_addressing };
66 void parse(
const QDomElement &element);
67 void toXml(QXmlStreamWriter *writer)
const;
71 QSharedDataPointer<QXmppExtendedAddressPrivate> d;
74class QXmppStanzaPrivate;
75class QXmppStanzaErrorPrivate;
125#if QXMPP_DEPRECATED_SINCE(1, 3)
130 RecipientUnavailable = 12,
147 Error(
const QString &type,
const QString &cond,
const QString &text = QString());
149 Error(QSharedDataPointer<QXmppStanzaErrorPrivate> d);
157 void setCode(
int code);
159 QString text()
const;
160 void setText(
const QString &text);
166 void setType(
Type type);
169 void setBy(
const QString &by);
171 QString redirectionUri()
const;
172 void setRedirectionUri(
const QString &redirectionUri);
175 bool fileTooLarge()
const;
176 void setFileTooLarge(
bool);
178 qint64 maxFileSize()
const;
179 void setMaxFileSize(qint64);
181 QDateTime retryDate()
const;
182 void setRetryDate(
const QDateTime &);
185 void parse(
const QDomElement &element);
186 void toXml(QXmlStreamWriter *writer)
const;
192 QSharedDataPointer<QXmppStanzaErrorPrivate> d;
195 QXmppStanza(
const QString &from = QString(),
const QString &to = QString());
204 void setTo(
const QString &);
206 QString from()
const;
207 void setFrom(
const QString &);
210 void setId(
const QString &);
212 QString lang()
const;
213 void setLang(
const QString &);
216 std::optional<Error> errorOptional()
const;
218 void setError(
const std::optional<Error> &error);
220 QXmppElementList extensions()
const;
221 void setExtensions(
const QXmppElementList &elements);
223 QList<QXmppExtendedAddress> extendedAddresses()
const;
224 void setExtendedAddresses(
const QList<QXmppExtendedAddress> &extendedAddresses);
226 std::optional<QXmppE2eeMetadata> e2eeMetadata()
const;
227 void setE2eeMetadata(
const std::optional<QXmppE2eeMetadata> &e2eeMetadata);
230 void parse(
const QDomElement &element)
override;
234 void generateAndSetNextId();
238 QSharedDataPointer<QXmppStanzaPrivate> d;
239 friend class TestClient;
Represents an extended address as defined by XEP-0033: Extended Stanza Addressing.
Definition QXmppStanza.h:40
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:96
Error & operator=(Error &&)
Move operator.
~Error()
Default destructor.
Error(Error &&)
Move constructor.
Type
Definition QXmppStanza.h:102
@ Auth
The request needs to be resent after authentication.
Definition QXmppStanza.h:107
@ Modify
The request needs to be changed and resent.
Definition QXmppStanza.h:106
@ Cancel
The error is not temporary.
Definition QXmppStanza.h:104
@ Continue
The error was only a warning.
Definition QXmppStanza.h:105
Condition
A detailed condition of the error.
Definition QXmppStanza.h:112
@ ItemNotFound
The requested item could not be found.
Definition QXmppStanza.h:120
@ ResourceConstraint
The recipient lacks system resources to perform the request.
Definition QXmppStanza.h:135
@ UndefinedCondition
An undefined condition was hit.
Definition QXmppStanza.h:138
@ Forbidden
The requesting entity does not posses the necessary privileges to perform the request.
Definition QXmppStanza.h:117
@ FeatureNotImplemented
The feature is not implemented.
Definition QXmppStanza.h:116
@ RegistrationRequired
The requesting entity needs to register first.
Definition QXmppStanza.h:132
@ NotAcceptable
The request does not meet the defined critera.
Definition QXmppStanza.h:122
@ Redirect
The requested resource is available elsewhere. This is used in combination with a redirection URI.
Definition QXmppStanza.h:131
@ BadRequest
The request does not contain a valid schema.
Definition QXmppStanza.h:114
@ NotAuthorized
The request should be resent after authentication.
Definition QXmppStanza.h:124
@ Conflict
The request conflicts with another.
Definition QXmppStanza.h:115
@ UnexpectedRequest
The request was unexpected.
Definition QXmppStanza.h:139
@ InternalServerError
The server has expierienced an internal error and can not process the request.
Definition QXmppStanza.h:119
@ Gone
The user or server can not be contacted at the address. This is used in combination with a redirectio...
Definition QXmppStanza.h:118
@ SubscriptionRequired
The requester needs to subscribe first.
Definition QXmppStanza.h:137
@ RemoteServerTimeout
The connection to the server could not be established or timed out.
Definition QXmppStanza.h:134
@ RemoteServerNotFound
The remote server could not be found.
Definition QXmppStanza.h:133
@ JidMalformed
The given JID is not valid.
Definition QXmppStanza.h:121
@ ServiceUnavailable
The service is currently not available.
Definition QXmppStanza.h:136
@ NotAllowed
No entity is allowed to perform the request.
Definition QXmppStanza.h:123
@ Q_DECL_ENUMERATOR_DEPRECATED_X
Definition QXmppStanza.h:128
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:90
~QXmppStanza() override
Destroys a QXmppStanza.
QXmppStanza(QXmppStanza &&)
Move constructor.
QXmppStanza & operator=(const QXmppStanza &other)
Assigns other to this stanza.
QXmppStanza & operator=(QXmppStanza &&)
Move-assignment operator.
QXmppStanza(const QXmppStanza &other)
Constructs a copy of other.
SceMode
Definition QXmppGlobal.h:146
@ SceAll
Processes all known elements.
Definition QXmppGlobal.h:147