certmanager/lib
hierarchicalkeylistjob.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef __KLEO_HIERARCHICALKEYLISTJOB_H__
00034 #define __KLEO_HIERARCHICALKEYLISTJOB_H__
00035
00036 #include <kleo/keylistjob.h>
00037 #include <kleo/cryptobackend.h>
00038 #include <kdepimmacros.h>
00039
00040 #include <gpgmepp/keylistresult.h>
00041
00042 #include <qcstring.h>
00043 #include <qguardedptr.h>
00044
00045 #include <set>
00046
00047 namespace GpgME {
00048 class Error;
00049 class Key;
00050 }
00051
00052 namespace Kleo {
00053 class KeyListJob;
00054 }
00055
00056 namespace Kleo {
00057
00071 class KDE_EXPORT HierarchicalKeyListJob : public KeyListJob {
00072 Q_OBJECT
00073 public:
00074 HierarchicalKeyListJob( const CryptoBackend::Protocol * protocol,
00075 bool remote=false, bool includeSigs=false, bool validating=false );
00076 ~HierarchicalKeyListJob();
00077
00087 GpgME::Error start( const QStringList & patterns, bool secretOnly=false );
00088
00089 GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly,
00090 std::vector<GpgME::Key> & keys );
00091
00092 private slots:
00093 void slotResult( const GpgME::KeyListResult & );
00094 void slotNextKey( const GpgME::Key & key );
00096 void slotCancel();
00097
00098 private:
00099 GpgME::Error startAJob();
00100
00101 private:
00102 const CryptoBackend::Protocol * const mProtocol;
00103 const bool mRemote;
00104 const bool mIncludeSigs;
00105 const bool mValidating;
00106 bool mTruncated;
00107 std::set<QString> mSentSet;
00108 std::set<QString> mScheduledSet;
00109 std::set<QString> mNextSet;
00110 GpgME::KeyListResult mIntermediateResult;
00111 QGuardedPtr<KeyListJob> mJob;
00112 };
00113
00114 }
00115
00116 #endif // __KLEO_HIERARCHICALKEYLISTJOB_H__
|