mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Refactor Settings DB and Handling (#1786)
* Refactor config API
* Corrections
* Test Qt 6.8
* Revert "Test Qt 6.8"
This reverts commit eceebec49e
.
* Corrections 2
* Update Changelog
* Add configFilter element for getconfig call
* Do not create errors for DB updates when in read-only mode
* Have configuration migration and validation before Hyperion starts
* Correct Tests
* Corrections
* Add migration items
* Correct windows build
* Ensure that first instance as default one exists
* Remove dependency between AuthManager and SSDPHandler
* Correct typos
* Address CodeQL findings
* Replace CamkeSettings by Presets and provide debug scenarios
This commit is contained in:
@@ -239,18 +239,6 @@ protected:
|
||||
QString saveEffect(const QJsonObject &data);
|
||||
#endif
|
||||
|
||||
///
|
||||
/// @brief Save settings object. Requires ADMIN ACCESS
|
||||
/// @param data The data object
|
||||
///
|
||||
bool saveSettings(const QJsonObject &data);
|
||||
|
||||
///
|
||||
/// @brief Restore settings object. Requires ADMIN ACCESS
|
||||
/// @param data The data object
|
||||
///
|
||||
bool restoreSettings(const QJsonObject &data);
|
||||
|
||||
///
|
||||
/// @brief Set the authorizationn state
|
||||
/// @param authorized True, if authorized
|
||||
|
@@ -186,7 +186,7 @@ private:
|
||||
///
|
||||
void handleSourceSelectCommand(const QJsonObject &message, const JsonApiCommand& cmd);
|
||||
|
||||
/// Handle an incoming JSON GetConfig message and check subcommand
|
||||
/// Handle an incoming JSON Config message and check subcommand
|
||||
///
|
||||
/// @param message the incoming message
|
||||
///
|
||||
@@ -204,6 +204,12 @@ private:
|
||||
///
|
||||
void handleConfigSetCommand(const QJsonObject &message, const JsonApiCommand& cmd);
|
||||
|
||||
/// Handle an incoming JSON GetConfig message from handleConfigCommand()
|
||||
///
|
||||
/// @param message the incoming message
|
||||
///
|
||||
void handleConfigGetCommand(const QJsonObject &message, const JsonApiCommand& cmd);
|
||||
|
||||
/// Handle an incoming JSON RestoreConfig message from handleConfigCommand()
|
||||
///
|
||||
/// @param message the incoming message
|
||||
|
@@ -84,6 +84,7 @@ public:
|
||||
DeleteToken,
|
||||
Discover,
|
||||
GetConfig,
|
||||
GetConfigOld,
|
||||
GetInfo,
|
||||
GetPendingTokenRequests,
|
||||
GetProperties,
|
||||
@@ -134,6 +135,7 @@ public:
|
||||
case DeleteToken: return "deleteToken";
|
||||
case Discover: return "discover";
|
||||
case GetConfig: return "getconfig";
|
||||
case GetConfigOld: return "getconfig-old";
|
||||
case GetInfo: return "getInfo";
|
||||
case GetPendingTokenRequests: return "getPendingTokenRequests";
|
||||
case GetProperties: return "getProperties";
|
||||
@@ -274,6 +276,7 @@ public:
|
||||
{ {"color", ""}, { Command::Color, SubCommand::Empty, Authorization::Yes, InstanceCmd::Multi, NoListenerCmd::Yes} },
|
||||
{ {"componentstate", ""}, { Command::ComponentState, SubCommand::Empty, Authorization::Yes, InstanceCmd::Multi, NoListenerCmd::Yes} },
|
||||
{ {"config", "getconfig"}, { Command::Config, SubCommand::GetConfig, Authorization::Admin, InstanceCmd::Yes, NoListenerCmd::Yes} },
|
||||
{ {"config", "getconfig-old"}, { Command::Config, SubCommand::GetConfigOld, Authorization::Admin, InstanceCmd::Yes, NoListenerCmd::Yes} },
|
||||
{ {"config", "getschema"}, { Command::Config, SubCommand::GetSchema, Authorization::Admin, InstanceCmd::Yes, NoListenerCmd::Yes} },
|
||||
{ {"config", "reload"}, { Command::Config, SubCommand::Reload, Authorization::Admin, InstanceCmd::Yes, NoListenerCmd::Yes} },
|
||||
{ {"config", "restoreconfig"}, { Command::Config, SubCommand::RestoreConfig, Authorization::Admin, InstanceCmd::Yes, NoListenerCmd::Yes} },
|
||||
|
@@ -31,6 +31,8 @@ public:
|
||||
static QJsonObject getSystemInfo(const Hyperion* hyperion);
|
||||
QJsonObject discoverSources (const QString& sourceType, const QJsonObject& params);
|
||||
|
||||
static QJsonObject getConfiguration(const QList<quint8>& instances = {}, const QStringList& instanceFilteredTypes = {}, const QStringList& globalFilterTypes = {} );
|
||||
|
||||
private:
|
||||
|
||||
template<typename GrabberType>
|
||||
|
Reference in New Issue
Block a user