6#ifndef QXMPPFILESHARINGPROVIDER_H
7#define QXMPPFILESHARINGPROVIDER_H
10#include "QXmppGlobal.h"
36 using DownloadResult = std::variant<QXmpp::Success, QXmpp::Cancelled, QXmppError>;
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;
Used to control ongoing downloads.
Definition QXmppFileSharingProvider.h:44
virtual void cancel()=0
Cancels the download.
Used to control ongoing uploads.
Definition QXmppFileSharingProvider.h:53
virtual void cancel()=0
Cancels the upload.
The interface of a provider for the QXmppFileSharingManager.
Definition QXmppFileSharingProvider.h:32
virtual auto uploadFile(std::unique_ptr< QIODevice > source, const QXmppFileMetadata &info, std::function< void(quint64, quint64)> reportProgress, std::function< void(UploadResult)> reportFinished) -> std::shared_ptr< Upload >=0
Handles the upload of a file for this provider.
virtual auto downloadFile(const std::any &source, std::unique_ptr< QIODevice > target, std::function< void(quint64, quint64)> reportProgress, std::function< void(DownloadResult)> reportFinished) -> std::shared_ptr< Download >=0
Handles the download of files for this provider.
std::variant< QXmpp::Success, QXmpp::Cancelled, QXmppError > DownloadResult
Definition QXmppFileSharingProvider.h:36
std::variant< std::any, QXmpp::Cancelled, QXmppError > UploadResult
Definition QXmppFileSharingProvider.h:40
Definition QXmppError.h:18
Definition QXmppGlobal.h:181