certmanager/lib
job.cpp00001
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 #ifdef HAVE_CONFIG_H
00034 #include <config.h>
00035 #endif
00036
00037 #include "job.h"
00038
00039 #include "keylistjob.h"
00040 #include "encryptjob.h"
00041 #include "decryptjob.h"
00042 #include "decryptverifyjob.h"
00043 #include "signjob.h"
00044 #include "signencryptjob.h"
00045 #include "verifydetachedjob.h"
00046 #include "verifyopaquejob.h"
00047 #include "keygenerationjob.h"
00048 #include "importjob.h"
00049 #include "exportjob.h"
00050 #include "downloadjob.h"
00051 #include "deletejob.h"
00052 #include "refreshkeysjob.h"
00053 #include "specialjob.h"
00054
00055 #include <gpgmepp/context.h>
00056
00057 #include <tqapplication.h>
00058 #include <kdebug.h>
00059
00060 #include <gpg-error.h>
00061
00062 Kleo::Job::Job( TQObject * parent, const char * name )
00063 : TQObject( parent, name )
00064 {
00065 if ( tqApp )
00066 connect( tqApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(slotCancel()) );
00067 }
00068
00069 Kleo::Job::~Job() {
00070
00071 }
00072
00073 void Kleo::Job::showErrorDialog( TQWidget *, const TQString & ) const {
00074 kdDebug() << "Kleo::Job::showErrorDialog() should be reimplemented in Kleo::Job subclasses!" << endl;
00075 }
00076
00077 TQString Kleo::Job::auditLogAsHtml() const {
00078 kdDebug() << "Kleo::Job::auditLogAsHtml() should be reimplemented in Kleo::Job subclasses!" << endl;
00079 return TQString();
00080 }
00081
00082 GpgME::Error Kleo::Job::auditLogError() const {
00083 kdDebug() << "Kleo::Job::auditLogError() should be reimplemented in Kleo::Job subclasses!" << endl;
00084 return GpgME::Error( gpg_error( GPG_ERR_NOT_IMPLEMENTED ) );
00085 }
00086
00087 bool Kleo::Job::isAuditLogSupported() const {
00088 const GpgME::Error err = auditLogError();
00089 return err.code() != GPG_ERR_NOT_IMPLEMENTED ;
00090 }
00091
00092 #define make_job_subclass(x) \
00093 Kleo::x::x( TQObject * parent, const char * name ) : Job( parent, name ) {} \
00094 Kleo::x::~x() {}
00095
00096 make_job_subclass(KeyListJob)
00097 make_job_subclass(EncryptJob)
00098 make_job_subclass(DecryptJob)
00099 make_job_subclass(DecryptVerifyJob)
00100 make_job_subclass(SignJob)
00101 make_job_subclass(SignEncryptJob)
00102 make_job_subclass(VerifyDetachedJob)
00103 make_job_subclass(VerifyOpaqueJob)
00104 make_job_subclass(KeyGenerationJob)
00105 make_job_subclass(ImportJob)
00106 make_job_subclass(ExportJob)
00107 make_job_subclass(DownloadJob)
00108 make_job_subclass(DeleteJob)
00109 make_job_subclass(RefreshKeysJob)
00110 make_job_subclass(SpecialJob)
00111
00112 #undef make_job_subclass
00113
00114 #include "job.moc"
00115
00116 #include "keylistjob.moc"
00117 #include "encryptjob.moc"
00118 #include "decryptjob.moc"
00119 #include "decryptverifyjob.moc"
00120 #include "signjob.moc"
00121 #include "signencryptjob.moc"
00122 #include "verifydetachedjob.moc"
00123 #include "verifyopaquejob.moc"
00124 #include "keygenerationjob.moc"
00125 #include "importjob.moc"
00126 #include "exportjob.moc"
00127 #include "downloadjob.moc"
00128 #include "deletejob.moc"
00129 #include "refreshkeysjob.moc"
00130 #include "specialjob.moc"
|