GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgTypedef.h
1 
29 #pragma once
30 
31 #include <tuple>
32 
33 #include "core/model/DataObject.h"
34 
35 namespace GpgFrontend {
36 
37 class GpgKey;
38 class GpgSubKey;
39 class GpgSignature;
40 class GpgTOFUInfo;
41 
42 using GpgError = gpgme_error_t;
43 using GpgErrorCode = gpg_err_code_t;
44 using GpgErrorDesc = std::pair<QString, QString>;
45 
46 using KeyId = QString;
47 using SubkeyId = QString;
48 using KeyIdArgsList = std::vector<KeyId>;
49 using KeyIdArgsListPtr = std::unique_ptr<KeyIdArgsList>;
50 using UIDArgsList = std::vector<QString>;
51 using UIDArgsListPtr = std::unique_ptr<UIDArgsList>;
52 using SignIdArgsList = std::vector<std::pair<QString, QString>>;
53 using SignIdArgsListPtr = std::unique_ptr<SignIdArgsList>;
54 using KeyFprArgsListPtr = std::unique_ptr<std::vector<QString>>;
55 using KeyArgsList = std::vector<GpgKey>;
56 using KeyListPtr = std::shared_ptr<KeyArgsList>;
57 using GpgKeyLinkList = std::list<GpgKey>;
58 using KeyLinkListPtr = std::unique_ptr<GpgKeyLinkList>;
59 using KeyPtr = std::unique_ptr<GpgKey>;
60 using KeyPtrArgsList = const std::initializer_list<KeyPtr>;
61 
62 using GpgSignMode = gpgme_sig_mode_t;
63 
64 using GpgOperaRunnable = std::function<GpgError(DataObjectPtr)>;
65 using GpgOperationCallback = std::function<void(GpgError, DataObjectPtr)>;
66 using GpgOperationFuture = std::future<std::tuple<GpgError, DataObjectPtr>>;
67 
68 enum GpgOperation {
69  kENCRYPT,
70  kDECRYPT,
71  kSIGN,
72  kVERIFY,
73  kENCRYPT_SIGN,
74  kDECRYPT_VERIFY
75 };
76 } // namespace GpgFrontend
Definition: app.cpp:39
gpgme_error_t GpgError
gpgme error
Definition: GpgTypedef.h:42