This commit is contained in:
Murat
2020-08-31 22:07:12 +02:00
parent fda061bc87
commit 0a2961a3b4
7 changed files with 17 additions and 65 deletions

View File

@@ -1,14 +1,9 @@
// project includes
#include <api/JsonAPI.h>
// stl includes
#include <iostream>
#include <iterator>
// Qt includes
#include <QResource>
#include <QDateTime>
#include <QCryptographicHash>
#include <QImage>
#include <QBuffer>
#include <QByteArray>
@@ -18,7 +13,6 @@
// hyperion includes
#include <leddevice/LedDeviceWrapper.h>
#include <leddevice/LedDevice.h>
#include <leddevice/LedDeviceFactory.h>
@@ -49,33 +43,13 @@ using namespace hyperion;
JsonAPI::JsonAPI(QString peerAddress, Logger *log, bool localConnection, QObject *parent, bool noListener)
: API(log, localConnection, parent)
/* , _authManager(AuthManager::getInstance()) // moved to API
, _authorized(false)
, _adminAuthorized(false)
, _apiAuthRequired(_authManager->isAuthRequired())
, _noListener(noListener)
, _peerAddress(peerAddress)
, _log(log) // moved to API
, _localConnection(localConnection)
, _instanceManager(HyperionIManager::getInstance())
, _hyperion(nullptr) // moved
, _jsonCB(new JsonCB(this))
, _streaming_logging_activated(false)
, _ledStreamTimer(new QTimer(this)) */
{
//_authManager = AuthManager::getInstance(); // moved to API init
//_authorized = false; // moved INIT api
//_adminAuthorized = false; // moved INIT api
//_apiAuthRequired = _authManager->isAuthRequired();
_noListener = noListener;
_peerAddress = peerAddress;
//_log = log; // moved to API
// _localConnection = localConnection; moved init ti api
//_instanceManager = HyperionIManager::getInstance();
//_hyperion = nullptr; // moved
_jsonCB = new JsonCB(this);
_streaming_logging_activated = false;
_ledStreamTimer = new QTimer(this);
Q_INIT_RESOURCE(JSONRPC_schemas);
}
@@ -199,7 +173,7 @@ proceed:
else if (command == "leddevice")
handleLedDeviceCommand(message, command, tan);
// BEGIN | The following commands are derecated but used to ensure backward compatibility with hyperion Classic remote control
// BEGIN | The following commands are deprecated but used to ensure backward compatibility with hyperion Classic remote control
else if (command == "clearall")
handleClearallCommand(message, command, tan);
else if (command == "transform" || command == "correction" || command == "temperature")
@@ -330,7 +304,7 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
activePriorities.removeAll(255);
int currentPriority = _hyperion->getCurrentPriority();
foreach (int priority, activePriorities)
for(int priority : activePriorities)
{
const Hyperion::InputInfo &priorityInfo = _hyperion->getPriorityInfo(priority);
QJsonObject item;