29 #ifndef GPG_CONSTANTS_H
30 #define GPG_CONSTANTS_H
32 #include "GpgFrontendCore.h"
34 const int RESTART_CODE = 1000;
38 using ByteArray = std::string;
39 using ByteArrayPtr = std::unique_ptr<ByteArray>;
40 using StdBypeArrayPtr = std::unique_ptr<ByteArray>;
41 using BypeArrayRef = ByteArray&;
42 using BypeArrayConstRef =
const ByteArray&;
43 using StringArgsPtr = std::unique_ptr<std::vector<std::string>>;
44 using StringArgsRef = std::vector<std::string>&;
46 using GpgError = gpgme_error_t;
53 void operator()(
void* _result);
56 using GpgEncrResult = std::shared_ptr<struct _gpgme_op_encrypt_result>;
57 using GpgDecrResult = std::shared_ptr<struct _gpgme_op_decrypt_result>;
58 using GpgSignResult = std::shared_ptr<struct _gpgme_op_sign_result>;
59 using GpgVerifyResult = std::shared_ptr<struct _gpgme_op_verify_result>;
60 using GpgGenKeyResult = std::shared_ptr<struct _gpgme_op_genkey_result>;
70 GPGFRONTEND_CORE_EXPORT GpgEncrResult
79 GPGFRONTEND_CORE_EXPORT GpgDecrResult
88 GPGFRONTEND_CORE_EXPORT GpgSignResult
_new_result(gpgme_sign_result_t&& result);
96 GPGFRONTEND_CORE_EXPORT GpgVerifyResult
105 GPGFRONTEND_CORE_EXPORT GpgGenKeyResult
126 const std::string& comment);
136 gpgme_error_t err, gpgme_error_t predict = GPG_ERR_NO_ERROR);
147 BypeArrayConstRef fingerprint);
168 const std::string& path,
const std::string& out_buffer);
197 const int GPGFRONTEND_DEFAULT_CHANNEL = 0;
198 const int GPGFRONTEND_NON_ASCII_CHANNEL = 2;
207 static const char* PGP_CRYPT_END;
208 static const char* PGP_SIGNED_BEGIN;
209 static const char* PGP_SIGNED_END;
210 static const char* PGP_SIGNATURE_BEGIN;
211 static const char* PGP_SIGNATURE_END;
212 static const char* PGP_PUBLIC_KEY_BEGIN;
213 static const char* PGP_PRIVATE_KEY_BEGIN;
214 static const char* GPG_FRONTEND_SHORT_CRYPTO_HEAD;
219 #endif // GPG_CONSTANTS_H