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

Classes

class  Impl
 

Public Member Functions

 CacheManager (int channel=SingletonFunctionObject::GetDefaultChannel())
 Construct a new Cache Manager object. More...
 
 ~CacheManager () override
 Destroy the Cache Manager object.
 
void SaveCache (const QString &key, QString value)
 
void SaveDurableCache (const QString &key, const QJsonDocument &value, bool flush=false)
 
auto LoadCache (const QString &key) -> QString
 
auto LoadDurableCache (const QString &key) -> QJsonDocument
 
auto LoadDurableCache (const QString &key, QJsonDocument default_value) -> QJsonDocument
 
void ResetCache (const QString &key)
 
auto ResetDurableCache (const QString &key) -> bool
 
- Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< CacheManager >
 SingletonFunctionObject (const SingletonFunctionObject< CacheManager > &)=delete
 prohibit copy
 
 SingletonFunctionObject (CacheManager &&)=delete
 Construct a new Singleton Function Object object.
 
 SingletonFunctionObject (const CacheManager &)=delete
 Construct a new Singleton Function Object object.
 
auto operator= (const SingletonFunctionObject< CacheManager > &) -> SingletonFunctionObject &=delete
 prohibit copy More...
 
void operator= (const CacheManager &)=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 Attributes

SecureUniquePtr< Implp_
 

Additional Inherited Members

- Static Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< CacheManager >
static auto GetInstance (int channel=GpgFrontend::kGpgFrontendDefaultChannel) -> CacheManager &
 Get the Instance object. More...
 
static auto CreateInstance (int channel, const std::function< ChannelObjectPtr(void)> &factory) -> CacheManager &
 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< CacheManager >
 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.
 

Constructor & Destructor Documentation

◆ CacheManager()

GpgFrontend::CacheManager::CacheManager ( int  channel = SingletonFunctionObject::GetDefaultChannel())
explicit

Construct a new Cache Manager object.

Parameters
channel

Member Function Documentation

◆ LoadCache()

auto GpgFrontend::CacheManager::LoadCache ( const QString &  key) -> QString
Parameters
key
value

◆ LoadDurableCache() [1/2]

auto GpgFrontend::CacheManager::LoadDurableCache ( const QString &  key) -> QJsonDocument
Parameters
key
Returns
QJsonDocument

◆ LoadDurableCache() [2/2]

auto GpgFrontend::CacheManager::LoadDurableCache ( const QString &  key,
QJsonDocument  default_value 
) -> QJsonDocument
Parameters
key
default_value
Returns
QJsonDocument

◆ ResetCache()

void GpgFrontend::CacheManager::ResetCache ( const QString &  key)
Parameters
key
Returns
auto

◆ ResetDurableCache()

auto GpgFrontend::CacheManager::ResetDurableCache ( const QString &  key) -> bool
Parameters
key
Returns
true
false

◆ SaveCache()

void GpgFrontend::CacheManager::SaveCache ( const QString &  key,
QString  value 
)
Parameters
key
value

◆ SaveDurableCache()

void GpgFrontend::CacheManager::SaveDurableCache ( const QString &  key,
const QJsonDocument &  value,
bool  flush = false 
)
Parameters
key
value
flush

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