Loading...
Searching...
No Matches
QGpgME::EncryptArchiveJob Class Referenceabstract

`#include <encryptarchivejob.h>`

Inheritance diagram for QGpgME::EncryptArchiveJob:
[legend]
Collaboration diagram for QGpgME::EncryptArchiveJob:
[legend]

## Signals

void | fileProgress (int current, int total)
void | dataProgress (int current, int total)
void | result (const GpgME::EncryptionResult &result, const QString &auditLogAsHtml={}, const GpgME::Error &auditLogError={})
Signals inherited from QGpgME::Job
void | jobProgress (int current, int total)
void | rawProgress (const QString &what, int type, int current, int total)
QGPGME_DEPRECATED void | progress (const QString &what, int current, int total)
void | done ()

## Public Member Functions

void | setRecipients (const std::vector< GpgME::Key > &recipients)
std::vector< GpgME::Key > | recipients () const
void | setInputPaths (const std::vector< QString > &paths)
std::vector< QString > | inputPaths () const
void | setOutputFile (const QString &path)
QString | outputFile () const
void | setEncryptionFlags (GpgME::Context::EncryptionFlags flags)
GpgME::Context::EncryptionFlags | encryptionFlags () const
void | setBaseDirectory (const QString &baseDirectory)
QString | baseDirectory () const
virtual GpgME::Error | start (const std::vector< GpgME::Key > &recipients, const std::vector< QString > &paths, const std::shared_ptr< QIODevice > &cipherText, const GpgME::Context::EncryptionFlags flags)=0
Public Member Functions inherited from QGpgME::Job
virtual QString | auditLogAsHtml () const
virtual GpgME::Error | auditLogError () const
bool | isAuditLogSupported () const
GpgME::Error | startIt ()
void | startNow ()

## Static Public Member Functions

static bool | isSupported ()
Static Public Member Functions inherited from QGpgME::Job
static GpgME::Context * | context (Job *job)

## Protected Member Functions

| EncryptArchiveJob (std::unique_ptr< EncryptArchiveJobPrivate >, QObject *parent)
Protected Member Functions inherited from QGpgME::Job
| Job (std::unique_ptr< JobPrivate >, QObject *parent)
| Job (QObject *parent)

## Additional Inherited Members

Public Slots inherited from QGpgME::Job
virtual void | slotCancel ()=0
Protected Attributes inherited from QGpgME::Job
const std::unique_ptr< JobPrivate > | d_ptr

## Detailed Description

Abstract base class for job for creating encrypted archives

## Member Function Documentation

## dataProgress

void QGpgME::EncryptArchiveJob::dataProgress | ( | int | current,
|  | int | total )

signal

This signal is emitted whenever gpgtar sends a progress status update for the amount of processed data. It is only emitted in the writing phase. current is the processed amount data and total is the total amount of data to process. Both values never exceed 2^20.

## fileProgress

void QGpgME::EncryptArchiveJob::fileProgress | ( | int | current,
|  | int | total )

signal

This signal is emitted whenever gpgtar sends a progress status update for the number of files. In the scanning phase (i.e. while gpgtar checks which files to put into the archive), current is the current number of files and total is 0. In the writing phase, current is the number of processed files and total is the total number of files.

## setBaseDirectory()

void EncryptArchiveJob::setBaseDirectory | ( | const QString & | baseDirectory | ) |

Sets the base directory for the relative paths of the input files and the output file.

## setEncryptionFlags()

void EncryptArchiveJob::setEncryptionFlags | ( | GpgME::Context::EncryptionFlags | flags | ) |

Sets the flags to use for encryption. Defaults to `EncryptArchive`. The `EncryptArchive` flag is always assumed set for this job.

Used if the job is started with startIt().

## setInputPaths()

void EncryptArchiveJob::setInputPaths | ( | const std::vector< QString > & | paths | ) |

Sets the paths of the files and folders to put into the archive.

If base directory is set, then the paths must be relative to the base directory.

Used if the job is started with startIt().

## setOutputFile()

void EncryptArchiveJob::setOutputFile | ( | const QString & | path | ) |

Sets the path of the file to write the created archive to.

If path is a relative path and base directory is set, then the path is interpreted relative to the base directory.

Used if the job is started with startIt().

Note
  If a file with this path exists, then the job will fail, i.e. you need to delete an existing file that shall be overwritten before you start the job.

## setRecipients()

void EncryptArchiveJob::setRecipients | ( | const std::vector< GpgME::Key > & | recipients | ) |

Sets the keys to use for encrypting the archive.

Used if the job is started with startIt().

## start()

virtual GpgME::Error QGpgME::EncryptArchiveJob::start | ( | const std::vector< GpgME::Key > & | recipients,
|  | const std::vector< QString > & | paths,
|  | const std::shared_ptr< QIODevice > & | cipherText,
|  | const GpgME::Context::EncryptionFlags | flags )

pure virtual

Starts the creation of an encrypted archive.

Encrypts the files and directories in paths into an archive for the keys in recipients. If recipients is empty, then symmetric encryption is performed. The encrypted archive is written to cipherText.

Emits result() when the job has finished.

Implemented in QGpgME::QGpgMEEncryptArchiveJob.

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

- encryptarchivejob.h
- encryptarchivejob.cpp