summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/cryptography/kgpginterface.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/plugins/cryptography/kgpginterface.h
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/cryptography/kgpginterface.h')
-rw-r--r--kopete/plugins/cryptography/kgpginterface.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/kopete/plugins/cryptography/kgpginterface.h b/kopete/plugins/cryptography/kgpginterface.h
new file mode 100644
index 00000000..b70bc68a
--- /dev/null
+++ b/kopete/plugins/cryptography/kgpginterface.h
@@ -0,0 +1,91 @@
+//Code from KGPG
+
+/***************************************************************************
+ kgpginterface.h - description
+ -------------------
+ begin : Sat Jun 29 2002
+ copyright : (C) 2002 by
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KGPGINTERFACE_H
+#define KGPGINTERFACE_H
+
+
+#include <kurl.h>
+
+/**
+ * Encrypt a file using gpg.
+ */
+//class KgpgEncryptFile : public QObject {
+class KgpgInterface : public QObject {
+
+ Q_OBJECT
+
+ public:
+ /**
+ * Initialize the class
+ */
+ KgpgInterface();
+
+
+ /**Encrypt text function
+ * @param text QString text to be encrypted.
+ * @param userIDs the recipients key id's.
+ * @param Options String with the wanted gpg options. ex: "--armor"
+ * returns the encrypted text or empty string if encyption failed
+ */
+ static QString KgpgEncryptText(QString text,QString userIDs, QString Options="");
+
+ /**Decrypt text function
+ * @param text QString text to be decrypted.
+ * @param userID QString the name of the decryption key (only used to prompt user for passphrase)
+ */
+ static QString KgpgDecryptText(QString text,QString userID);
+// static QString KgpgDecryptFileToText(KURL srcUrl,QString userID);
+
+ /*
+ * Destructor for the class.
+ */
+ ~KgpgInterface();
+
+ static QString checkForUtf8(QString txt);
+
+
+ private slots:
+
+signals:
+
+ private:
+ /**
+ * @internal structure for communication
+ */
+ QString message,tempKeyFile,userIDs,txtprocess,output;
+ QCString passphrase;
+ bool deleteSuccess,konsLocal,anonymous,txtsent,decfinished,decok,badmdc;
+ int signSuccess;
+ int step,signb,sigsearch;
+ QString konsSignKey, konsKeyID;
+
+
+ /**
+ * @internal structure for the file information
+ */
+ KURL file;
+ /**
+ * @internal structure to send signal only once on error.
+ */
+ bool encError;
+};
+
+
+#endif