GpgFrontend Project A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.

GpgKeyOpera.h
1
29 #ifndef _GPGKEYOPERA_H
30 #define _GPGKEYOPERA_H
31
32 #include "core/GpgConstants.h"
33 #include "core/GpgContext.h"
34 #include "core/GpgModel.h"
35
36 namespace GpgFrontend {
41 class GenKeyInfo;
42
47 class GPGFRONTEND_CORE_EXPORT GpgKeyOpera
48 : public SingletonFunctionObject<GpgKeyOpera> {
49 public:
55 explicit GpgKeyOpera(
56 int channel = SingletonFunctionObject::GetDefaultChannel());
57
63 void DeleteKeys(KeyIdArgsListPtr key_ids);
64
70 void DeleteKey(const KeyId& key_id);
71
80 GpgError SetExpire(const GpgKey& key, const SubkeyId& subkey_fpr,
81 std::unique_ptr<boost::posix_time::ptime>& expires);
82
89 static void GenerateRevokeCert(const GpgKey& key,
90 const std::string& output_file_name);
91
98 GpgFrontend::GpgError ModifyPassword(const GpgKey& key);
99
107 GpgFrontend::GpgError ModifyTOFUPolicy(const GpgKey& key,
108 gpgme_tofu_policy_t tofu_policy);
116 GpgFrontend::GpgError GenerateKey(const std::unique_ptr<GenKeyInfo>& params,
117 GpgGenKeyResult& result);
118
126 GpgFrontend::GpgError GenerateSubkey(
127 const GpgKey& key, const std::unique_ptr<GenKeyInfo>& params);
128
129 private:
130 GpgContext& ctx_ =
131 GpgContext::GetInstance(SingletonFunctionObject::GetChannel());
132 };
133 } // namespace GpgFrontend
134
135 #endif // _GPGKEYOPERA_H
GpgFrontend::GpgContext
Definition: GpgContext.h:71
GpgFrontend::GpgKeyOpera
Definition: GpgKeyOpera.h:48
GpgFrontend::GpgKey
Definition: GpgKey.h:43
GpgFrontend::SingletonFunctionObject
Definition: GpgFunctionObject.h:150
GpgFrontend::SingletonFunctionObject::GetDefaultChannel
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:251
GpgFrontend::SingletonFunctionObject< GpgContext >::GetInstance
static GpgContext & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:172
GpgFrontend::SingletonFunctionObject::GetChannel
int GetChannel() const
Get the Channel object.
Definition: GpgFunctionObject.h:258
GpgFrontend
Definition: CoreCommonUtil.cpp:31