# GpgFrontend Project: src/core/function/gpg/GpgKeyOpera.h Source File

GpgKeyOpera.h
#ifndef _GPGKEYOPERA_H
#define _GPGKEYOPERA_H
#include "core/GpgConstants.h"
#include "core/GpgContext.h"
#include "core/GpgModel.h"
namespace GpgFrontend {
class GenKeyInfo;
class GPGFRONTEND_CORE_EXPORT GpgKeyOpera
: public SingletonFunctionObject<GpgKeyOpera> {
public:
explicit GpgKeyOpera(
int channel = SingletonFunctionObject::GetDefaultChannel());
void DeleteKeys(KeyIdArgsListPtr key_ids);
void DeleteKey(const KeyId& key_id);
GpgError SetExpire(const GpgKey& key, const SubkeyId& subkey_fpr,
std::unique_ptr<boost::posix_time::ptime>& expires);
static void GenerateRevokeCert(const GpgKey& key,
const std::string& output_file_name);
GpgFrontend::GpgError ModifyPassword(const GpgKey& key);
GpgFrontend::GpgError ModifyTOFUPolicy(const GpgKey& key,
gpgme_tofu_policy_t tofu_policy);
GpgFrontend::GpgError GenerateKey(const std::unique_ptr<GenKeyInfo>& params,
GpgGenKeyResult& result);
GpgFrontend::GpgError GenerateSubkey(
const GpgKey& key, const std::unique_ptr<GenKeyInfo>& params);
private:
GpgContext& ctx_ =
GpgContext::GetInstance(SingletonFunctionObject::GetChannel());
};
} // namespace GpgFrontend
#endif // _GPGKEYOPERA_H
GpgFrontend::GpgContext
Definition: GpgContext.h:64
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