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

kgpg

Public Member Functions | Protected Member Functions | List of all members
KGpgSignUid Class Reference

#include <kgpgsignuid.h>

Inheritance diagram for KGpgSignUid:
Inheritance graph
[legend]

Public Member Functions

 KGpgSignUid (QObject *parent, const QString &signer, const KGpgSignableNode *uid, const bool local, const carefulCheck checking)
 
virtual ~KGpgSignUid ()
 
void setUid (const KGpgSignableNode *uid)
 
- Public Member Functions inherited from KGpgUidTransaction
 KGpgUidTransaction (QObject *parent, const QString &keyid=QString(), const QString &uid=QString())
 
virtual ~KGpgUidTransaction ()
 
QString getKeyId (void) const
 
void setKeyId (const QString &keyid)
 
void setUid (const QString &uid)
 
void setUid (const unsigned int uid)
 
- Public Member Functions inherited from KGpgTransaction
 KGpgTransaction (QObject *parent=0, const bool allowChaining=false)
 
virtual ~KGpgTransaction ()
 
void clearInputTransaction ()
 
const QString & getDescription () const
 
bool hasInputTransaction () const
 
void kill ()
 
void setGnuPGHome (const QString &home)
 
void setInputTransaction (KGpgTransaction *ta)
 
void start ()
 
int waitForFinished (const int msecs=-1)
 
- Public Member Functions inherited from KGpgSignTransactionHelper
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

virtual KGpgTransaction * asTransaction ()
 
virtual ts_boolanswer boolQuestion (const QString &line)
 
virtual bool nextLine (const QString &line)
 
virtual bool passphraseReceived ()
 
virtual void replaceCmd (const QString &cmd)
 
- Protected Member Functions inherited from KGpgUidTransaction
virtual bool preStart ()
 
bool standardCommands (const QString &line)
 
- Protected Member Functions inherited from KGpgTransaction
int addArgument (const QString &arg)
 
void addArgumentRef (int *ref)
 
int addArguments (const QStringList &args)
 
void addIdHint (QString txt)
 
void askNewPassphrase (const QString &text)
 
bool askPassphrase (const QString &message=QString())
 
virtual ts_boolanswer confirmOverwrite (KUrl &currentFile)
 
virtual void finish ()
 
QString getIdHints () const
 
GPGProc * getProcess ()
 
int getSuccess () const
 
virtual bool hintLine (const ts_hintType hint, const QString &args)
 
void insertArgument (const int pos, const QString &arg)
 
void insertArguments (const int pos, const QStringList &args)
 
virtual void newPassphraseEntered ()
 
virtual bool passphraseRequested ()
 
virtual void postStart ()
 
void replaceArgument (const int pos, const QString &arg)
 
void setDescription (const QString &description)
 
void setSuccess (const int v)
 
void unexpectedLine (const QString &line)
 
void waitForInputTransaction ()
 
void write (const QByteArray &a, const bool lf=true)
 
void write (const int i)
 
- Protected Member Functions inherited from KGpgSignTransactionHelper
 KGpgSignTransactionHelper (const QString &signer, const bool local, const carefulCheck checking)
 
KGpgTransaction::ts_boolanswer boolQuestion (const QString &line)
 
lineParseResults nextLine (const QString &line)
 

Additional Inherited Members

- Public Types inherited from KGpgTransaction
enum  ts_boolanswer { BA_UNKNOWN = 0, BA_YES = 1, BA_NO = 2 }
 
enum  ts_hintType { HT_KEYEXPIRED = 0, HT_SIGEXPIRED = 1, HT_NOSECKEY = 2, HT_ENCTO = 3 }
 
enum  ts_transaction {
  TS_OK = 0, TS_BAD_PASSPHRASE = 1, TS_MSG_SEQUENCE = 2, TS_USER_ABORTED = 3,
  TS_INVALID_EMAIL = 4, TS_INPUT_PROCESS_ERROR = 5, TS_COMMON_END = 100
}
 
- Public Types inherited from KGpgSignTransactionHelper
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 }
 
- Signals inherited from KGpgTransaction
void done (int result)
 
void infoProgress (qulonglong processedAmount, qulonglong totalAmount)
 
void statusMessage (const QString &msg)
 
- Protected Attributes inherited from KGpgSignTransactionHelper
int m_signerPos
 

Detailed Description

transaction class to sign a single user id of a key

Definition at line 28 of file kgpgsignuid.h.

Constructor & Destructor Documentation

KGpgSignUid::KGpgSignUid ( QObject *  parent,
const QString &  signer,
const KGpgSignableNode *  uid,
const bool  local,
const carefulCheck  checking 
)

constructor

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

See setUid() for description of uid.

Definition at line 18 of file kgpgsignuid.cpp.

KGpgSignUid::~KGpgSignUid ( )
virtual

destructor

Definition at line 37 of file kgpgsignuid.cpp.

Member Function Documentation

KGpgTransaction * KGpgSignUid::asTransaction ( )
protectedvirtual

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.

Implements KGpgSignTransactionHelper.

Definition at line 96 of file kgpgsignuid.cpp.

KGpgTransaction::ts_boolanswer KGpgSignUid::boolQuestion ( const QString &  line)
protectedvirtual

Called for every boolean question GnuPG answers.

Parameters
linethe question GnuPG asked
Returns
what to answer GnuPG

This is called instead of nextLine() if the line contains a boolean question. Returning BA_UNKNOWN will cancel the current transaction and will set the transaction result to TS_MSG_SEQUENCE.

The default implementation will answer BA_UNKNOWN to every question.

Reimplemented from KGpgTransaction.

Definition at line 78 of file kgpgsignuid.cpp.

bool KGpgSignUid::nextLine ( const QString &  line)
protectedvirtual

Called for every line the gpg process writes.

Parameters
linethe input from the process
Returns
true if "quit" should be sent to process

You need to implement this member to get a usable subclass.

When this function returns true "quit" is written to the process.

Implements KGpgTransaction.

Definition at line 63 of file kgpgsignuid.cpp.

bool KGpgSignUid::passphraseReceived ( )
protectedvirtual

called when GnuPG accepted the passphrase

Returns
if the input channel to GnuPG should be closed
Return values
trueclose the input channel of the GnuPG process
falsekeep the GnuPG input channel open

This allows a transaction to handle passphrase success in a special way. The default implementation will just return true.

Reimplemented from KGpgTransaction.

Definition at line 89 of file kgpgsignuid.cpp.

void KGpgSignUid::replaceCmd ( const QString &  cmd)
protectedvirtual

replaces the command passed to GnuPG

Parameters
cmdnew command to use

Implements KGpgSignTransactionHelper.

Definition at line 102 of file kgpgsignuid.cpp.

void KGpgSignUid::setUid ( const KGpgSignableNode *  uid)

set node to sign

Parameters
uidnode to sign

If uid is a KGpgKeyNode only the primary id of that key is signed. If you want to sign all user ids at once use KGpgSignKey instead. Legal values for uid are also KGpgUidNode and KGpgUatNode.

Definition at line 42 of file kgpgsignuid.cpp.


The documentation for this class was generated from the following files:
  • kgpgsignuid.h
  • kgpgsignuid.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:52 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
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • 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