QXmpp Version: 1.10.0
|
Public Member Functions | |
QXmppHttpFileSharingProvider (QXmppHttpUploadManager *manager, QNetworkAccessManager *netManager) | |
Create a QXmppHttpFileSharingProvider. More... | |
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 > override |
Handles the download of files for this provider. More... | |
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 > override |
Handles the upload of a file for this provider. More... | |
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. More... | |
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. More... | |
Additional Inherited Members | |
Public Types inherited from QXmppFileSharingProvider | |
using | DownloadResult = std::variant< QXmpp::Success, QXmpp::Cancelled, QXmppError > |
using | UploadResult = std::variant< std::any, QXmpp::Cancelled, QXmppError > |
A file sharing provider that uses HTTP File Upload to upload and download files.
QXmppHttpFileSharingProvider::QXmppHttpFileSharingProvider | ( | QXmppHttpUploadManager * | manager, |
QNetworkAccessManager * | netManager | ||
) |
Create a QXmppHttpFileSharingProvider.
manager | |
netManager | QNetworkAccessManager that can be reused all over your application. |
|
overridevirtual |
Handles the download of files for this provider.
source | A type-erased source object. The provider will only ever have to handle its own sources, so this can safely be casted to the defined source type. |
target | QIODevice into which the received data should be written |
reportProgress | Can be called to report received bytes and total bytes |
reportFinished | Finalizes the download, no more progress must be reported after this |
Implements QXmppFileSharingProvider.
|
overridevirtual |
Handles the upload of a file for this provider.
source | A QIODevice from which data for uploading should be read. |
info | Metadata of the file |
reportProgress | Can be called to report sent bytes and total bytes |
reportFinished | Finalizes the upload, no more progress must be reported after this |
Implements QXmppFileSharingProvider.