Warning, file /network/tokodon/src/admin/emailinfo.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // SPDX-FileCopyrightText: 2023 Rishi Kumar <rsi.dev17@gmail.com> 0002 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0003 0004 #pragma once 0005 0006 #include <QJsonArray> 0007 0008 class EmailInfo 0009 { 0010 Q_GADGET 0011 0012 public: 0013 enum SeverityValues { LimitSignUps, BlockSignUps, BlockAccess }; 0014 0015 Q_ENUM(SeverityValues) 0016 0017 QString id() const; 0018 QString domain() const; 0019 QDateTime createdAt() const; 0020 int accountSignupCount() const; 0021 int ipSignupCount() const; 0022 0023 void calculateCount(const QJsonArray &history, EmailInfo &info); 0024 0025 static EmailInfo fromSourceData(const QJsonObject &doc); 0026 0027 private: 0028 int m_accountSignupCount = 0; 0029 int m_ipSignupCount = 0; 0030 QString m_id; 0031 QString m_domain; 0032 QDateTime m_createdAt; 0033 QJsonArray m_history; 0034 };