Messagelib

scamdetectioninfo.cpp
1/*
2 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5
6*/
7
8#include "scamdetectioninfo.h"
9using namespace MessageViewer;
10ScamDetectionInfo::ScamDetectionInfo() = default;
11
12ScamDetectionInfo::~ScamDetectionInfo() = default;
13
14const QString &ScamDetectionInfo::domainOrEmail() const
15{
16 return mDomainOrEmail;
17}
18
19void ScamDetectionInfo::setDomainOrEmail(const QString &newDomainOrEmail)
20{
21 mDomainOrEmail = newDomainOrEmail;
22}
23
24bool ScamDetectionInfo::enabled() const
25{
26 return mEnabled;
27}
28
29void ScamDetectionInfo::setEnabled(bool newEnabled)
30{
31 mEnabled = newEnabled;
32}
33
34bool ScamDetectionInfo::isValid() const
35{
36 return !mDomainOrEmail.isEmpty();
37}
38
39ScamDetectionInfo::ScamDetectionFields ScamDetectionInfo::scamChecks() const
40{
41 return mFields;
42}
43
45{
46 d.space() << "isValid" << t.isValid();
47 d.space() << "Enabled" << t.enabled();
48 d.space() << "DomainOrName" << t.domainOrEmail();
49 d.space() << "scamChecks" << t.scamChecks();
50 return d;
51}
52
53bool ScamDetectionInfo::operator==(const ScamDetectionInfo &other) const
54{
55 return domainOrEmail() == other.domainOrEmail() && enabled() == other.enabled() && scamChecks() == other.scamChecks();
56}
The ScamDetectionInfo class.
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
QDebug & space()
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.