6 #ifndef QXMPPFILESHARINGPROVIDER_H 7 #define QXMPPFILESHARINGPROVIDER_H 9 #include "QXmppError.h" 10 #include "QXmppGlobal.h" 36 using DownloadResult = std::variant<QXmpp::Success, QXmpp::Cancelled, QXmppError>;
48 virtual void cancel() = 0;
55 virtual ~
Upload() =
default;
57 virtual void cancel() = 0;
72 virtual auto downloadFile(
const std::any &source,
73 std::unique_ptr<QIODevice> target,
74 std::function<
void(quint64, quint64)> reportProgress,
75 std::function<
void(
DownloadResult)> reportFinished) -> std::shared_ptr<Download> = 0;
84 virtual auto uploadFile(std::unique_ptr<QIODevice> source,
86 std::function<
void(quint64, quint64)> reportProgress,
87 std::function<
void(
UploadResult)> reportFinished) -> std::shared_ptr<Upload> = 0;
90 #endif // QXMPPFILESHARINGPROVIDER_H std::variant< QXmpp::Success, QXmpp::Cancelled, QXmppError > DownloadResult
Definition: QXmppFileSharingProvider.h:36
The interface of a provider for the QXmppFileSharingManager.
Definition: QXmppFileSharingProvider.h:31
Definition: QXmppError.h:17
Used to control ongoing downloads.
Definition: QXmppFileSharingProvider.h:43
Definition: QXmppGlobal.h:178
std::variant< std::any, QXmpp::Cancelled, QXmppError > UploadResult
Definition: QXmppFileSharingProvider.h:40
Used to control ongoing uploads.
Definition: QXmppFileSharingProvider.h:52