File indexing completed on 2024-12-08 12:53:47
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 #include "libruqolacore_export.h" 0009 #include <QDateTime> 0010 #include <QDebug> 0011 0012 class LIBRUQOLACORE_EXPORT ServerErrorInfo 0013 { 0014 Q_GADGET 0015 public: 0016 ServerErrorInfo(); 0017 ~ServerErrorInfo(); 0018 0019 [[nodiscard]] QString accountName() const; 0020 void setAccountName(const QString &newAccountName); 0021 0022 [[nodiscard]] QString message() const; 0023 void setMessage(const QString &newMessage); 0024 0025 [[nodiscard]] QDateTime dateTime() const; 0026 void setDateTime(const QDateTime &newDateTime); 0027 0028 [[nodiscard]] QString identifier() const; 0029 0030 [[nodiscard]] QString dateTimeStr() const; 0031 0032 private: 0033 LIBRUQOLACORE_NO_EXPORT void createUniqueIdentifier(); 0034 static quint64 identifierId; 0035 QString mAccountName; 0036 QString mMessage; 0037 QDateTime mDateTime; 0038 QString mIdentifier; 0039 QString mDateTimeStr; 0040 }; 0041 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 0042 Q_DECLARE_METATYPE(ServerErrorInfo) 0043 #endif 0044 Q_DECLARE_TYPEINFO(ServerErrorInfo, Q_MOVABLE_TYPE); 0045 LIBRUQOLACORE_EXPORT QDebug operator<<(QDebug d, const ServerErrorInfo &t);