aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/function/GpgFileOpera.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-01-02 07:07:19 +0000
committerSaturneric <[email protected]>2022-01-02 07:07:19 +0000
commit0f464081971569d9ec6f621cfecdb39a5b8ee2b9 (patch)
tree74ee8b9e83cb599b8b16cadb72ef9621bfc37814 /src/gpg/function/GpgFileOpera.h
parent<refactor, fixed, test>(core, ui): add & modify core and ui (diff)
downloadGpgFrontend-0f464081971569d9ec6f621cfecdb39a5b8ee2b9.tar.gz
GpgFrontend-0f464081971569d9ec6f621cfecdb39a5b8ee2b9.zip
<feat, refactor, fixed>(core, ui): add & modify file operations
1. add non ascii mode for file operations. 2. the suffix of normalized file encryption. 3. refactor general settings.
Diffstat (limited to 'src/gpg/function/GpgFileOpera.h')
-rw-r--r--src/gpg/function/GpgFileOpera.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/gpg/function/GpgFileOpera.h b/src/gpg/function/GpgFileOpera.h
index b7848440..6447e43b 100644
--- a/src/gpg/function/GpgFileOpera.h
+++ b/src/gpg/function/GpgFileOpera.h
@@ -37,22 +37,33 @@ class GpgFileOpera : public SingletonFunctionObject<GpgFileOpera> {
int channel = SingletonFunctionObject::GetDefaultChannel())
: SingletonFunctionObject<GpgFileOpera>(channel) {}
- static GpgError EncryptFile(KeyListPtr keys, const std::string& path,
- GpgEncrResult& result);
+ static unsigned int EncryptFile(KeyListPtr keys, const std::string& in_path,
+ const std::string& out_path,
+ GpgEncrResult& result,
+ int _channel = GPGFRONTEND_DEFAULT_CHANNEL);
- static GpgError DecryptFile(const std::string& path, GpgDecrResult& result);
+ static GpgError DecryptFile(const std::string& in_path,
+ const std::string& out_path,
+ GpgDecrResult& result);
- static GpgError SignFile(KeyListPtr keys, const std::string& path,
- GpgSignResult& result);
+ static GpgError SignFile(KeyListPtr keys, const std::string& in_path,
+ const std::string& out_path, GpgSignResult& result,
+ int _channel = GPGFRONTEND_DEFAULT_CHANNEL);
- static GpgError VerifyFile(const std::string& path, GpgVerifyResult& result);
+ static GpgError VerifyFile(const std::string& data_path,
+ const std::string& sign_path,
+ GpgVerifyResult& result,
+ int _channel = GPGFRONTEND_DEFAULT_CHANNEL);
static GpgError EncryptSignFile(KeyListPtr keys, KeyListPtr signer_keys,
- const std::string& path,
+ const std::string& in_path,
+ const std::string& out_path,
GpgEncrResult& encr_res,
- GpgSignResult& sign_res);
+ GpgSignResult& sign_res,
+ int _channel = GPGFRONTEND_DEFAULT_CHANNEL);
- static GpgError DecryptVerifyFile(const std::string& path,
+ static GpgError DecryptVerifyFile(const std::string& in_path,
+ const std::string& out_path,
GpgDecrResult& decr_res,
GpgVerifyResult& verify_res);
};