QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QXmppEncryptedFileSharingProvider Class Reference
Inheritance diagram for QXmppEncryptedFileSharingProvider:
Inheritance graph
[legend]
Collaboration diagram for QXmppEncryptedFileSharingProvider:
Collaboration graph
[legend]

Public Member Functions

 QXmppEncryptedFileSharingProvider (QXmppFileSharingManager *manager, std::shared_ptr< QXmppFileSharingProvider > uploadBaseProvider)
 Create a new QXmppEncryptedFileSharingProvider.
 
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.
 
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.
 

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 >
 

Detailed Description

Encrypts or decrypts files on the fly when uploading or downloading.

Since
QXmpp 1.5

Constructor & Destructor Documentation

◆ QXmppEncryptedFileSharingProvider()

QXmppEncryptedFileSharingProvider::QXmppEncryptedFileSharingProvider ( QXmppFileSharingManager manager,
std::shared_ptr< QXmppFileSharingProvider uploadBaseProvider 
)

Create a new QXmppEncryptedFileSharingProvider.

Parameters
managerQXmppFileSharingManager to be used to find other providers for downloading encrypted files.
uploadBaseProviderProvider to be used for uploading the encrypted files.

Member Function Documentation

◆ downloadFile()

auto QXmppEncryptedFileSharingProvider::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 >
overridevirtual

Handles the download of files for this provider.

Parameters
sourceA 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.
targetQIODevice into which the received data should be written
reportProgressCan be called to report received bytes and total bytes
reportFinishedFinalizes the download, no more progress must be reported after this

Implements QXmppFileSharingProvider.

◆ uploadFile()

auto QXmppEncryptedFileSharingProvider::uploadFile ( std::unique_ptr< QIODevice >  source,
const QXmppFileMetadata info,
std::function< void(quint64, quint64)>  reportProgress,
std::function< void(UploadResult)>  reportFinished 
) -> std::shared_ptr< Upload >
overridevirtual

Handles the upload of a file for this provider.

Parameters
sourceA QIODevice from which data for uploading should be read.
infoMetadata of the file
reportProgressCan be called to report sent bytes and total bytes
reportFinishedFinalizes the upload, no more progress must be reported after this

Implements QXmppFileSharingProvider.


The documentation for this class was generated from the following files: