diff options
Diffstat (limited to 'src/base/QXmppFileShare.h')
| -rw-r--r-- | src/base/QXmppFileShare.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/base/QXmppFileShare.h b/src/base/QXmppFileShare.h new file mode 100644 index 00000000..7d38df23 --- /dev/null +++ b/src/base/QXmppFileShare.h @@ -0,0 +1,52 @@ +// SPDX-FileCopyrightText: 2022 Linus Jahn <lnj@kaidan.im> +// +// SPDX-License-Identifier: LGPL-2.1-or-later + +#ifndef QXMPPFILESHARE_H +#define QXMPPFILESHARE_H + +#include "QXmppGlobal.h" + +#include <QSharedDataPointer> + +class QDomElement; +class QUrl; +class QXmlStreamWriter; +class QXmppFileSharePrivate; +class QXmppFileMetadata; + +class QXMPP_EXPORT QXmppFileShare +{ +public: + enum Disposition { + Inline, + Attachment, + }; + + QXmppFileShare(); + QXmppFileShare(const QXmppFileShare &); + QXmppFileShare(QXmppFileShare &&) noexcept; + ~QXmppFileShare(); + + QXmppFileShare &operator=(const QXmppFileShare &); + QXmppFileShare &operator=(QXmppFileShare &&) noexcept; + + Disposition disposition() const; + void setDisposition(Disposition); + + const QXmppFileMetadata &metadata() const; + void setMetadata(const QXmppFileMetadata &); + + const QVector<QUrl> &httpSources() const; + void setHttpSources(const QVector<QUrl> &newHttpSources); + + /// \cond + bool parse(const QDomElement &el); + void toXml(QXmlStreamWriter *writer) const; + /// \endcond + +private: + QSharedDataPointer<QXmppFileSharePrivate> d; +}; + +#endif // QXMPPFILESHARE_H |
