5#ifndef QXMPPFILESHARE_H
6#define QXMPPFILESHARE_H
8#include "QXmppGlobal.h"
14#include <QSharedDataPointer>
18class QXmlStreamWriter;
19class QXmppFileSourcesAttachmentPrivate;
20class QXmppFileSharePrivate;
31 const QString &id()
const;
32 void setId(
const QString &);
34 const QVector<QXmppHttpFileSource> &httpSources()
const;
35 void setHttpSources(
const QVector<QXmppHttpFileSource> &newHttpSources);
37 const QVector<QXmppEncryptedFileSource> &encryptedSources()
const;
38 void setEncryptedSources(
const QVector<QXmppEncryptedFileSource> &newEncryptedSources);
43 static std::optional<QXmppFileSourcesAttachment> fromDom(
const QDomElement &el);
44 void toXml(QXmlStreamWriter *writer)
const;
46 QSharedDataPointer<QXmppFileSourcesAttachmentPrivate> d;
63 const QString &id()
const;
64 void setId(
const QString &);
69 const QVector<QXmppHttpFileSource> &httpSources()
const;
70 void setHttpSources(
const QVector<QXmppHttpFileSource> &newHttpSources);
72 const QVector<QXmppEncryptedFileSource> &encryptedSources()
const;
73 void setEncryptedSourecs(
const QVector<QXmppEncryptedFileSource> &newEncryptedSources);
76 bool parse(
const QDomElement &el);
77 void toXml(QXmlStreamWriter *writer)
const;
84 void visitSources(std::function<
bool(
const std::any &)> &&visitor)
const;
85 void addSource(
const std::any &source);
89 QSharedDataPointer<QXmppFileSharePrivate> d;
Represents an encrypted file source for file sharing.
Definition: QXmppEncryptedFileSource.h:21
Definition: QXmppFileShare.h:50
Disposition
Decides whether to display the file contents (e.g. an image) inline in the chat or as a file.
Definition: QXmppFileShare.h:52
Definition: QXmppFileSharingManager.h:119
Definition: QXmppFileShare.h:26
Provides progress of stateless file sharing uploads.
Definition: QXmppFileSharingManager.h:32
Definition: QXmppHttpFileSource.h:16
The QXmppMessage class represents an XMPP message.
Definition: QXmppMessage.h:64
virtual void toXml(QXmlStreamWriter *writer) const =0