add some status to executeaction
This commit is contained in:
parent
18fc920f71
commit
e40752aa8e
@ -146,10 +146,15 @@ void JsonRPCServer::handleActionMessage(int clientId, int commandId, const QStri
|
|||||||
Action action(deviceId);
|
Action action(deviceId);
|
||||||
action.setParams(actionParams);
|
action.setParams(actionParams);
|
||||||
|
|
||||||
HiveCore::instance()->deviceManager()->executeAction(action);
|
DeviceManager::DeviceError error = HiveCore::instance()->deviceManager()->executeAction(action);
|
||||||
|
switch (error) {
|
||||||
sendResponse(clientId, commandId);
|
case DeviceManager::DeviceErrorNoError:
|
||||||
|
sendResponse(clientId, commandId);
|
||||||
|
break;
|
||||||
|
case DeviceManager::DeviceErrorDeviceNotFound:
|
||||||
|
sendErrorResponse(clientId, commandId, "No such device");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user