diff options
author | Saturneric <[email protected]> | 2021-09-19 15:54:06 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-09-19 15:54:06 +0000 |
commit | 0f0b9510bbb8be150984bfa8af03f43e1d4135d3 (patch) | |
tree | 6436834f05ac0fe32646dbf47488d25a98ddf8fa /src/gpg/function/GpgKeyImportExportor.h | |
parent | Continue to write core test code. (diff) | |
download | GpgFrontend-0f0b9510bbb8be150984bfa8af03f43e1d4135d3.tar.gz GpgFrontend-0f0b9510bbb8be150984bfa8af03f43e1d4135d3.zip |
Support multi-channel Context.
Make the test configurable.
Other modifications.
Diffstat (limited to 'src/gpg/function/GpgKeyImportExportor.h')
-rw-r--r-- | src/gpg/function/GpgKeyImportExportor.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/gpg/function/GpgKeyImportExportor.h b/src/gpg/function/GpgKeyImportExportor.h index 455e59f8..2cdb4e80 100644 --- a/src/gpg/function/GpgKeyImportExportor.h +++ b/src/gpg/function/GpgKeyImportExportor.h @@ -25,6 +25,7 @@ #ifndef _GPGKEYIMPORTEXPORTOR_H #define _GPGKEYIMPORTEXPORTOR_H +#include <string> #include "gpg/GpgConstants.h" #include "gpg/GpgContext.h" #include "gpg/GpgFunctionObject.h" @@ -33,7 +34,7 @@ namespace GpgFrontend { class GpgImportedKey { -public: + public: std::string fpr; int import_status; }; @@ -41,7 +42,7 @@ public: typedef std::list<GpgImportedKey> GpgImportedKeyList; class GpgImportInformation { -public: + public: GpgImportInformation() = default; explicit GpgImportInformation(gpgme_import_result_t result) { @@ -93,19 +94,20 @@ public: class GpgKeyImportExportor : public SingletonFunctionObject<GpgKeyImportExportor> { -public: + public: GpgImportInformation ImportKey(StdBypeArrayPtr inBuffer); - bool ExportKeys(KeyIdArgsListPtr &uid_list, BypeArrayPtr &out_buffer) const; + bool ExportKeys(KeyIdArgsListPtr& uid_list, BypeArrayPtr& out_buffer) const; - bool ExportKeys(KeyArgsList &keys, BypeArrayPtr &outBuffer) const; + bool ExportKeys(KeyArgsList& keys, BypeArrayPtr& outBuffer) const; - bool ExportSecretKey(const GpgKey &key, BypeArrayPtr outBuffer) const; + bool ExportSecretKey(const GpgKey& key, BypeArrayPtr outBuffer) const; -private: - GpgContext &ctx = GpgContext::GetInstance(); + private: + GpgContext& ctx = + GpgContext::GetInstance(SingletonFunctionObject::GetDefaultChannel()); }; -} // namespace GpgFrontend +} // namespace GpgFrontend -#endif // _GPGKEYIMPORTEXPORTOR_H
\ No newline at end of file +#endif // _GPGKEYIMPORTEXPORTOR_H
\ No newline at end of file |