- The first part

- Added CodeDocs config file for customization
- Fixing LGTM alerts
- LGTM bug fixed again
- added token option to hyperion-remote
- fix DBManager::getDB()
- next bugfix
- correct broken signal from SettingManager to Hyperion
- Token list is created after the schema is fetched

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
Paulchen-Panther
2019-07-12 16:54:26 +02:00
parent 4fc745e748
commit ea796160af
72 changed files with 2546 additions and 485 deletions

View File

@@ -543,6 +543,25 @@ void JsonConnection::setVideoMode(QString videoMode)
parseReply(reply);
}
void JsonConnection::setToken(const QString &token)
{
// create command
QJsonObject command;
command["command"] = QString("authorize");
command["subcommand"] = QString("login");
if (token.size() < 36)
throw std::runtime_error("The given token length is too short.");
command["token"] = token;
// send command message
QJsonObject reply = sendMessage(command);
// parse reply message
parseReply(reply);
}
QJsonObject JsonConnection::sendMessage(const QJsonObject & message)
{
// serialize message