Rename Message and Cleanup
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
#ifndef MQTT_H
|
||||
#define MQTT_H
|
||||
|
||||
#include "Message.h"
|
||||
#include "MQTTMessage.h"
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -18,10 +18,10 @@ public:
|
||||
~MQTT();
|
||||
|
||||
public:
|
||||
typedef std::function<void(const Message&)> CallbackMethod;
|
||||
typedef std::function<void(const MQTTMessage&)> CallbackMethod;
|
||||
|
||||
public:
|
||||
bool Send(const Message& message);
|
||||
bool Send(const MQTTMessage& message);
|
||||
bool Subscribe(const std::string& topic);
|
||||
void Unsubscribe(const std::string& topic);
|
||||
size_t Connect(CallbackMethod function);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#ifndef MESSAGE_H
|
||||
#define MESSAGE_H
|
||||
#ifndef MQTTMESSAGE_H
|
||||
#define MQTTMESSAGE_H
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace MQTT {
|
||||
|
||||
struct Message
|
||||
struct MQTTMessage
|
||||
{
|
||||
std::string topic;
|
||||
std::string payload;
|
||||
@@ -14,4 +14,4 @@ struct Message
|
||||
|
||||
} // namespace MQTT
|
||||
|
||||
#endif // MESSAGE_H
|
||||
#endif // MQTTMESSAGE_H
|
||||
Reference in New Issue
Block a user