Messagelib

scamdetectioninfo.h
1 /*
2  SPDX-FileCopyrightText: 2021-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 
6 */
7 #pragma once
8 #include "messageviewer_export.h"
9 #include <QDebug>
10 namespace MessageViewer
11 {
12 /**
13  * @brief The ScamDetectionInfo class
14  * @author Laurent Montel <[email protected]>
15  */
16 class MESSAGEVIEWER_EXPORT ScamDetectionInfo
17 {
18 public:
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  Q_REQUIRED_RESULT const QString &domainOrEmail() const;
32  void setDomainOrEmail(const QString &newDomainOrEmail);
33 
34  Q_REQUIRED_RESULT bool enabled() const;
35  void setEnabled(bool newEnabled);
36 
37  Q_REQUIRED_RESULT bool isValid() const;
38 
39  Q_REQUIRED_RESULT ScamDetectionInfo::ScamDetectionFields scamChecks() const;
40 
41  Q_REQUIRED_RESULT bool operator==(const ScamDetectionInfo &other) const;
42 
43 private:
44  ScamDetectionFields mFields;
45  QString mDomainOrEmail;
46  bool mEnabled = false;
47 };
48 }
49 Q_DECLARE_TYPEINFO(MessageViewer::ScamDetectionInfo, Q_MOVABLE_TYPE);
50 MESSAGEVIEWER_EXPORT QDebug operator<<(QDebug d, const MessageViewer::ScamDetectionInfo &t);
QDataStream & operator<<(QDataStream &out, const KDateTime &dateTime)
The ScamDetectionInfo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Mar 24 2023 04:08:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.