mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Update Json Interface (return config file) (#144)
* Add handleConfigGetCommand Function * Add handleConfigGetCommand Function * Add schema-configget.json * Add configget * Add new JSON file schema-configget.json * add --configget command to hyperion-remote * Add getConfigFile function * Add getConfigFile function
This commit is contained in:
committed by
redPanther
parent
722d4eb357
commit
0e2f0127fd
@@ -258,6 +258,8 @@ void JsonClientConnection::handleMessage(const std::string &messageString)
|
||||
handleAdjustmentCommand(message);
|
||||
else if (command == "sourceselect")
|
||||
handleSourceSelectCommand(message);
|
||||
else if (command == "configget")
|
||||
handleConfigGetCommand(message);
|
||||
else
|
||||
handleNotImplemented();
|
||||
}
|
||||
@@ -801,6 +803,18 @@ void JsonClientConnection::handleSourceSelectCommand(const Json::Value & message
|
||||
}
|
||||
}
|
||||
|
||||
void JsonClientConnection::handleConfigGetCommand(const Json::Value &)
|
||||
{
|
||||
// create result
|
||||
Json::Value result;
|
||||
result["success"] = true;
|
||||
Json::Value & config = result["result"];
|
||||
config = _hyperion->getJsonConfig();
|
||||
|
||||
// send the result
|
||||
sendMessage(result);
|
||||
}
|
||||
|
||||
void JsonClientConnection::handleNotImplemented()
|
||||
{
|
||||
sendErrorReply("Command not implemented");
|
||||
|
Reference in New Issue
Block a user