5#ifndef QXMPPFILESHARE_H
6#define QXMPPFILESHARE_H
8#include "QXmppConstants_p.h"
9#include "QXmppGlobal.h"
15#include <QSharedDataPointer>
19class QXmlStreamWriter;
20class QXmppFileSourcesAttachmentPrivate;
21class QXmppFileSharePrivate;
26namespace QXmpp::Private {
36 const QString &id()
const;
37 void setId(
const QString &);
39 const QVector<QXmppHttpFileSource> &httpSources()
const;
40 void setHttpSources(
const QVector<QXmppHttpFileSource> &newHttpSources);
42 const QVector<QXmppEncryptedFileSource> &encryptedSources()
const;
43 void setEncryptedSources(
const QVector<QXmppEncryptedFileSource> &newEncryptedSources);
45 void toXml(QXmpp::Private::XmlWriter &writer)
const;
50 static std::optional<QXmppFileSourcesAttachment> fromDom(
const QDomElement &el);
52 QSharedDataPointer<QXmppFileSourcesAttachmentPrivate> d;
69 const QString &id()
const;
70 void setId(
const QString &);
75 const QVector<QXmppHttpFileSource> &httpSources()
const;
76 void setHttpSources(
const QVector<QXmppHttpFileSource> &newHttpSources);
78 const QVector<QXmppEncryptedFileSource> &encryptedSources()
const;
79 void setEncryptedSourecs(
const QVector<QXmppEncryptedFileSource> &newEncryptedSources);
82 static constexpr std::tuple XmlTag = { u
"file-sharing", QXmpp::Private::ns_sfs };
83 bool parse(
const QDomElement &el);
84 void toXml(QXmlStreamWriter *writer)
const;
91 void visitSources(std::function<
bool(
const std::any &)> &&visitor)
const;
92 void addSource(
const std::any &source);
96 QSharedDataPointer<QXmppFileSharePrivate> d;
Represents an encrypted file source for file sharing.
Definition QXmppEncryptedFileSource.h:21
Definition QXmppFileShare.h:56
Disposition
Decides whether to display the file contents (e.g. an image) inline in the chat or as a file.
Definition QXmppFileShare.h:58
Definition QXmppFileSharingManager.h:119
Definition QXmppFileShare.h:31
Provides progress of stateless file sharing uploads.
Definition QXmppFileSharingManager.h:32
Definition QXmppHttpFileSource.h:17
The QXmppMessage class represents an XMPP message.
Definition QXmppMessage.h:64