aboutsummaryrefslogtreecommitdiffstats
path: root/include/gpg/GpgConstants.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-09-04 07:18:45 +0000
committerSaturneric <[email protected]>2021-09-04 07:18:45 +0000
commit4d9024347b0780afb955f0dbbda5d38907fe5200 (patch)
tree268022cbb9be8d7ca21b8dc7ae5f7834bd3f03ac /include/gpg/GpgConstants.h
parentModified VerifyResultAnalyse (diff)
downloadGpgFrontend-4d9024347b0780afb955f0dbbda5d38907fe5200.tar.gz
GpgFrontend-4d9024347b0780afb955f0dbbda5d38907fe5200.zip
Modified ResultAnalyse.
Add Test.
Diffstat (limited to 'include/gpg/GpgConstants.h')
-rw-r--r--include/gpg/GpgConstants.h45
1 files changed, 32 insertions, 13 deletions
diff --git a/include/gpg/GpgConstants.h b/include/gpg/GpgConstants.h
index 61037170..b4ba0e3c 100644
--- a/include/gpg/GpgConstants.h
+++ b/include/gpg/GpgConstants.h
@@ -25,19 +25,38 @@
#ifndef GPG_CONSTANTS_H
#define GPG_CONSTANTS_H
-class QString;
+#include "GpgFrontend.h"
const int RESTART_CODE = 1000;
-class GpgConstants {
-public:
- static const char *PGP_CRYPT_BEGIN;
- static const char *PGP_CRYPT_END;
- static const char *PGP_SIGNED_BEGIN;
- static const char *PGP_SIGNED_END;
- static const char *PGP_SIGNATURE_BEGIN;
- static const char *PGP_SIGNATURE_END;
- static const char *GPG_FRONTEND_SHORT_CRYPTO_HEAD;
-};
-
-#endif // CONSTANTS_H
+namespace GpgFrontend {
+
+ using BypeArrayPtr = std::unique_ptr<QByteArray>;
+ using BypeArrayRef = QByteArray &;
+
+ using GpgError = gpgme_error_t;
+
+ using GpgEncrResult = std::unique_ptr<struct _gpgme_op_encrypt_result, std::function<void(
+ gpgme_encrypt_result_t)>>;
+ using GpgDecrResult = std::unique_ptr<struct _gpgme_op_decrypt_result, std::function<void(
+ gpgme_decrypt_result_t)>>;
+ using GpgSignResult = std::unique_ptr<struct _gpgme_op_sign_result, std::function<void(
+ gpgme_sign_result_t)>>;
+ using GpgVerifyResult = std::unique_ptr<struct _gpgme_op_verify_result, std::function<void(
+ gpgme_verify_result_t)>>;
+
+ class GpgConstants {
+ public:
+ static const char *PGP_CRYPT_BEGIN;
+ static const char *PGP_CRYPT_END;
+ static const char *PGP_SIGNED_BEGIN;
+ static const char *PGP_SIGNED_END;
+ static const char *PGP_SIGNATURE_BEGIN;
+ static const char *PGP_SIGNATURE_END;
+ static const char *GPG_FRONTEND_SHORT_CRYPTO_HEAD;
+ };
+}
+
+
+
+#endif // GPG_CONSTANTS_H