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:
Paulchen-Panther
2016-08-03 22:03:19 +02:00
committed by redPanther
parent 722d4eb357
commit 0e2f0127fd
8 changed files with 79 additions and 3 deletions

View File

@@ -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");