GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
Classes | |
struct | _ctx_ref_deleter |
Public Member Functions | |
GpgContext (const GpgContextInitArgs &args={}) | |
Construct a new Gpg Context object. More... | |
GpgContext (int channel) | |
Construct a new Gpg Context object. More... | |
~GpgContext () override=default | |
Destroy the Gpg Context object. | |
bool | good () const |
const GpgInfo & | GetInfo () const |
Get the Info object. More... | |
operator gpgme_ctx_t () const | |
void | SetPassphraseCb (gpgme_passphrase_cb_t func) const |
Set the Passphrase Cb object. More... | |
Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgContext > | |
int | GetChannel () const |
Get the Channel object. More... | |
SingletonFunctionObject (GpgContext &&)=delete | |
Construct a new Singleton Function Object object. | |
SingletonFunctionObject (const GpgContext &)=delete | |
Construct a new Singleton Function Object object. | |
void | operator= (const GpgContext &)=delete |
Static Public Member Functions | |
static gpgme_error_t | test_passphrase_cb (void *opaque, const char *uid_hint, const char *passphrase_info, int last_was_bad, int fd) |
static gpgme_error_t | test_status_cb (void *hook, const char *keyword, const char *args) |
Static Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgContext > | |
static GpgContext & | GetInstance (int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL) |
Get the Instance object. More... | |
static GpgContext & | CreateInstance (int channel, std::function< std::unique_ptr< GpgContext >(void)> factory) |
Create a Instance object. More... | |
static GpgContext & | CreateInstance (int channel, std::unique_ptr< GpgContext > p_obj=nullptr) |
Create a Instance object. More... | |
static GpgContext & | ReleaseChannel (int channel) |
static int | GetDefaultChannel () |
Get the Default Channel object. More... | |
Private Types | |
using | CtxRefHandler = std::unique_ptr< struct gpgme_context, _ctx_ref_deleter > |
Private Member Functions | |
void | init_ctx () |
Private Attributes | |
GpgInfo | info_ |
GpgContextInitArgs | args_ |
CtxRefHandler | _ctx_ref = nullptr |
bool | good_ = true |
Additional Inherited Members | |
Protected Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgContext > | |
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. | |
void | SetChannel (int channel) |
Set the Channel object. More... | |
|
explicit |
Construct a new Gpg Context object.
args |
Constructor Set up gpgme-context, set paths to app-run path
References GpgFrontend::GpgInfo::AppPath, GpgFrontend::check_gpg_error(), GpgFrontend::check_gpg_error_2_err_code(), and init_ctx().
|
explicit |
Construct a new Gpg Context object.
channel |
|
inline |
Get the Info object.
Referenced by GpgFrontend::UI::CommonUtils::SlotExecuteGpgCommand().
bool GpgFrontend::GpgContext::good | ( | ) | const |
|
private |
Setting the output type must be done at the beginning
think this means ascii-armor --> ?
Setting the output type must be done at the beginning
think this means ascii-armor --> ?
References GpgFrontend::GpgInfo::AppPath, GpgFrontend::check_gpg_error(), GpgFrontend::check_gpg_error_2_err_code(), SetPassphraseCb(), test_passphrase_cb(), and test_status_cb().
Referenced by GpgContext().
|
inline |
void GpgFrontend::GpgContext::SetPassphraseCb | ( | gpgme_passphrase_cb_t | func | ) | const |
|
static |
opaque | |
uid_hint | |
passphrase_info | |
last_was_bad | |
fd |
Referenced by init_ctx().
|
static |