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(
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  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_ =
132 };
133 } // namespace GpgFrontend
134 
135 #endif // _GPGKEYOPERA_H
Definition: GpgContext.h:71
Definition: GpgKeyOpera.h:48
Definition: GpgKey.h:43
Definition: GpgFunctionObject.h:150
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:251
static GpgContext & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:172
int GetChannel() const
Get the Channel object.
Definition: GpgFunctionObject.h:258
Definition: CoreCommonUtil.cpp:31