mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Refactor config API
This commit is contained in:
22
include/db/ConfigImportExport.h
Normal file
22
include/db/ConfigImportExport.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef CONFIGIMPORTEXPORT_H
|
||||
#define CONFIGIMPORTEXPORT_H
|
||||
|
||||
#include <db/DBManager.h>
|
||||
|
||||
#include <QFile>
|
||||
#include <QJsonDocument>
|
||||
|
||||
class ConfigImportExport : public DBManager
|
||||
{
|
||||
public:
|
||||
ConfigImportExport(QObject* parent = nullptr);
|
||||
|
||||
// TODO: Check naming seConfiguration
|
||||
QPair<bool, QStringList> importJson(const QString& configFile);
|
||||
bool exportJson(const QString& path = "") const;
|
||||
|
||||
QPair<bool, QStringList> setConfiguration(const QJsonObject& config);
|
||||
QJsonObject getConfiguration(const QList<quint8>& instances = {}, bool addGlobalConfig = true, const QStringList& instanceFilteredTypes = {}, const QStringList& globalFilterTypes = {} ) const;
|
||||
};
|
||||
|
||||
#endif // CONFIGIMPORTEXPORT_H
|
Reference in New Issue
Block a user