kgpg
#include <kgpgexport.h>
Public Member Functions | |
KGpgExport (QObject *parent, const QStringList &ids, QProcess *outp, const QStringList &options=QStringList(), const bool secret=false) | |
KGpgExport (QObject *parent, const QStringList &ids, KGpgTransaction *outt, const QStringList &options=QStringList(), const bool secret=false) | |
KGpgExport (QObject *parent, const QStringList &ids, const QString &file, const QStringList &options=QStringList(), const bool secret=false) | |
KGpgExport (QObject *parent, const QStringList &ids, const QStringList &options=QStringList(), const bool secret=false) | |
virtual | ~KGpgExport () |
const QStringList & | getKeyIds () const |
const QByteArray & | getOutputData () const |
const QString & | getOutputFile () const |
void | setKeyId (const QString &id) |
void | setKeyIds (const QStringList &ids) |
void | setOutputFile (const QString &filename) |
void | setOutputProcess (QProcess *outp) |
void | setOutputTransaction (KGpgTransaction *outt) |
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 QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Protected Member Functions | |
virtual bool | nextLine (const QString &line) |
virtual bool | preStart () |
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 | boolQuestion (const QString &line) |
virtual ts_boolanswer | confirmOverwrite (KUrl ¤tFile) |
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 | passphraseReceived () |
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 QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
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 } |
Signals inherited from KGpgTransaction | |
void | done (int result) |
void | infoProgress (qulonglong processedAmount, qulonglong totalAmount) |
void | statusMessage (const QString &msg) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
export one or more keys from keyring
The exported keys can be written to a file or sent to standard input of another QProcess.
Definition at line 32 of file kgpgexport.h.
Constructor & Destructor Documentation
KGpgExport::KGpgExport | ( | QObject * | parent, |
const QStringList & | ids, | ||
QProcess * | outp, | ||
const QStringList & | options = QStringList() , |
||
const bool | secret = false |
||
) |
export keys to QProcess
- Parameters
-
parent parent object ids ids to export outp process to write into options additional options to pass to GnuPG (e.g. export ascii armored) secret if secret key exporting is allowed
Definition at line 21 of file kgpgexport.cpp.
KGpgExport::KGpgExport | ( | QObject * | parent, |
const QStringList & | ids, | ||
KGpgTransaction * | outt, | ||
const QStringList & | options = QStringList() , |
||
const bool | secret = false |
||
) |
export keys to KGpgTransaction
- Parameters
-
parent parent object ids ids to export outt transaction to write into options additional options to pass to GnuPG (e.g. export ascii armored) secret if secret key exporting is allowed
Definition at line 49 of file kgpgexport.cpp.
KGpgExport::KGpgExport | ( | QObject * | parent, |
const QStringList & | ids, | ||
const QString & | file, | ||
const QStringList & | options = QStringList() , |
||
const bool | secret = false |
||
) |
export keys to file
- Parameters
-
parent parent object ids ids to export file filename to write into options additional options to pass to GnuPG (e.g. export ascii armored) secret if secret key exporting is allowed
Definition at line 30 of file kgpgexport.cpp.
KGpgExport::KGpgExport | ( | QObject * | parent, |
const QStringList & | ids, | ||
const QStringList & | options = QStringList() , |
||
const bool | secret = false |
||
) |
export keys to standard output
- Parameters
-
parent parent object ids ids to export options additional options to pass to GnuPG (e.g. export ascii armored) secret if secret key exporting is allowed
Only ascii-armored export is supported in standard output mode. If it is not already set in the given option it will be added automatically.
Definition at line 40 of file kgpgexport.cpp.
|
virtual |
destructor
Definition at line 59 of file kgpgexport.cpp.
Member Function Documentation
const QStringList & KGpgExport::getKeyIds | ( | ) | const |
return the key ids to export
- Returns
- list of key fingerprints
Definition at line 77 of file kgpgexport.cpp.
const QByteArray & KGpgExport::getOutputData | ( | ) | const |
return the data read from standard output
- Returns
- standard output data
Definition at line 117 of file kgpgexport.cpp.
const QString & KGpgExport::getOutputFile | ( | ) | const |
return the output filename currently set
- Returns
- filename key will get written to
Definition at line 111 of file kgpgexport.cpp.
|
protectedvirtual |
Called for every line the gpg process writes.
- Parameters
-
line the 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 169 of file kgpgexport.cpp.
|
protectedvirtual |
Called before the gpg process is started.
- Returns
- true if the process should be started
You may reimplement this member if you need to do some special operations before the process is started. The command line of the process may be modified for the last time here.
When you notice that some values passed are invalid or the transaction does not need to be run for some other reason you should call setSuccess() to set the return value and return false. In this case the process is not started but the value is immediately returned.
Reimplemented from KGpgTransaction.
Definition at line 123 of file kgpgexport.cpp.
void KGpgExport::setKeyId | ( | const QString & | id | ) |
void KGpgExport::setKeyIds | ( | const QStringList & | ids | ) |
void KGpgExport::setOutputFile | ( | const QString & | filename | ) |
set filename to send output to
- Parameters
-
filename file to send output to
Definition at line 91 of file kgpgexport.cpp.
void KGpgExport::setOutputProcess | ( | QProcess * | outp | ) |
set the process the output is sent to
- Parameters
-
outp process to send output to
Definition at line 83 of file kgpgexport.cpp.
void KGpgExport::setOutputTransaction | ( | KGpgTransaction * | outt | ) |
set the transaction the output is sent to
- Parameters
-
outd transaction to send output to
Definition at line 102 of file kgpgexport.cpp.
The documentation for this class was generated from the following files:
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.