mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-14 00:58:21 +00:00
24 lines
No EOL
751 B
C++
24 lines
No EOL
751 B
C++
#include "mqttcommands/deleteAllReturnRoute.h"
|
|
|
|
MqttCommand_DeleteAllReturnRoute::MqttCommand_DeleteAllReturnRoute(QObject *parent) :
|
|
MqttCommand(parent)
|
|
{
|
|
this->m_requiredFields << "node";
|
|
}
|
|
MqttCommand* MqttCommand_DeleteAllReturnRoute::Create(QObject *parent) {
|
|
return new MqttCommand_DeleteAllReturnRoute(parent);
|
|
}
|
|
|
|
bool MqttCommand_DeleteAllReturnRoute::processMessage(QJsonDocument msg) {
|
|
QTOZWManager *mgr = getOZWManager();
|
|
if (mgr->deleteAllReturnRoute(msg["node"].toInt())) {
|
|
QJsonObject js;
|
|
js["status"] = "ok";
|
|
emit sendCommandUpdate(GetCommand(), js);
|
|
return true;
|
|
}
|
|
QJsonObject js;
|
|
js["status"] = "failed";
|
|
emit sendCommandUpdate(GetCommand(), js);
|
|
return false;
|
|
} |