summaryrefslogtreecommitdiffstats
path: root/kgpg/kgpglibrary.h
blob: 267b7f6bb9905d7630a744291e3ae3ff0ae7772d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/***************************************************************************
                          kgpglibrary.h  -  description
                             -------------------
    begin                : Mon Jul 8 2002
    copyright          : (C) 2002 by Jean-Baptiste Mardelle
    email                : bj@altern.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 KGPGLIBRARY_H
#define KGPGLIBRARY_H

#include <tqobject.h>
#include <kurl.h>
#include <tdeshortcut.h>
#include <tdeio/job.h> 

class KPassivePopup;
class KProgress;

class KgpgLibrary : public TQObject
{

        Q_OBJECT
  

public:
        /**
         * Initialize the class
         */
        KgpgLibrary(TQWidget *parent=0,bool pgpExtension=false);
        ~KgpgLibrary();

        KURL::List urlselecteds;

public slots:
        void slotFileEnc(KURL::List urls=KURL(""),TQStringList opts=TQString(),TQStringList defaultKey=TQString(),TDEShortcut goDefaultKey=TQKeySequence(CTRL+TQt::Key_Home));
        void slotFileDec(KURL srcUrl,KURL destUrl,TQStringList customDecryptOption=TQStringList());
	void shredprocessenc(KURL::List filesToShred);

private slots:
	void startencode(TQStringList encryptKeys,TQStringList encryptOptions,bool shred,bool symetric);
        void fastencode(KURL &fileToCrypt,TQStringList selec,TQStringList encryptOptions,bool symetric);
//        void startencode(TQString &selec,TQString encryptOptions,bool shred,bool symetric);
	void slotShredResult( TDEIO::Job * job );
	void shredpreprocessenc(KURL fileToShred);
        void processenc(KURL);
        void processdecover();
        void processdecerror(TQString mssge);
        void processencerror(TQString mssge);
        void processpopup(TQString fileName);
        void processpopup2(TQString fileName);

private:
        TQString customDecrypt,tempFile,extension;
        KURL urlselected;
        KPassivePopup *pop;
	KProgress *shredProgressBar;
	bool popIsActive;
	TQWidget *panel;
	TQStringList _encryptKeys;
	TQStringList _encryptOptions;
	bool _shred;
	bool _symetric;

signals:
        void decryptionOver();
	void importOver(TQStringList);
	void systemMessage(TQString,bool reset=false);
};

#endif // KGPGLIBRARY_H