7#include "dkimmanager.h"
8#include "dkimcheckfulljob.h"
9#include "dkimmanagerkey.h"
10#include "dkimresultattribute.h"
11#include "messageviewer_dkimcheckerdebug.h"
12#include <Akonadi/AttributeFactory>
14using namespace MessageViewer;
15DKIMManager::DKIMManager(
QObject *parent)
19 MessageViewer::DKIMManagerKey::self();
23DKIMManager::~DKIMManager() =
default;
31void DKIMManager::clearInfoWidget()
43 mCheckPolicy = policy;
53 if (mCheckPolicy.saveDkimResult()) {
54 if (item.
hasAttribute<MessageViewer::DKIMResultAttribute>()) {
55 const auto *
const attr = item.
attribute<MessageViewer::DKIMResultAttribute>();
57 DKIMCheckSignatureJob::CheckSignatureResult checkResult;
58 checkResult.error =
static_cast<DKIMCheckSignatureJob::DKIMError
>(attr->error());
59 checkResult.warning =
static_cast<DKIMCheckSignatureJob::DKIMWarning
>(attr->warning());
60 checkResult.status =
static_cast<DKIMCheckSignatureJob::DKIMStatus
>(attr->status());
61 qCDebug(MESSAGEVIEWER_DKIMCHECKER_LOG)
62 <<
"result : status " << checkResult.status <<
" error : " << checkResult.error <<
" warning " << checkResult.warning;
63 Q_EMIT result(checkResult, item.
id());
73 auto job =
new DKIMCheckFullJob(
this);
74 job->setPolicy(mCheckPolicy);
75 connect(job, &DKIMCheckFullJob::result,
this, &DKIMManager::result);
76 job->startCheckFullInfo(item);
81 auto job =
new DKIMCheckFullJob(
this);
82 job->setPolicy(mCheckPolicy);
83 connect(job, &DKIMCheckFullJob::result,
this, &DKIMManager::result);
84 job->startCheckFullInfo(message);
87#include "moc_dkimmanager.cpp"
static void registerAttribute()
bool hasAttribute() const
const T * attribute() const
The DKIMCheckPolicy class.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)