GpgUIDOperator.h
#ifndef GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H
#define GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H
#include "core/GpgContext.h"
#include "core/GpgModel.h"
namespace GpgFrontend {
class GPGFRONTEND_CORE_EXPORT GpgUIDOperator
: public SingletonFunctionObject<GpgUIDOperator> {
public:
explicit GpgUIDOperator(
int channel = SingletonFunctionObject::GetDefaultChannel());
bool AddUID(const GpgKey& key, const std::string& uid);
bool AddUID(const GpgKey& key, const std::string& name,
const std::string& comment, const std::string& email);
bool RevUID(const GpgKey& key, const std::string& uid);
bool SetPrimaryUID(const GpgKey& key, const std::string& uid);
private:
GpgContext& ctx_ =
GpgContext::GetInstance(SingletonFunctionObject::GetChannel());
};
} // namespace GpgFrontend
#endif // GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H
GpgFrontend::SingletonFunctionObject
Definition: GpgFunctionObject.h:148
GpgFrontend
Definition: CoreCommonUtil.cpp:29
GpgFrontend::SingletonFunctionObject< GpgContext >::GetInstance
static GpgContext & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:170
GpgFrontend::GpgUIDOperator::SetPrimaryUID
bool SetPrimaryUID(const GpgKey &key, const std::string &uid)
Definition: GpgUIDOperator.cpp:55
GpgFrontend::check_gpg_error
GPGFRONTEND_CORE_EXPORT GpgError check_gpg_error(GpgError err)
Definition: GpgConstants.cpp:54
GpgFrontend::SingletonFunctionObject::GetChannel
int GetChannel() const
Get the Channel object.
Definition: GpgFunctionObject.h:239
GpgFrontend::GpgContext
Definition: GpgContext.h:59
GpgFrontend::GpgUIDOperator::GpgUIDOperator
GpgUIDOperator(int channel=SingletonFunctionObject::GetDefaultChannel())
Construct a new Gpg UID Opera object.
Definition: GpgUIDOperator.cpp:33
GpgFrontend::GpgUIDOperator::RevUID
bool RevUID(const GpgKey &key, const std::string &uid)
Definition: GpgUIDOperator.cpp:45
GpgFrontend::GpgUIDOperator::AddUID
bool AddUID(const GpgKey &key, const std::string &uid)
Definition: GpgUIDOperator.cpp:36
GpgFrontend::SingletonFunctionObject::GetDefaultChannel
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:232
GpgFrontend::check_gpg_error_2_err_code
GPGFRONTEND_CORE_EXPORT gpg_err_code_t check_gpg_error_2_err_code(gpgme_error_t err, gpgme_error_t predict=GPG_ERR_NO_ERROR)
Definition: GpgConstants.cpp:63
GpgFrontend::GpgUIDOperator
Definition: GpgUIDOperator.h:40
GpgFrontend::GpgKey
Definition: GpgKey.h:41