| 202 | } |
| 203 | |
| 204 | void HyperAPI::initialize() |
| 205 | { |
| 206 | // init API, REQUIRED! |
| 207 | BaseAPI::init(); |
| 208 | |
| 209 | // setup auth interface |
| 210 | connect(this, &BaseAPI::SignalPendingTokenClientNotification, this, &HyperAPI::newPendingTokenRequest); |
| 211 | connect(this, &BaseAPI::SignalTokenClientNotification, this, &HyperAPI::handleTokenResponse); |
| 212 | |
| 213 | // listen for killed instances |
| 214 | connect(_instanceManager.get(), &HyperHdrManager::SignalInstanceStateChanged, this, &HyperAPI::handleInstanceStateChange); |
| 215 | |
| 216 | // pipe callbacks from subscriptions to parent |
| 217 | connect(this, &CallbackAPI::SignalCallbackToClient, this, &HyperAPI::SignalCallbackJsonMessage); |
| 218 | |
| 219 | // notify hyperhdr about a jsonMessageForward |
| 220 | if (_hyperhdr != nullptr) |
| 221 | connect(this, &HyperAPI::SignalForwardJsonMessage, _hyperhdr.get(), &HyperHdrInstance::SignalForwardJsonMessage); |
| 222 | } |
| 223 | |
| 224 | bool HyperAPI::handleInstanceSwitch(quint8 inst, bool forced) |
| 225 | { |
no test coverage detected