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

GpgUIDOperator.h
1
29 #ifndef GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H
30 #define GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H
31
32 #include "core/GpgContext.h"
33 #include "core/GpgModel.h"
34
35 namespace GpgFrontend {
40 class GPGFRONTEND_CORE_EXPORT GpgUIDOperator
41 : public SingletonFunctionObject<GpgUIDOperator> {
42 public:
48 explicit GpgUIDOperator(
49 int channel = SingletonFunctionObject::GetDefaultChannel());
50
57 bool AddUID(const GpgKey& key, const std::string& uid);
58
67 bool AddUID(const GpgKey& key, const std::string& name,
68 const std::string& comment, const std::string& email);
69
76 bool RevUID(const GpgKey& key, const std::string& uid);
77
84 bool SetPrimaryUID(const GpgKey& key, const std::string& uid);
85
86 private:
87 GpgContext& ctx_ =
88 GpgContext::GetInstance(SingletonFunctionObject::GetChannel());
89 };
90
91 } // namespace GpgFrontend
92
93 #endif // GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H
GpgFrontend::GpgContext
Definition: GpgContext.h:71
GpgFrontend::GpgKey
Definition: GpgKey.h:43
GpgFrontend::GpgUIDOperator
Definition: GpgUIDOperator.h:41
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