From 34b456c3fb9e59788b07a75441da482bb28bda87 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Tue, 9 Aug 2016 13:10:08 +0200 Subject: Qt: Add support for EncryptJobs with generic flags * lang/qt/src/encryptjob.h, lang/qt/src/signencryptjob.h, lang/qt/src/qgpgmeencryptjob.h, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmeencryptjob.cpp: Add start and exec overloads that accept generic EncryptFlags. -- While this technically is an ABI break (vtable change) there are no known classes outside qgpgme that inherit encryptjob or signencryptjob. And the new functions should be added to the bottom of the vtable. --- lang/qt/src/signencryptjob.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lang/qt/src/signencryptjob.h') diff --git a/lang/qt/src/signencryptjob.h b/lang/qt/src/signencryptjob.h index 4818d2af..b0aafe3c 100644 --- a/lang/qt/src/signencryptjob.h +++ b/lang/qt/src/signencryptjob.h @@ -38,8 +38,10 @@ #ifdef BUILDING_QGPGME # include "global.h" +# include "context.h" #else # include +# include #endif #include @@ -123,6 +125,21 @@ public: */ virtual void setOutputIsBase64Encoded(bool) = 0; + /** Like start but with an additional argument for EncryptionFlags for + * more flexibility. */ + virtual void start(const std::vector &signers, + const std::vector &recipients, + const std::shared_ptr &plainText, + const std::shared_ptr &cipherText = std::shared_ptr(), + const GpgME::Context::EncryptionFlags flags = GpgME::Context::None) = 0; + + /** Like exec but with an additional argument for EncryptionFlags for + * more flexibility. */ + virtual std::pair + exec(const std::vector &signers, + const std::vector &recipients, + const QByteArray &plainText, + const GpgME::Context::EncryptionFlags flags, QByteArray &cipherText) = 0; Q_SIGNALS: void result(const GpgME::SigningResult &signingresult, const GpgME::EncryptionResult &encryptionresult, -- cgit v1.2.3