GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
29 #ifndef GPGFRONTEND_ZH_CN_TS_GPGKEYGETTER_H
30 #define GPGFRONTEND_ZH_CN_TS_GPGKEYGETTER_H
35 #include "core/GpgContext.h"
36 #include "core/GpgFunctionObject.h"
37 #include "core/GpgModel.h"
62 GpgKey GetKey(
const std::string&
id,
bool use_cache =
true);
70 KeyListPtr GetKeys(
const KeyIdArgsListPtr& ids);
78 GpgKey GetPubkey(
const std::string&
id,
bool use_cache =
true);
85 KeyLinkListPtr FetchKey();
99 KeyListPtr GetKeysCopy(
const KeyListPtr& keys);
107 KeyLinkListPtr GetKeysCopy(
const KeyLinkListPtr& keys);
141 GpgKey get_key_in_cache(
const std::string&
id);
145 #endif // GPGFRONTEND_ZH_CN_TS_GPGKEYGETTER_H
Definition: GpgFunctionObject.h:159
GpgKeyGetter(int channel=SingletonFunctionObject::GetDefaultChannel())
Construct a new Gpg Key Getter object.
Definition: GpgKeyGetter.cpp:41
KeyListPtr GetKeysCopy(const KeyListPtr &keys)
Get the Keys Copy object.
Definition: GpgKeyGetter.cpp:164
std::mutex keys_cache_mutex_
shared mutex for the keys cache
Definition: GpgKeyGetter.h:133
Definition: CoreCommonUtil.cpp:29
static GpgContext & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:181
GpgKey get_key_in_cache(const std::string &id)
Get the Key object.
Definition: GpgKeyGetter.cpp:173
Definition: GpgKeyGetter.h:45
int GetChannel() const
Get the Channel object.
Definition: GpgFunctionObject.h:252
KeyLinkListPtr FetchKey()
Get all the keys by receiving a linked list.
Definition: GpgKeyGetter.cpp:82
Definition: GpgContext.h:59
void FlushKeyCache()
flush the keys in the cache
Definition: GpgKeyGetter.cpp:101
GpgKey GetKey(const std::string &id, bool use_cache=true)
Get the Key object.
Definition: GpgKeyGetter.cpp:47
GpgKey GetPubkey(const std::string &id, bool use_cache=true)
Get the Pubkey object.
Definition: GpgKeyGetter.cpp:67
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:245
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:66
std::map< std::string, GpgKey > keys_cache_
cache the keys with key id
Definition: GpgKeyGetter.h:127
KeyListPtr GetKeys(const KeyIdArgsListPtr &ids)
Get the Keys object.
Definition: GpgKeyGetter.cpp:148
std::mutex ctx_mutex_
shared mutex for the keys cache
Definition: GpgKeyGetter.h:121