summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/kleo
diff options
context:
space:
mode:
Diffstat (limited to 'certmanager/lib/kleo')
-rw-r--r--certmanager/lib/kleo/job.cpp14
-rw-r--r--certmanager/lib/kleo/job.h6
2 files changed, 20 insertions, 0 deletions
diff --git a/certmanager/lib/kleo/job.cpp b/certmanager/lib/kleo/job.cpp
index c5371b646..dedbebfc2 100644
--- a/certmanager/lib/kleo/job.cpp
+++ b/certmanager/lib/kleo/job.cpp
@@ -52,9 +52,13 @@
#include "refreshkeysjob.h"
#include "specialjob.h"
+#include <gpgmepp/context.h>
+
#include <tqapplication.h>
#include <kdebug.h>
+#include <gpg-error.h>
+
Kleo::Job::Job( TQObject * parent, const char * name )
: TQObject( parent, name )
{
@@ -75,6 +79,16 @@ TQString Kleo::Job::auditLogAsHtml() const {
return TQString();
}
+GpgME::Error Kleo::Job::auditLogError() const {
+ kdDebug() << "Kleo::Job::auditLogError() should be reimplemented in Kleo::Job subclasses!" << endl;
+ return GpgME::Error( gpg_error( GPG_ERR_NOT_IMPLEMENTED ) );
+}
+
+bool Kleo::Job::isAuditLogSupported() const {
+ const GpgME::Error err = auditLogError();
+ return err.code() != GPG_ERR_NOT_IMPLEMENTED ;
+}
+
#define make_job_subclass(x) \
Kleo::x::x( TQObject * parent, const char * name ) : Job( parent, name ) {} \
Kleo::x::~x() {}
diff --git a/certmanager/lib/kleo/job.h b/certmanager/lib/kleo/job.h
index 1c091bab3..78ff58ce1 100644
--- a/certmanager/lib/kleo/job.h
+++ b/certmanager/lib/kleo/job.h
@@ -38,6 +38,10 @@
class TQWidget;
+namespace GpgME {
+ class Error;
+}
+
namespace Kleo {
/**
@@ -67,6 +71,8 @@ namespace Kleo {
virtual void showErrorDialog( TQWidget * parent=0, const TQString & caption=TQString::null ) const;
virtual TQString auditLogAsHtml() const;
+ virtual GpgME::Error auditLogError() const;
+ bool isAuditLogSupported() const;
public slots:
virtual void slotCancel() = 0;