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

Public Member Functions

 GpgUIDOperator (int channel=SingletonFunctionObject::GetDefaultChannel())
 Construct a new Gpg UID Opera object. More...
 
auto AddUID (const GpgKey &key, const QString &uid) -> bool
 
auto AddUID (const GpgKey &key, const QString &name, const QString &comment, const QString &email) -> bool
 
auto RevUID (const GpgKey &key, const QString &uid) -> bool
 
auto SetPrimaryUID (const GpgKey &key, const QString &uid) -> bool
 
- Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgUIDOperator >
 SingletonFunctionObject (const SingletonFunctionObject< GpgUIDOperator > &)=delete
 prohibit copy
 
 SingletonFunctionObject (GpgUIDOperator &&)=delete
 Construct a new Singleton Function Object object.
 
 SingletonFunctionObject (const GpgUIDOperator &)=delete
 Construct a new Singleton Function Object object.
 
auto operator= (const SingletonFunctionObject< GpgUIDOperator > &) -> SingletonFunctionObject &=delete
 prohibit copy More...
 
void operator= (const GpgUIDOperator &)=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

GpgContextctx_
 

Additional Inherited Members

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

◆ GpgUIDOperator()

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

Construct a new Gpg UID Opera object.

Parameters
channel

Member Function Documentation

◆ AddUID() [1/2]

auto GpgFrontend::GpgUIDOperator::AddUID ( const GpgKey key,
const QString &  name,
const QString &  comment,
const QString &  email 
) -> bool

create a new uid in certain key pair

Parameters
keytarget key pair
name
comment
email
Returns

◆ AddUID() [2/2]

auto GpgFrontend::GpgUIDOperator::AddUID ( const GpgKey key,
const QString &  uid 
) -> bool

create a new uid in certain key pair

Parameters
keytarget key pair
uiduid args(combine name&comment&email)
Returns
if successful

References GpgFrontend::CheckGpgError().

◆ RevUID()

auto GpgFrontend::GpgUIDOperator::RevUID ( const GpgKey key,
const QString &  uid 
) -> bool

Revoke(Delete) UID from certain key pair

Parameters
keytarget key pair
uidtarget uid
Returns
if successful

References GpgFrontend::CheckGpgError().

◆ SetPrimaryUID()

auto GpgFrontend::GpgUIDOperator::SetPrimaryUID ( const GpgKey key,
const QString &  uid 
) -> bool

Set one of a uid of a key pair as primary

Parameters
keytarget key pair
uidtarget uid
Returns
if successful

References GpgFrontend::CheckGpgError().

Member Data Documentation

◆ ctx_

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

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