kgpg
KGpgTransaction Class Reference
#include <kgpgtransaction.h>

Detailed Description
Process one GnuPG operation.This class encapsulates one GnuPG operation. It will care for all interaction with the gpg process. Everything you have to care about is to set up the object properly, call start() and catch the done signal.
This is an abstract base class for specific operations that implements the basic I/O loop, the process setup and interaction and some convenience members to set extra arguments for the process.
If you want to add a new operation create a child class that implements nextLine(). Ususally you also need a constructor that takes some information like the id of the key to modify.
Definition at line 42 of file kgpgtransaction.h.
Signals | |
| void | done (int result) |
Public Member Functions | |
| KGpgTransaction (QObject *parent=0) | |
| void | start () |
| virtual | ~KGpgTransaction () |
Protected Member Functions | |
| virtual void | finish () |
| virtual bool | nextLine (const QString &line)=0 |
| virtual void | preStart () |
Constructor & Destructor Documentation
| KGpgTransaction::KGpgTransaction | ( | QObject * | parent = 0 |
) | [explicit] |
| KGpgTransaction::~KGpgTransaction | ( | ) | [virtual] |
Member Function Documentation
| void KGpgTransaction::done | ( | int | result | ) | [signal] |
Emitted when the operation was completed.
On success result is 0.
| void KGpgTransaction::finish | ( | ) | [protected, virtual] |
Called when the gpg process finishes.
You may reimplement this member if you need to do some special operations after process completion. The provided one simply does nothing which should be enough for most cases.
Reimplemented in KGpgChangeExpire.
Definition at line 117 of file kgpgtransaction.cpp.
| virtual bool KGpgTransaction::nextLine | ( | const QString & | line | ) | [protected, pure virtual] |
Called for every line the gpg process writes.
- Parameters:
-
line the input from the process
- Returns:
- true if "quit" should be sent to process
When this function returns true "quit" is written to the process.
Implemented in KGpgAddPhoto, KGpgChangeDisable, KGpgChangeExpire, KGpgChangePass, KGpgChangeTrust, and KGpgDelUid.
| void KGpgTransaction::preStart | ( | ) | [protected, virtual] |
Called before the gpg process is started.
You may reimplement this member if you need to do some special operations or cleanups before the process is started. Keep in mind that start() may be called several times. If you have some internal state you probably want to reset it here.
Reimplemented in KGpgChangeExpire, KGpgChangePass, and KGpgUidTransaction.
Definition at line 122 of file kgpgtransaction.cpp.
| void KGpgTransaction::start | ( | ) |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference