GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgFrontend::GpgKeyGetter::Impl Class Reference
Inheritance diagram for GpgFrontend::GpgKeyGetter::Impl:
Inheritance graph
Collaboration diagram for GpgFrontend::GpgKeyGetter::Impl:
Collaboration graph

Public Member Functions

 Impl (int channel)
 
auto GetKey (const QString &fpr, bool use_cache) -> GpgKey
 
auto GetPubkey (const QString &fpr, bool use_cache) -> GpgKey
 
auto FetchKey () -> KeyLinkListPtr
 
auto FlushKeyCache () -> bool
 
auto GetKeys (const KeyIdArgsListPtr &ids) -> KeyListPtr
 
auto GetKeysCopy (const KeyLinkListPtr &keys) -> KeyLinkListPtr
 
auto GetKeysCopy (const KeyListPtr &keys) -> KeyListPtr
 
- Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgKeyGetter::Impl >
 SingletonFunctionObject (const SingletonFunctionObject< GpgKeyGetter::Impl > &)=delete
 prohibit copy
 
 SingletonFunctionObject (GpgKeyGetter::Impl &&)=delete
 Construct a new Singleton Function Object object.
 
 SingletonFunctionObject (const GpgKeyGetter::Impl &)=delete
 Construct a new Singleton Function Object object.
 
auto operator= (const SingletonFunctionObject< GpgKeyGetter::Impl > &) -> SingletonFunctionObject &=delete
 prohibit copy More...
 
void operator= (const GpgKeyGetter::Impl &)=delete
 
auto GetChannel () const -> int
 Get the Channel object. More...
 
- Public Member Functions inherited from GpgFrontend::ChannelObject
 ChannelObject () noexcept
 Construct a new Default Channel Object object.
 
virtual ~ChannelObject () noexcept
 Destroy the Channel Object object.
 
 ChannelObject (int channel, QString type)
 Construct a new Channel Object object. More...
 
auto GetChannel () const -> int
 Get the Channel object. More...
 
void SetChannel (int channel)
 Set the Channel object. More...
 

Private Member Functions

auto get_key_in_cache (const QString &key_id) -> GpgKey
 Get the Key object. More...
 

Private Attributes

GpgContextctx_
 Get the gpgme context object. More...
 
std::mutex ctx_mutex_
 shared mutex for the keys cache
 
QMap< QString, GpgKeykeys_search_cache_
 cache the keys with key id
 
QList< GpgKeykeys_cache_
 
std::mutex keys_cache_mutex_
 shared mutex for the keys cache
 

Additional Inherited Members

- Static Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgKeyGetter::Impl >
static auto GetInstance (int channel=GpgFrontend::kGpgFrontendDefaultChannel) -> GpgKeyGetter::Impl &
 Get the Instance object. More...
 
static auto CreateInstance (int channel, const std::function< ChannelObjectPtr(void)> &factory) -> GpgKeyGetter::Impl &
 Create a Instance object. More...
 
static void ReleaseChannel (int channel)
 
static auto GetDefaultChannel () -> int
 Get the Default Channel object. More...
 
static auto GetAllChannelId () -> std::vector< int >
 Get all the channel ids. More...
 
- Static Public Member Functions inherited from GpgFrontend::ChannelObject
static auto GetDefaultChannel () -> int
 Get the Default Channel object. More...
 
- Protected Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgKeyGetter::Impl >
 SingletonFunctionObject ()=default
 Construct a new Singleton Function Object object.
 
 SingletonFunctionObject (int channel)
 Construct a new Singleton Function Object object. More...
 
virtual ~SingletonFunctionObject ()=default
 Destroy the Singleton Function Object object.
 

Member Function Documentation

◆ get_key_in_cache()

auto GpgFrontend::GpgKeyGetter::Impl::get_key_in_cache ( const QString &  key_id) -> GpgKey
inlineprivate

Get the Key object.

Parameters
id
Returns
GpgKey

References ctx_mutex_, keys_cache_mutex_, and keys_search_cache_.

Member Data Documentation

◆ ctx_

GpgContext& GpgFrontend::GpgKeyGetter::Impl::ctx_
private
Initial value:
=
auto GetChannel() const -> int
Get the Channel object.
Definition: GpgFunctionObject.h:139
static auto GetInstance(int channel=GpgFrontend::kGpgFrontendDefaultChannel) -> GpgContext &
Get the Instance object.
Definition: GpgFunctionObject.h:79

Get the gpgme context object.


The documentation for this class was generated from the following file: