diff options
| author | Ingo Klöcker <[email protected]> | 2023-06-21 15:24:00 +0200 |
|---|---|---|
| committer | Ingo Klöcker <[email protected]> | 2023-06-21 15:25:11 +0200 |
| commit | 1c2459a5927866931808141ac6c4157cd5e3a157 (patch) | |
| tree | 510b6b55fb6fd2553052caf9cd255336635cac2e /lang/qt/src/decryptverifyarchivejob.h | |
| parent | core: Support reading the archive to decrypt/verify directly from a file (diff) | |
| download | gpgme-1c2459a5927866931808141ac6c4157cd5e3a157.tar.gz gpgme-1c2459a5927866931808141ac6c4157cd5e3a157.zip | |
qt: Support reading signed/encrypted archives directly from a file
* lang/qt/src/decryptverifyarchivejob.cpp,
lang/qt/src/decryptverifyarchivejob.h (DecryptVerifyArchiveJob): Add
member functions setInputFile, inputFile.
* lang/qt/src/decryptverifyarchivejob_p.h
(DecryptVerifyArchiveJobPrivate): Add member m_inputFilePath.
* lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (decrypt_verify): Move
creation of indata to decrypt_verify_from_io_device.
(decrypt_verify_from_io_device, decrypt_verify_from_file_name): New.
(QGpgMEDecryptVerifyArchiveJob::start): Use
decrypt_verify_from_io_device instead of decrypt_verify.
(QGpgMEDecryptVerifyArchiveJobPrivate::startIt): Start the job with the
values from member variables.
* lang/qt/tests/run-decryptverifyarchivejob.cpp (createInput): Remove.
(main): Remove creation of input. Make the job read the archive directly
from the given archive name.
--
This makes it possible to tell gpgtar to read the signed/encrypted
archive directly from a specified file bypassing GpgME's Data IO.
GnuPG-bug-id: 6530
Diffstat (limited to 'lang/qt/src/decryptverifyarchivejob.h')
| -rw-r--r-- | lang/qt/src/decryptverifyarchivejob.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lang/qt/src/decryptverifyarchivejob.h b/lang/qt/src/decryptverifyarchivejob.h index 4e72be2d..6d87dd36 100644 --- a/lang/qt/src/decryptverifyarchivejob.h +++ b/lang/qt/src/decryptverifyarchivejob.h @@ -63,6 +63,18 @@ public: static bool isSupported(); + /** + * Sets the path of the file to read the archive from. + * + * Used if the job is started with startIt(). + */ + void setInputFile(const QString &path); + QString inputFile() const; + + /** + * Sets the directory the content of the decrypted archive shall be + * written to. + */ void setOutputDirectory(const QString &outputDirectory); QString outputDirectory() const; |
