File indexing completed on 2024-05-26 16:08:52

0001 /*
0002    SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 #include "libruqola_private_export.h"
0009 #include <QJsonArray>
0010 #include <QString>
0011 
0012 class LIBRUQOLACORE_TESTS_EXPORT LicensesManager
0013 {
0014 public:
0015     LicensesManager();
0016     ~LicensesManager();
0017 
0018     [[nodiscard]] const QStringList &licenses() const;
0019     void setLicenses(const QStringList &newLicenses);
0020 
0021     [[nodiscard]] bool hasLicense(const QString &name);
0022 
0023     void parseLicenses(const QJsonArray &obj);
0024 
0025 private:
0026     QStringList mLicenses;
0027 };