• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

kgpg

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KGpgSignTransactionHelper Class Referenceabstract

#include <kgpgsigntransactionhelper.h>

Inheritance diagram for KGpgSignTransactionHelper:
Inheritance graph
[legend]

Public Types

enum  carefulCheck { noAnswer = 0, notChecked = 1, normalChecking = 2, carefulChecking = 3 }
 
enum  lineParseResults { handledFalse, handledTrue, notHandled }
 
enum  ts_signuid { TS_ALREADY_SIGNED = KGpgTransaction::TS_COMMON_END + 1 }
 

Public Member Functions

virtual ~KGpgSignTransactionHelper ()
 
carefulCheck getChecking (void) const
 
const KGpgKeyNode * getKey (void) const
 
bool getLocal (void) const
 
QString getSigner (void) const
 
void setChecking (const carefulCheck level)
 
void setKey (const KGpgKeyNode *node)
 
void setLocal (const bool local)
 
void setSecringFile (const QString &filename)
 
void setSigner (const QString &signer)
 

Protected Member Functions

 KGpgSignTransactionHelper (const QString &signer, const bool local, const carefulCheck checking)
 
virtual KGpgTransaction * asTransaction ()=0
 
KGpgTransaction::ts_boolanswer boolQuestion (const QString &line)
 
lineParseResults nextLine (const QString &line)
 
virtual void replaceCmd (const QString &cmd)=0
 

Protected Attributes

int m_signerPos
 

Detailed Description

helper class for key signing transactions

Definition at line 25 of file kgpgsigntransactionhelper.h.

Member Enumeration Documentation

enum KGpgSignTransactionHelper::carefulCheck
Enumerator
noAnswer 
notChecked 
normalChecking 
carefulChecking 

Definition at line 38 of file kgpgsigntransactionhelper.h.

enum KGpgSignTransactionHelper::lineParseResults

the outcomes of nextLine()

Enumerator
handledFalse 

the line was parsed successfully and transaction can continue

handledTrue 

the line was parsed successfully and the transaction shoult be shut down

notHandled 

the line was not handled

Definition at line 32 of file kgpgsigntransactionhelper.h.

enum KGpgSignTransactionHelper::ts_signuid
Enumerator
TS_ALREADY_SIGNED 

user id is alredy signed by given key

Definition at line 45 of file kgpgsigntransactionhelper.h.

Constructor & Destructor Documentation

KGpgSignTransactionHelper::~KGpgSignTransactionHelper ( )
virtual

destructor

Definition at line 28 of file kgpgsigntransactionhelper.cpp.

KGpgSignTransactionHelper::KGpgSignTransactionHelper ( const QString &  signer,
const bool  local,
const carefulCheck  checking 
)
protected

constructor

Parameters
signerid of the key to sign with
localif signature should be local (not exportable)
checkinghow carefully the identity of the key owner was checked

Definition at line 19 of file kgpgsigntransactionhelper.cpp.

Member Function Documentation

virtual KGpgTransaction* KGpgSignTransactionHelper::asTransaction ( )
protectedpure virtual

returns the transaction object to use

This should really be static_cast<>(this) as you should only use this class as one of two anchestors of a transaction.

Implemented in KGpgSignUid, and KGpgSignKey.

KGpgTransaction::ts_boolanswer KGpgSignTransactionHelper::boolQuestion ( const QString &  line)
protected

Definition at line 69 of file kgpgsigntransactionhelper.cpp.

KGpgSignTransactionHelper::carefulCheck KGpgSignTransactionHelper::getChecking ( void  ) const

check if local signing is requested

Definition at line 116 of file kgpgsigntransactionhelper.cpp.

const KGpgKeyNode * KGpgSignTransactionHelper::getKey ( void  ) const

get the key node this transaction is using

Definition at line 39 of file kgpgsigntransactionhelper.cpp.

bool KGpgSignTransactionHelper::getLocal ( void  ) const

check if local signing is requested

Definition at line 104 of file kgpgsigntransactionhelper.cpp.

QString KGpgSignTransactionHelper::getSigner ( void  ) const

get key id which is used to sign

Definition at line 130 of file kgpgsigntransactionhelper.cpp.

KGpgSignTransactionHelper::lineParseResults KGpgSignTransactionHelper::nextLine ( const QString &  line)
protected

handle signing commands from GnuPG

Parameters
lineinput to parse

This will handle the GnuPG commands specific to signing.

Definition at line 45 of file kgpgsigntransactionhelper.cpp.

virtual void KGpgSignTransactionHelper::replaceCmd ( const QString &  cmd)
protectedpure virtual

replaces the command passed to GnuPG

Parameters
cmdnew command to use

Implemented in KGpgSignUid, and KGpgSignKey.

void KGpgSignTransactionHelper::setChecking ( const carefulCheck  level)

set the level how carefully the identity was checked

Parameters
levellevel to set

Definition at line 110 of file kgpgsigntransactionhelper.cpp.

void KGpgSignTransactionHelper::setKey ( const KGpgKeyNode *  node)

set key node this transaction is using

Parameters
nodenew key node

Definition at line 33 of file kgpgsigntransactionhelper.cpp.

void KGpgSignTransactionHelper::setLocal ( const bool  local)

set if the signature should be local (not exportable)

Parameters
localflag if local signature should be applied

Definition at line 91 of file kgpgsigntransactionhelper.cpp.

void KGpgSignTransactionHelper::setSecringFile ( const QString &  filename)

add a secret keyring file

This allows to specify an additional file where secret keys are stored to be used by this operation. This is especially useful if a different GnuPG home directory is set but the original keys should be used for signing.

Definition at line 136 of file kgpgsigntransactionhelper.cpp.

void KGpgSignTransactionHelper::setSigner ( const QString &  signer)

set which private key is used to sign

Parameters
signerid of private key to use

Definition at line 122 of file kgpgsigntransactionhelper.cpp.

Member Data Documentation

int KGpgSignTransactionHelper::m_signerPos
protected

position of the signer argument in GnuPG command line

Definition at line 133 of file kgpgsigntransactionhelper.h.


The documentation for this class was generated from the following files:
  • kgpgsigntransactionhelper.h
  • kgpgsigntransactionhelper.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kgpg

Skip menu "kgpg"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal