5 #ifndef QXMPPFILESHARE_H 6 #define QXMPPFILESHARE_H 8 #include "QXmppConstants_p.h" 9 #include "QXmppGlobal.h" 15 #include <QSharedDataPointer> 19 class QXmlStreamWriter;
20 class QXmppFileSourcesAttachmentPrivate;
21 class QXmppFileSharePrivate;
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;
99 #endif // QXMPPFILESHARE_H Definition: QXmppFileSharingManager.h:118
Definition: QXmppFileShare.h:55
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: QXmppFileShare.h:30
Provides progress of stateless file sharing uploads.
Definition: QXmppFileSharingManager.h:31
Represents an encrypted file source for file sharing.
Definition: QXmppEncryptedFileSource.h:20
The QXmppMessage class represents an XMPP message.
Definition: QXmppMessage.h:63
Definition: Algorithms.h:14
Definition: QXmppHttpFileSource.h:16