Messagelib

scamdetectioninfo.h
1/*
2 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5
6*/
7#pragma once
8#include "messageviewer_export.h"
9#include <QDebug>
10namespace MessageViewer
11{
12/**
13 * @brief The ScamDetectionInfo class
14 * @author Laurent Montel <montel@kde.org>
15 */
16class MESSAGEVIEWER_EXPORT ScamDetectionInfo
17{
18public:
19 enum ScamDetectionField {
20 None = 0,
21 DisableAll = 1,
22 RedirectUrl = 2,
23 HasIp = 4,
24 };
25 Q_ENUMS(ScamDetectionField)
26 Q_DECLARE_FLAGS(ScamDetectionFields, ScamDetectionField)
27
30
31 [[nodiscard]] const QString &domainOrEmail() const;
32 void setDomainOrEmail(const QString &newDomainOrEmail);
33
34 [[nodiscard]] bool enabled() const;
35 void setEnabled(bool newEnabled);
36
37 [[nodiscard]] bool isValid() const;
38
39 [[nodiscard]] ScamDetectionInfo::ScamDetectionFields scamChecks() const;
40
41 [[nodiscard]] bool operator==(const ScamDetectionInfo &other) const;
42
43private:
44 ScamDetectionFields mFields = None;
45 QString mDomainOrEmail;
46 bool mEnabled = false;
47};
48}
49Q_DECLARE_TYPEINFO(MessageViewer::ScamDetectionInfo, Q_RELOCATABLE_TYPE);
50MESSAGEVIEWER_EXPORT QDebug operator<<(QDebug d, const MessageViewer::ScamDetectionInfo &t);
The ScamDetectionInfo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:56:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.