File indexing completed on 2024-04-28 16:11:12

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 
0009 #include "libruqolacore_export.h"
0010 #include "servererrorinfo.h"
0011 #include <QObject>
0012 class ServerErrorInfoHistoryModel;
0013 
0014 class LIBRUQOLACORE_EXPORT ServerErrorInfoHistoryManager : public QObject
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit ServerErrorInfoHistoryManager(QObject *parent = nullptr);
0019     ~ServerErrorInfoHistoryManager() override;
0020 
0021     static ServerErrorInfoHistoryManager *self();
0022 
0023     [[nodiscard]] ServerErrorInfoHistoryModel *serverErrorInfoHistoryModel() const;
0024 
0025     void addServerErrorInfo(const ServerErrorInfo &info);
0026 
0027 Q_SIGNALS:
0028     void newServerErrorInfo();
0029 
0030 private:
0031     ServerErrorInfoHistoryModel *const mServerErrorInfoHistoryModel;
0032 };