33 #ifndef _CERTMANAGER_H_
34 #define _CERTMANAGER_H_
38 #include <tdemainwindow.h>
39 #include <tdemacros.h>
41 #include <tqcstring.h>
42 #include <tqptrlist.h>
49 class KeyListViewItem;
62 class HierarchyAnalyser;
79 class TDE_EXPORT CertManager :
public TDEMainWindow {
83 CertManager(
bool remote =
false,
const TQString& query = TQString(),
84 const TQString&
import=TQString(),
85 TQWidget * parent=0,
const char * name=0, WFlags f=0 );
88 bool isRemote()
const {
return mRemote; }
91 void stopOperations();
92 void enableOperations(
bool );
95 void slotStartCertificateDownload(
const TQString & fingerprint,
const TQString& displayName );
96 void newCertificate();
97 void revokeCertificate();
98 void extendCertificate();
99 void slotDeleteCertificate();
100 void slotExportSecretKey();
101 void slotExportCertificate();
102 void slotUploadResult( TDEIO::Job* job );
104 void slotImportCertFromFile();
105 void slotImportCertFromFile(
const KURL & filename );
106 void slotImportResult( TDEIO::Job* );
108 void slotCertificateImportResult(
const GpgME::ImportResult & result );
109 void slotCertificateDownloadResult(
const GpgME::Error & error,
const TQByteArray & keyData );
110 void slotKeyListResult(
const GpgME::KeyListResult & result );
111 void slotDeleteResult(
const GpgME::Error & error,
const GpgME::Key & );
112 void slotSecretKeyExportResult(
const GpgME::Error & error,
const TQByteArray & keyData );
113 void slotCertificateExportResult(
const GpgME::Error & error,
const TQByteArray & keyData );
114 void slotClearCRLsResult();
116 void importCRLFromFile();
117 void importCRLFromLDAP();
118 void slotImportCRLJobFinished( TDEIO::Job * );
120 void slotDirmngrExited();
121 void slotStderr( TDEProcess*,
char*,
int );
123 void slotToggleRemote(
int idx);
124 void slotToggleHierarchicalView(
bool );
127 void slotClearCRLs();
129 void slotViewDetails();
130 void slotViewDetails( Kleo::KeyListViewItem * item );
131 void slotSelectionChanged();
132 void slotDownloadCertificate();
133 void slotStartWatchGnuPG();
135 void slotEditKeybindings();
136 void slotShowConfigurationDialog();
137 void slotConfigureGpgME();
138 void slotContextMenu(Kleo::KeyListViewItem*,
const TQPoint& point);
139 void slotDropped(
const KURL::List&);
145 void slotValidate() { startRedisplay(
true ); }
148 void slotRedisplay() { startRedisplay(
false ); }
153 void slotExpandAll();
154 void slotCollapseAll();
155 void slotRefreshKeys();
156 void slotRefreshKeysResult(
const GpgME::Error & );
159 void createStatusBar();
160 void createActions();
161 void updateStatusBarLabels();
162 void updateImportActions(
bool enable );
163 void startKeyListing(
bool,
bool,
const TQStringList & );
164 void startKeyListing(
bool,
bool,
const std::set<std::string> & );
165 void startCertificateImport(
const TQByteArray & keyData,
const TQString& certDisplayName );
166 void startImportCRL(
const TQString& fileName,
bool isTempFile );
167 void startClearCRLs();
168 void startSecretKeyExport(
const TQString & fingerprint );
169 void startCertificateExport(
const TQStringList & fingerprints );
170 bool connectAndStartDirmngr(
const char*,
const char* );
171 void connectJobToStatusBarProgress( Kleo::Job * job,
const TQString & initialText );
172 void disconnectJobFromStatusBarProgress(
const GpgME::Error & err );
173 void importNextURLOrRedisplay();
174 void startRedisplay(
bool validating );
175 TQString displayNameForJob(
const Kleo::Job *job );
176 void readConfig(
bool noQueryGiven );
180 Kleo::KeyListView * mKeyListView;
182 Kleo::ProgressBar * mProgressBar;
183 TQLabel * mStatusLabel;
185 TDEProcess * mDirmngrProc;
186 TQString mErrorbuffer;
187 TQPtrList<Kleo::KeyListViewItem> mItemsToDelete;
188 KURL::List mURLsToImport;
189 typedef TQMap<const Kleo::Job *, TQString> JobsDisplayNameMap;
190 JobsDisplayNameMap mJobsDisplayNameMap;
191 HierarchyAnalyser * mHierarchyAnalyser;
193 LineEditAction * mLineEditAction;
194 ComboAction * mComboAction;
195 TDEAction * mFindAction;
196 TDEAction * mImportCertFromFileAction;
197 TDEAction * mImportCRLFromFileAction;
198 TDEAction * mExportCertificateAction;
199 TDEAction * mViewCertDetailsAction;
200 TDEAction * mDeleteCertificateAction;
201 #ifdef NOT_IMPLEMENTED_ANYWAY
202 TDEAction * mRevokeCertificateAction;
203 TDEAction * mExtendCertificateAction;
205 TDEAction * mExportSecretKeyAction;
206 TDEAction * mDownloadCertificateAction;
207 TDEAction * mValidateCertificateAction;
209 TQString mImportCRLTempFile;
210 TQString mCurrentQuery;
211 std::set<std::string> mPreviouslySelectedFingerprints;
212 bool mNextFindRemote : 1;
214 bool mDirMngrFound : 1;
215 bool mHierarchicalView : 1;