aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/gpg/GpgFileOpera.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/function/gpg/GpgFileOpera.h')
-rw-r--r--src/core/function/gpg/GpgFileOpera.h107
1 files changed, 101 insertions, 6 deletions
diff --git a/src/core/function/gpg/GpgFileOpera.h b/src/core/function/gpg/GpgFileOpera.h
index b015ebe9..d7c2d44c 100644
--- a/src/core/function/gpg/GpgFileOpera.h
+++ b/src/core/function/gpg/GpgFileOpera.h
@@ -61,7 +61,7 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
* @param channel Channel in context
* @return unsigned int error code
*/
- void EncryptFile(KeyArgsList keys, const QString& in_path, bool ascii,
+ void EncryptFile(const KeyArgsList& keys, const QString& in_path, bool ascii,
const QString& out_path, const GpgOperationCallback& cb);
/**
@@ -71,10 +71,23 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
* @param in_path
* @param ascii
* @param out_path
+ * @return std::tuple<GpgError, DataObjectPtr>
+ */
+ auto EncryptFileSync(const KeyArgsList& keys, const QString& in_path,
+ bool ascii, const QString& out_path)
+ -> std::tuple<GpgError, DataObjectPtr>;
+
+ /**
+ * @brief
+ *
+ * @param keys
+ * @param in_path
+ * @param ascii
+ * @param out_path
* @param cb
*/
- void EncryptDirectory(KeyArgsList keys, const QString& in_path, bool ascii,
- const QString& out_path,
+ void EncryptDirectory(const KeyArgsList& keys, const QString& in_path,
+ bool ascii, const QString& out_path,
const GpgOperationCallback& cb);
/**
@@ -98,6 +111,18 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
* @param out_path
* @param cb
*/
+ auto EncryptFileSymmetricSync(const QString& in_path, bool ascii,
+ const QString& out_path)
+ -> std::tuple<GpgError, DataObjectPtr>;
+
+ /**
+ * @brief
+ *
+ * @param in_path
+ * @param ascii
+ * @param out_path
+ * @param cb
+ */
void EncryptDerectorySymmetric(const QString& in_path, bool ascii,
const QString& out_path,
const GpgOperationCallback& cb);
@@ -106,6 +131,17 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
* @brief
*
* @param in_path
+ * @param ascii
+ * @param out_path
+ */
+ auto EncryptDerectorySymmetricSync(const QString& in_path, bool ascii,
+ const QString& out_path)
+ -> std::tuple<GpgError, DataObjectPtr>;
+
+ /**
+ * @brief
+ *
+ * @param in_path
* @param out_path
* @param result
* @return GpgError
@@ -119,6 +155,17 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
* @param in_path
* @param out_path
* @param cb
+ * @return std::tuple<GpgError, DataObjectPtr>
+ */
+ auto DecryptFileSync(const QString& in_path, const QString& out_path)
+ -> std::tuple<GpgError, DataObjectPtr>;
+
+ /**
+ * @brief
+ *
+ * @param in_path
+ * @param out_path
+ * @param cb
*/
void DecryptArchive(const QString& in_path, const QString& out_path,
const GpgOperationCallback& cb);
@@ -133,10 +180,23 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
* @param channel
* @return GpgError
*/
- void SignFile(KeyArgsList keys, const QString& in_path, bool ascii,
+ void SignFile(const KeyArgsList& keys, const QString& in_path, bool ascii,
const QString& out_path, const GpgOperationCallback& cb);
/**
+ * @brief
+ *
+ * @param keys
+ * @param in_path
+ * @param ascii
+ * @param out_path
+ * @return std::tuple<GpgError, DataObjectPtr>
+ */
+ auto SignFileSync(const KeyArgsList& keys, const QString& in_path, bool ascii,
+ const QString& out_path)
+ -> std::tuple<GpgError, DataObjectPtr>;
+
+ /**
* @brief Verify file with public key
*
* @param data_path The path where the enter file is located
@@ -151,6 +211,16 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
/**
* @brief
*
+ * @param data_path
+ * @param sign_path
+ * @return std::tuple<GpgError, DataObjectPtr>
+ */
+ auto VerifyFileSync(const QString& data_path, const QString& sign_path)
+ -> std::tuple<GpgError, DataObjectPtr>;
+
+ /**
+ * @brief
+ *
* @param keys
* @param signer_keys
* @param in_path
@@ -158,7 +228,7 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
* @param out_path
* @param cb
*/
- void EncryptSignFile(KeyArgsList keys, KeyArgsList signer_keys,
+ void EncryptSignFile(const KeyArgsList& keys, const KeyArgsList& signer_keys,
const QString& in_path, bool ascii,
const QString& out_path, const GpgOperationCallback& cb);
@@ -170,9 +240,25 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
* @param in_path
* @param ascii
* @param out_path
+ */
+ auto EncryptSignFileSync(const KeyArgsList& keys,
+ const KeyArgsList& signer_keys,
+ const QString& in_path, bool ascii,
+ const QString& out_path)
+ -> std::tuple<GpgError, DataObjectPtr>;
+
+ /**
+ * @brief
+ *
+ * @param keys
+ * @param signer_keys
+ * @param in_path
+ * @param ascii
+ * @param out_path
* @param cb
*/
- void EncryptSignDirectory(KeyArgsList keys, KeyArgsList signer_keys,
+ void EncryptSignDirectory(const KeyArgsList& keys,
+ const KeyArgsList& signer_keys,
const QString& in_path, bool ascii,
const QString& out_path,
const GpgOperationCallback& cb);
@@ -194,6 +280,15 @@ class GPGFRONTEND_CORE_EXPORT GpgFileOpera
*
* @param in_path
* @param out_path
+ */
+ auto DecryptVerifyFileSync(const QString& in_path, const QString& out_path)
+ -> std::tuple<GpgError, DataObjectPtr>;
+
+ /**
+ * @brief
+ *
+ * @param in_path
+ * @param out_path
* @param cb
*/
void DecryptVerifyArchive(const QString& in_path, const QString& out_path,