kgpg
KgpgInterface Class Reference
#include <kgpginterface.h>

Detailed Description
This class is the interface for gpg.Definition at line 38 of file kgpginterface.h.
Public Slots | |
| KgpgCore::KgpgKeyList | readPublicKeys (const bool &block=false, const QStringList &ids=QStringList(), const bool &withsigs=false) |
| KgpgCore::KgpgKeyList | readPublicKeys (const bool &block, const QString &ids, const bool &withsigs=false) |
| KgpgCore::KgpgKeyList | readSecretKeys (const QStringList &ids=QStringList()) |
| KgpgCore::KgpgKeyList | readJoinedKeys (const KgpgCore::KgpgKeyTrust &trust, const QStringList &ids=QStringList()) |
| QString | getKeys (const bool &block=false, const QString *attributes=NULL, const QStringList &ids=QStringList()) |
| void | encryptText (const QString &text, const QStringList &userids, const QStringList &options=QStringList()) |
| void | decryptText (const QString &text, const QStringList &options=QStringList()) |
| void | signText (const QString &text, const QString &userid, const QStringList &options) |
| void | verifyText (const QString &text) |
| void | encryptFile (const QStringList &encryptkeys, const KUrl &srcurl, const KUrl &desturl, const QStringList &options=QStringList(), const bool &symetrical=false) |
| void | signKey (const QString &keyid, const QString &signkeyid, const bool &local, const int &checking, const bool &terminal=false) |
| void | keyExpire (const QString &keyid, const QDate &date) |
| void | changePass (const QString &keyid) |
| void | changeTrust (const QString &keyid, const KgpgCore::KgpgKeyOwnerTrust &keytrust) |
| void | changeDisable (const QString &keyid, const bool &ison) |
| QPixmap | loadPhoto (const QString &keyid, const QString &uid, const bool &block=false) |
| void | addPhoto (const QString &keyid, const QString &imagepath) |
| void | deletePhoto (const QString &keyid, const QString &uid) |
| void | importKey (const KUrl &url) |
| void | importKey (const QString &keystr) |
| void | addUid (const QString &keyid, const QString &name, const QString &email, const QString &comment) |
| void | generateKey (const QString &keyname, const QString &keyemail, const QString &keycomment, const KgpgCore::KgpgKeyAlgo &keyalgo, const uint &keysize, const uint &keyexp, const uint &keyexpnumber) |
| void | decryptFile (const KUrl &src, const KUrl &dest, const QStringList &Options=QStringList()) |
| void | downloadKeys (const QStringList &keys, const QString &keyserver, const bool &refresh, const QString &proxy="") |
| void | downloadKeysAbort () |
| void | uploadKeys (const QStringList &keys, const QString &keyserver, const QString &attributes, const QString &proxy="") |
| void | uploadKeysAbort () |
| void | KgpgDecryptFileToText (const KUrl &srcUrl, const QStringList &Options) |
| void | KgpgSignFile (const QString &keyID, const KUrl &srcUrl, const QStringList &Options=QStringList()) |
| void | KgpgVerifyFile (const KUrl &sigUrl, const KUrl &srcUrl=KUrl()) |
| void | KgpgDelSignature (const QString &keyID, const QString &uid, QString signKeyID) |
| void | KgpgRevokeKey (const QString &keyID, const QString &revokeUrl, const int reason, const QString &description) |
| void | revokeover (GPGProc *) |
| void | revokeprocess (GPGProc *p) |
Signals | |
| void | readPublicKeysFinished (KgpgCore::KgpgKeyList, KgpgInterface *) |
| void | getKeysStarted (KgpgInterface *) |
| void | getKeysFinished (QString, KgpgInterface *) |
| void | txtEncryptionStarted () |
| void | txtEncryptionFinished (QString, KgpgInterface *) |
| void | txtDecryptionStarted () |
| void | txtDecryptionFinished (QString, KgpgInterface *) |
| void | txtDecryptionFailed (QString, KgpgInterface *) |
| void | txtSigningStarted () |
| void | txtSigningFinished (QString, KgpgInterface *) |
| void | txtSigningFailed (QString, KgpgInterface *) |
| void | txtVerifyStarted () |
| void | txtVerifyMissingSignature (QString, KgpgInterface *) |
| void | txtVerifyFinished (QString, QString, KgpgInterface *) |
| void | processstarted (QString) |
| void | errorMessage (const QString &, KgpgInterface *) |
| void | fileEncryptionFinished (KUrl, KgpgInterface *) |
| void | signKeyFinished (int, const QString &, KgpgInterface *) |
| void | keyExpireFinished (int, KgpgInterface *) |
| void | changePassFinished (int, KgpgInterface *) |
| void | changeTrustFinished (KgpgInterface *) |
| void | changeDisableFinished (KgpgInterface *, int res) |
| void | loadPhotoFinished (QPixmap, KgpgInterface *) |
| void | addPhotoFinished (int, KgpgInterface *) |
| void | deletePhotoFinished (int, KgpgInterface *) |
| void | importKeyFinished (QStringList) |
| void | importKeyOrphaned () |
| void | addUidFinished (int, KgpgInterface *) |
| void | generateKeyFinished (int, KgpgInterface *, QString, QString, QString, QString) |
| void | generateKeyStarted (KgpgInterface *) |
| void | decryptFileStarted (KUrl url) |
| void | decryptFileFinished (int, KgpgInterface *) |
| void | downloadKeysFinished (QList< int >, QStringList, bool, QString, KgpgInterface *) |
| void | downloadKeysAborted (KgpgInterface *) |
| void | uploadKeysFinished (QString, KgpgInterface *) |
| void | uploadKeysAborted (KgpgInterface *) |
| void | delsigfinished (bool) |
| void | processaborted (bool) |
| void | badpassphrase (bool) |
| void | verifyfinished () |
| void | verifyquerykey (QString ID) |
| void | signfinished () |
| void | revokecertificate (QString) |
| void | revokeurl (QString) |
Public Member Functions | |
| KgpgInterface () | |
| ~KgpgInterface () | |
Static Public Member Functions | |
| static QString | checkForUtf8 (QString txt) |
| static QString | checkForUtf8bis (QString txt) |
| static int | gpgVersion () |
| static QStringList | getGpgGroupNames (const QString &configfile) |
| static QStringList | getGpgGroupSetting (const QString &name, const QString &configfile) |
| static void | setGpgGroupSetting (const QString &name, const QStringList &values, const QString &configfile) |
| static void | delGpgGroup (const QString &name, const QString &configfile) |
| static QString | getGpgSetting (QString name, const QString &configfile) |
| static void | setGpgSetting (const QString &name, const QString &value, const QString &url) |
| static bool | getGpgBoolSetting (const QString &name, const QString &configfile) |
| static void | setGpgBoolSetting (const QString &name, const bool &enable, const QString &url) |
Constructor & Destructor Documentation
| KgpgInterface::KgpgInterface | ( | ) |
| KgpgInterface::~KgpgInterface | ( | ) |
Definition at line 51 of file kgpginterface.cpp.
Member Function Documentation
Definition at line 69 of file kgpginterface.cpp.
Definition at line 86 of file kgpginterface.cpp.
| int KgpgInterface::gpgVersion | ( | ) | [static] |
Definition at line 98 of file kgpginterface.cpp.
| QStringList KgpgInterface::getGpgGroupNames | ( | const QString & | configfile | ) | [static] |
Definition at line 113 of file kgpginterface.cpp.
| QStringList KgpgInterface::getGpgGroupSetting | ( | const QString & | name, | |
| const QString & | configfile | |||
| ) | [static] |
Definition at line 134 of file kgpginterface.cpp.
| void KgpgInterface::setGpgGroupSetting | ( | const QString & | name, | |
| const QStringList & | values, | |||
| const QString & | configfile | |||
| ) | [static] |
Definition at line 162 of file kgpginterface.cpp.
Definition at line 204 of file kgpginterface.cpp.
Definition at line 236 of file kgpginterface.cpp.
| void KgpgInterface::setGpgSetting | ( | const QString & | name, | |
| const QString & | value, | |||
| const QString & | url | |||
| ) | [static] |
Definition at line 260 of file kgpginterface.cpp.
Definition at line 298 of file kgpginterface.cpp.
| void KgpgInterface::setGpgBoolSetting | ( | const QString & | name, | |
| const bool & | enable, | |||
| const QString & | url | |||
| ) | [static] |
Definition at line 314 of file kgpginterface.cpp.
| void KgpgInterface::readPublicKeysFinished | ( | KgpgCore::KgpgKeyList | , | |
| KgpgInterface * | ||||
| ) | [signal] |
| KgpgKeyList KgpgInterface::readPublicKeys | ( | const bool & | block = false, |
|
| const QStringList & | ids = QStringList(), |
|||
| const bool & | withsigs = false | |||
| ) | [slot] |
Definition at line 423 of file kgpginterface.cpp.
| KgpgCore::KgpgKeyList KgpgInterface::readPublicKeys | ( | const bool & | block, | |
| const QString & | ids, | |||
| const bool & | withsigs = false | |||
| ) | [inline, slot] |
Definition at line 94 of file kgpginterface.h.
| KgpgKeyList KgpgInterface::readSecretKeys | ( | const QStringList & | ids = QStringList() |
) | [slot] |
Definition at line 723 of file kgpginterface.cpp.
| KgpgCore::KgpgKeyList KgpgInterface::readJoinedKeys | ( | const KgpgCore::KgpgKeyTrust & | trust, | |
| const QStringList & | ids = QStringList() | |||
| ) | [slot] |
| void KgpgInterface::getKeysStarted | ( | KgpgInterface * | ) | [signal] |
| void KgpgInterface::getKeysFinished | ( | QString | , | |
| KgpgInterface * | ||||
| ) | [signal] |
| QString KgpgInterface::getKeys | ( | const bool & | block = false, |
|
| const QString * | attributes = NULL, |
|||
| const QStringList & | ids = QStringList() | |||
| ) | [slot] |
Definition at line 843 of file kgpginterface.cpp.
| void KgpgInterface::txtEncryptionStarted | ( | ) | [signal] |
emitted when a txt encryption starts.
| void KgpgInterface::txtEncryptionFinished | ( | QString | , | |
| KgpgInterface * | ||||
| ) | [signal] |
emitted when a txt encryption finished.
returns encrypted text
| void KgpgInterface::encryptText | ( | const QString & | text, | |
| const QStringList & | userids, | |||
| const QStringList & | options = QStringList() | |||
| ) | [slot] |
Encrypt text function.
- Parameters:
-
text text to be encrypted. userIDs the recipients key id's. Options a list of string with the wanted gpg options. ex: "--armor"
Definition at line 913 of file kgpginterface.cpp.
| void KgpgInterface::txtDecryptionStarted | ( | ) | [signal] |
emitted when a txt decryption starts.
| void KgpgInterface::txtDecryptionFinished | ( | QString | , | |
| KgpgInterface * | ||||
| ) | [signal] |
emitted when a txt decryption finished.
returns decrypted text
| void KgpgInterface::txtDecryptionFailed | ( | QString | , | |
| KgpgInterface * | ||||
| ) | [signal] |
emitted when a txt decryption failed.
returns log output
| void KgpgInterface::decryptText | ( | const QString & | text, | |
| const QStringList & | options = QStringList() | |||
| ) | [slot] |
Decrypt text function.
- Parameters:
-
text QString text to be decrypted. Options StringList with the wanted gpg options.
Definition at line 1005 of file kgpginterface.cpp.
| void KgpgInterface::txtSigningStarted | ( | ) | [signal] |
| void KgpgInterface::txtSigningFinished | ( | QString | , | |
| KgpgInterface * | ||||
| ) | [signal] |
| void KgpgInterface::txtSigningFailed | ( | QString | , | |
| KgpgInterface * | ||||
| ) | [signal] |
| void KgpgInterface::signText | ( | const QString & | text, | |
| const QString & | userid, | |||
| const QStringList & | options | |||
| ) | [slot] |
Sign text function.
- Parameters:
-
text QString text to sign. userIDs the recipient key id's. Options StringList with the wanted gpg options.
Definition at line 1153 of file kgpginterface.cpp.
| void KgpgInterface::txtVerifyStarted | ( | ) | [signal] |
| void KgpgInterface::txtVerifyMissingSignature | ( | QString | , | |
| KgpgInterface * | ||||
| ) | [signal] |
| void KgpgInterface::txtVerifyFinished | ( | QString | , | |
| QString | , | |||
| KgpgInterface * | ||||
| ) | [signal] |
| void KgpgInterface::verifyText | ( | const QString & | text | ) | [slot] |
Verify text function.
- Parameters:
-
text QString text to be verified.
Definition at line 1264 of file kgpginterface.cpp.
| void KgpgInterface::processstarted | ( | QString | ) | [signal] |
emitted when the process starts
| void KgpgInterface::errorMessage | ( | const QString & | , | |
| KgpgInterface * | ||||
| ) | [signal] |
emitted when an error occurred
| void KgpgInterface::fileEncryptionFinished | ( | KUrl | , | |
| KgpgInterface * | ||||
| ) | [signal] |
true if encryption successful, false on error.
| void KgpgInterface::encryptFile | ( | const QStringList & | encryptkeys, | |
| const KUrl & | srcurl, | |||
| const KUrl & | desturl, | |||
| const QStringList & | options = QStringList(), |
|||
| const bool & | symetrical = false | |||
| ) | [slot] |
Encrypt file function.
- Parameters:
-
encryptKeys the recipients key id's. srcUrl Kurl of the file to encrypt. destUrl Kurl for the encrypted file. Options String List with the wanted gpg options. ex: "--armor" symetrical bool whether the encryption should be symmetrical.
Definition at line 1369 of file kgpginterface.cpp.
| void KgpgInterface::signKeyFinished | ( | int | , | |
| const QString & | , | |||
| KgpgInterface * | ||||
| ) | [signal] |
Signature process result: 0 = Unknown error 1 = Bad passphrase 2 = Good passphrase 3 = Aborted by user 4 = Already signed.
| void KgpgInterface::signKey | ( | const QString & | keyid, | |
| const QString & | signkeyid, | |||
| const bool & | local, | |||
| const int & | checking, | |||
| const bool & | terminal = false | |||
| ) | [slot] |
Key signature function.
- Parameters:
-
keyid the ID of the key to be signed signkeyid the ID of the signing key local bool should the signature be local checking terminal if the user want to sign the key manually
Definition at line 1471 of file kgpginterface.cpp.
| void KgpgInterface::keyExpireFinished | ( | int | , | |
| KgpgInterface * | ||||
| ) | [signal] |
0 = Unknown error 1 = Bad Passphrase 2 = Expiration changed 3 = Aborted
Definition at line 1623 of file kgpginterface.cpp.
| void KgpgInterface::changePassFinished | ( | int | , | |
| KgpgInterface * | ||||
| ) | [signal] |
0 = Unknown error 1 = Bad Passphrase 2 = Passphrase changed 3 = Aborted
| void KgpgInterface::changePass | ( | const QString & | keyid | ) | [slot] |
Definition at line 1733 of file kgpginterface.cpp.
| void KgpgInterface::changeTrustFinished | ( | KgpgInterface * | ) | [signal] |
| void KgpgInterface::changeTrust | ( | const QString & | keyid, | |
| const KgpgCore::KgpgKeyOwnerTrust & | keytrust | |||
| ) | [slot] |
This method changes the trust of a key.
- Parameters:
-
keyid the id of the key keytrust the new trust
| void KgpgInterface::changeDisableFinished | ( | KgpgInterface * | , | |
| int | res | |||
| ) | [signal] |
| void KgpgInterface::changeDisable | ( | const QString & | keyid, | |
| const bool & | ison | |||
| ) | [slot] |
Definition at line 1872 of file kgpginterface.cpp.
| void KgpgInterface::loadPhotoFinished | ( | QPixmap | , | |
| KgpgInterface * | ||||
| ) | [signal] |
| QPixmap KgpgInterface::loadPhoto | ( | const QString & | keyid, | |
| const QString & | uid, | |||
| const bool & | block = false | |||
| ) | [slot] |
Definition at line 1899 of file kgpginterface.cpp.
| void KgpgInterface::addPhotoFinished | ( | int | , | |
| KgpgInterface * | ||||
| ) | [signal] |
0 = Unknown error 1 = Bad passphrase 2 = Photo added successfully 3 = Aborted
Definition at line 1942 of file kgpginterface.cpp.
| void KgpgInterface::deletePhotoFinished | ( | int | , | |
| KgpgInterface * | ||||
| ) | [signal] |
0 = Unknown error 1 = Bad passphrase 2 = Photo deleted 3 = Aborted
Definition at line 2044 of file kgpginterface.cpp.
| void KgpgInterface::importKeyFinished | ( | QStringList | ) | [signal] |
| void KgpgInterface::importKeyOrphaned | ( | ) | [signal] |
| void KgpgInterface::importKey | ( | const KUrl & | url | ) | [slot] |
Import key function.
- Parameters:
-
url Kurl the url of the key file. Allows public & secret key import.
Definition at line 2151 of file kgpginterface.cpp.
| void KgpgInterface::importKey | ( | const QString & | keystr | ) | [slot] |
Import key function.
- Parameters:
-
keystr QString containing th key. Allows public & secret key import.
Definition at line 2131 of file kgpginterface.cpp.
| void KgpgInterface::addUidFinished | ( | int | , | |
| KgpgInterface * | ||||
| ) | [signal] |
0 = Unknown error 1 = Bad passphrase 2 = Uid Added 3 = Aborted 4 = email is not valid
| void KgpgInterface::addUid | ( | const QString & | keyid, | |
| const QString & | name, | |||
| const QString & | email, | |||
| const QString & | comment | |||
| ) | [slot] |
- Parameters:
-
email email MUST be a valid email address or an empty string.
Definition at line 2282 of file kgpginterface.cpp.
| void KgpgInterface::generateKeyFinished | ( | int | , | |
| KgpgInterface * | , | |||
| QString | , | |||
| QString | , | |||
| QString | , | |||
| QString | ||||
| ) | [signal] |
This signal is emitted when the key has been generated or when there is an error.
- Parameters:
-
int 0 = Unknown error 1 = Bad passphrase 2 = Key generated 3 = Aborted 4 = email is not valid KgpgInterface give a pointer to this Interface QString the first QString is the name (keyname) QString the seconde QString is the email (keyemail) QString the third QString is the id of the new key if it is created or QString() otherwise QString the last QString is the fingerprint
| void KgpgInterface::generateKeyStarted | ( | KgpgInterface * | ) | [signal] |
KDE 4.0 API Reference