Messagelib

dkimcheckpolicyjob.h
1 /*
2  SPDX-FileCopyrightText: 2019-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "dkimchecksignaturejob.h"
10 #include "dmarcpolicyjob.h"
11 #include "messageviewer_export.h"
12 #include <QObject>
13 namespace MessageViewer
14 {
15 /**
16  * @brief The DKIMCheckPolicyJob class
17  * @author Laurent Montel <[email protected]>
18  */
19 class MESSAGEVIEWER_EXPORT DKIMCheckPolicyJob : public QObject
20 {
21  Q_OBJECT
22 public:
23  explicit DKIMCheckPolicyJob(QObject *parent = nullptr);
24  ~DKIMCheckPolicyJob() override;
25  Q_REQUIRED_RESULT bool canStart() const;
26  Q_REQUIRED_RESULT bool start();
27 
28  Q_REQUIRED_RESULT MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult checkResult() const;
29  void setCheckResult(const MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult &checkResult);
30 
31  Q_REQUIRED_RESULT QString emailAddress() const;
32  void setEmailAddress(const QString &emailAddress);
33 
34  Q_REQUIRED_RESULT DKIMCheckPolicy policy() const;
35  void setPolicy(const DKIMCheckPolicy &policy);
36 
37 Q_SIGNALS:
38  void result(const MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult &checkResult);
39 
40 private:
41  void compareWithDefaultRules();
42  void dmarcPolicyResult(const MessageViewer::DMARCPolicyJob::DMARCResult &value, const QString &emailAddress);
43  MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult mCheckResult;
44  QString mEmailAddress;
45  DKIMCheckPolicy mPolicy;
46 };
47 }
The DKIMCheckPolicy class.
Q_SCRIPTABLE Q_NOREPLY void start()
The DKIMCheckPolicyJob class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Mar 24 2023 04:08:31 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.