diff options
| author | Jonah BrĂ¼chert <jbb@kaidan.im> | 2022-09-28 13:38:25 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-09-28 15:56:05 +0200 |
| commit | 1916eca1a982b22c10c1c737fcbcb86bee0ec5cc (patch) | |
| tree | 7ebda6bc36a8e0df2b0130cb844902f840d37a47 /src/base/QXmppOutOfBandUrl.h | |
| parent | 61564526f1cfd53c31353aeb6df26ba0f5da9834 (diff) | |
| download | qxmpp-1916eca1a982b22c10c1c737fcbcb86bee0ec5cc.tar.gz | |
Allow adding multiple oob urls and a description
Diffstat (limited to 'src/base/QXmppOutOfBandUrl.h')
| -rw-r--r-- | src/base/QXmppOutOfBandUrl.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/base/QXmppOutOfBandUrl.h b/src/base/QXmppOutOfBandUrl.h new file mode 100644 index 00000000..6df2abc9 --- /dev/null +++ b/src/base/QXmppOutOfBandUrl.h @@ -0,0 +1,40 @@ +// SPDX-FileCopyrightText: 2022 Jonah BrĂ¼chert <jbb@kaidan.im> +// +// SPDX-License-Identifier: LGPL-2.1-or-later + +#ifndef QXMPPOUTOFBANDURL_H +#define QXMPPOUTOFBANDURL_H + +#include "QXmppGlobal.h" + +#include <optional> + +#include <QSharedDataPointer> + +class QXmppOutOfBandUrlPrivate; +class QDomElement; +class QXmlStreamWriter; + +class QXMPP_EXPORT QXmppOutOfBandUrl +{ +public: + QXmppOutOfBandUrl(); + + QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppOutOfBandUrl) + + const QString &url() const; + void setUrl(const QString &url); + + const std::optional<QString> &description() const; + void setDescription(const std::optional<QString> &description); + + /// \cond + bool parse(const QDomElement &el); + void toXml(QXmlStreamWriter *writer) const; + /// \endcond + +private: + QSharedDataPointer<QXmppOutOfBandUrlPrivate> d; +}; + +#endif // QXMPPOUTOFBANDURL_H |
