Messagelib

dmarcinfo.h
1/*
2 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "messageviewer_export.h"
10#include <QDebug>
11namespace MessageViewer
12{
13/**
14 * @brief The DMARCInfo class
15 * @author Laurent Montel <montel@kde.org>
16 */
17class MESSAGEVIEWER_EXPORT DMARCInfo
18{
19public:
20 DMARCInfo();
21 [[nodiscard]] bool parseDMARC(const QString &key);
22 [[nodiscard]] QString version() const;
23 void setVersion(const QString &version);
24
25 [[nodiscard]] QString adkim() const;
26 void setAdkim(const QString &adkim);
27
28 // TODO enum ?
29 [[nodiscard]] QString policy() const;
30 void setPolicy(const QString &policy);
31
32 [[nodiscard]] int percentage() const;
33 void setPercentage(int percentage);
34
35 [[nodiscard]] QString subDomainPolicy() const;
36 void setSubDomainPolicy(const QString &subDomainPolicy);
37
38 [[nodiscard]] bool operator==(const DMARCInfo &other) const;
39
40private:
41 QString mVersion;
42 QString mAdkim;
43 QString mPolicy;
44 QString mSubDomainPolicy;
45 int mPercentage = -1;
46};
47}
48Q_DECLARE_METATYPE(MessageViewer::DMARCInfo)
49MESSAGEVIEWER_EXPORT QDebug operator<<(QDebug d, const MessageViewer::DMARCInfo &t);
The DMARCInfo class.
Definition dmarcinfo.h:18
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.