21#include "QXmppConstants_p.h"
22#include "QXmppElement.h"
23#include "QXmppNonza.h"
25#include <QXmlStreamWriter>
28class QXmppExtendedAddressPrivate;
66 QString description()
const;
67 void setDescription(
const QString &description);
70 void setJid(
const QString &jid);
73 void setType(
const QString &type);
75 bool isDelivered()
const;
76 void setDelivered(
bool);
81 static constexpr std::tuple XmlTag = { u
"address", QXmpp::Private::ns_extended_addressing };
82 void parse(
const QDomElement &element);
83 void toXml(QXmlStreamWriter *writer)
const;
87 QSharedDataPointer<QXmppExtendedAddressPrivate> d;
90class QXmppStanzaPrivate;
91class QXmppStanzaErrorPrivate;
141#if QXMPP_DEPRECATED_SINCE(1, 3)
146 RecipientUnavailable = 12,
163 Error(
const QString &type,
const QString &cond,
const QString &text = QString());
165 Error(QSharedDataPointer<QXmppStanzaErrorPrivate> d);
173 void setCode(
int code);
175 QString text()
const;
176 void setText(
const QString &text);
182 void setType(
Type type);
185 void setBy(
const QString &by);
187 QString redirectionUri()
const;
188 void setRedirectionUri(
const QString &redirectionUri);
191 std::optional<QXmpp::JingleErrorCondition> jingleErrorCondition()
const;
192 void setJingleErrorCondition(std::optional<QXmpp::JingleErrorCondition>);
195 bool fileTooLarge()
const;
196 void setFileTooLarge(
bool);
198 qint64 maxFileSize()
const;
199 void setMaxFileSize(qint64);
201 QDateTime retryDate()
const;
202 void setRetryDate(
const QDateTime &);
205 void parse(
const QDomElement &element);
206 void toXml(QXmlStreamWriter *writer)
const;
212 QSharedDataPointer<QXmppStanzaErrorPrivate> d;
215 QXmppStanza(
const QString &from = QString(),
const QString &to = QString());
224 void setTo(
const QString &);
226 QString from()
const;
227 void setFrom(
const QString &);
230 void setId(
const QString &);
232 QString lang()
const;
233 void setLang(
const QString &);
236 std::optional<Error> errorOptional()
const;
238 void setError(
const std::optional<Error> &error);
240 QXmppElementList extensions()
const;
241 void setExtensions(
const QXmppElementList &elements);
243 QList<QXmppExtendedAddress> extendedAddresses()
const;
244 void setExtendedAddresses(
const QList<QXmppExtendedAddress> &extendedAddresses);
246 std::optional<QXmppE2eeMetadata> e2eeMetadata()
const;
247 void setE2eeMetadata(
const std::optional<QXmppE2eeMetadata> &e2eeMetadata);
250 void parse(
const QDomElement &element)
override;
254 void generateAndSetNextId();
258 QSharedDataPointer<QXmppStanzaPrivate> d;
259 friend class TestClient;
Represents an extended address as defined by XEP-0033: Extended Stanza Addressing.
Definition QXmppStanza.h:56
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:112
Error & operator=(Error &&)
Move operator.
~Error()
Default destructor.
Error(Error &&)
Move constructor.
Type
Definition QXmppStanza.h:118
@ Auth
The request needs to be resent after authentication.
Definition QXmppStanza.h:123
@ Modify
The request needs to be changed and resent.
Definition QXmppStanza.h:122
@ Cancel
The error is not temporary.
Definition QXmppStanza.h:120
@ Continue
The error was only a warning.
Definition QXmppStanza.h:121
Condition
A detailed condition of the error.
Definition QXmppStanza.h:128
@ ItemNotFound
The requested item could not be found.
Definition QXmppStanza.h:136
@ ResourceConstraint
The recipient lacks system resources to perform the request.
Definition QXmppStanza.h:151
@ UndefinedCondition
An undefined condition was hit.
Definition QXmppStanza.h:154
@ Forbidden
The requesting entity does not posses the necessary privileges to perform the request.
Definition QXmppStanza.h:133
@ FeatureNotImplemented
The feature is not implemented.
Definition QXmppStanza.h:132
@ RegistrationRequired
The requesting entity needs to register first.
Definition QXmppStanza.h:148
@ NotAcceptable
The request does not meet the defined critera.
Definition QXmppStanza.h:138
@ Redirect
The requested resource is available elsewhere. This is used in combination with a redirection URI.
Definition QXmppStanza.h:147
@ BadRequest
The request does not contain a valid schema.
Definition QXmppStanza.h:130
@ NotAuthorized
The request should be resent after authentication.
Definition QXmppStanza.h:140
@ Conflict
The request conflicts with another.
Definition QXmppStanza.h:131
@ UnexpectedRequest
The request was unexpected.
Definition QXmppStanza.h:155
@ InternalServerError
The server has expierienced an internal error and can not process the request.
Definition QXmppStanza.h:135
@ Gone
The user or server can not be contacted at the address. This is used in combination with a redirectio...
Definition QXmppStanza.h:134
@ SubscriptionRequired
The requester needs to subscribe first.
Definition QXmppStanza.h:153
@ RemoteServerTimeout
The connection to the server could not be established or timed out.
Definition QXmppStanza.h:150
@ RemoteServerNotFound
The remote server could not be found.
Definition QXmppStanza.h:149
@ JidMalformed
The given JID is not valid.
Definition QXmppStanza.h:137
@ ServiceUnavailable
The service is currently not available.
Definition QXmppStanza.h:152
@ NotAllowed
No entity is allowed to perform the request.
Definition QXmppStanza.h:139
@ Q_DECL_ENUMERATOR_DEPRECATED_X
Definition QXmppStanza.h:144
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:106
~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.
Definition Algorithms.h:14
JingleErrorCondition
Definition QXmppStanza.h:37
SceMode
Definition QXmppGlobal.h:148
@ SceAll
Processes all known elements.
Definition QXmppGlobal.h:149