forgot these files

This commit is contained in:
Justin Hammond 2019-11-12 20:43:27 +08:00
parent 77f792cb00
commit f8e01864d8
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#include "mqttcommands/close.h"
MqttCommand_Close::MqttCommand_Close(QObject *parent) :
MqttCommand(parent)
{
}
MqttCommand* MqttCommand_Close::Create(QObject *parent) {
return new MqttCommand_Close(parent);
}
bool MqttCommand_Close::processMessage(rapidjson::Document &msg) {
Q_UNUSED(msg);
QTOZWManager *mgr = getOZWManager();
return this->sendSimpleStatus(mgr->close());
}

View file

@ -0,0 +1,17 @@
#ifndef CLOSE_H
#define CLOSE_H
#include "mqttcommands/mqttcommands.h"
class MqttCommand_Close : public MqttCommand {
Q_OBJECT
public:
static MqttCommand *Create(QObject *parent = nullptr);
static QString StaticGetCommand() { return "Close";};
QString GetCommand() override { return StaticGetCommand(); };
bool processMessage(rapidjson::Document &) override;
private:
MqttCommand_Close(QObject *parent = nullptr);
};
#endif // CLOSE_H