|
1 | 1 | // project includes |
2 | 2 | #include <api/JsonAPI.h> |
3 | 3 |
|
4 | | -// stl includes |
5 | | -#include <iostream> |
6 | | -#include <iterator> |
7 | | - |
8 | 4 | // Qt includes |
9 | 5 | #include <QResource> |
10 | 6 | #include <QDateTime> |
11 | | -#include <QCryptographicHash> |
12 | 7 | #include <QImage> |
13 | 8 | #include <QBuffer> |
14 | 9 | #include <QByteArray> |
|
18 | 13 |
|
19 | 14 | // hyperion includes |
20 | 15 | #include <leddevice/LedDeviceWrapper.h> |
21 | | - |
22 | 16 | #include <leddevice/LedDevice.h> |
23 | 17 | #include <leddevice/LedDeviceFactory.h> |
24 | 18 |
|
@@ -49,33 +43,13 @@ using namespace hyperion; |
49 | 43 |
|
50 | 44 | JsonAPI::JsonAPI(QString peerAddress, Logger *log, bool localConnection, QObject *parent, bool noListener) |
51 | 45 | : API(log, localConnection, parent) |
52 | | -/* , _authManager(AuthManager::getInstance()) // moved to API |
53 | | - , _authorized(false) |
54 | | - , _adminAuthorized(false) |
55 | | - , _apiAuthRequired(_authManager->isAuthRequired()) |
56 | | - , _noListener(noListener) |
57 | | - , _peerAddress(peerAddress) |
58 | | - , _log(log) // moved to API |
59 | | - , _localConnection(localConnection) |
60 | | - , _instanceManager(HyperionIManager::getInstance()) |
61 | | - , _hyperion(nullptr) // moved |
62 | | - , _jsonCB(new JsonCB(this)) |
63 | | - , _streaming_logging_activated(false) |
64 | | - , _ledStreamTimer(new QTimer(this)) */ |
65 | 46 | { |
66 | | - //_authManager = AuthManager::getInstance(); // moved to API init |
67 | | - //_authorized = false; // moved INIT api |
68 | | - //_adminAuthorized = false; // moved INIT api |
69 | | - //_apiAuthRequired = _authManager->isAuthRequired(); |
70 | 47 | _noListener = noListener; |
71 | 48 | _peerAddress = peerAddress; |
72 | | - //_log = log; // moved to API |
73 | | - // _localConnection = localConnection; moved init ti api |
74 | | - //_instanceManager = HyperionIManager::getInstance(); |
75 | | - //_hyperion = nullptr; // moved |
76 | 49 | _jsonCB = new JsonCB(this); |
77 | 50 | _streaming_logging_activated = false; |
78 | 51 | _ledStreamTimer = new QTimer(this); |
| 52 | + |
79 | 53 | Q_INIT_RESOURCE(JSONRPC_schemas); |
80 | 54 | } |
81 | 55 |
|
@@ -199,7 +173,7 @@ void JsonAPI::handleMessage(const QString &messageString, const QString &httpAut |
199 | 173 | else if (command == "leddevice") |
200 | 174 | handleLedDeviceCommand(message, command, tan); |
201 | 175 |
|
202 | | - // BEGIN | The following commands are derecated but used to ensure backward compatibility with hyperion Classic remote control |
| 176 | + // BEGIN | The following commands are deprecated but used to ensure backward compatibility with hyperion Classic remote control |
203 | 177 | else if (command == "clearall") |
204 | 178 | handleClearallCommand(message, command, tan); |
205 | 179 | else if (command == "transform" || command == "correction" || command == "temperature") |
@@ -330,7 +304,7 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString |
330 | 304 | activePriorities.removeAll(255); |
331 | 305 | int currentPriority = _hyperion->getCurrentPriority(); |
332 | 306 |
|
333 | | - foreach (int priority, activePriorities) |
| 307 | + for(int priority : activePriorities) |
334 | 308 | { |
335 | 309 | const Hyperion::InputInfo &priorityInfo = _hyperion->getPriorityInfo(priority); |
336 | 310 | QJsonObject item; |
|
0 commit comments