forked from netpie2015/microgear-esp8266-arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMQTTClient.h
28 lines (26 loc) · 1.31 KB
/
MQTTClient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* MQTTClient - abstract class to implement MQTT client class
*/
#ifndef MQTTClient_h
#define MQTTClient_h
#include "Client.h"
class MQTTClient {
public:
virtual boolean connect(const char* id);
virtual boolean connect(const char* id, const char* user, const char* pass);
virtual boolean connect(const char* id, const char* willTopic, uint8_t willQos, boolean willRetain, const char* willMessage);
virtual boolean connect(const char* id, const char* user, const char* pass, const char* willTopic, uint8_t willQos, boolean willRetain, const char* willMessage);
virtual void disconnect();
virtual boolean publish(const char* topic, const char* payload);
virtual boolean publish(const char* topic, const char* payload, boolean retained);
virtual boolean publish(const char* topic, const uint8_t * payload, unsigned int plength);
virtual boolean publish(const char* topic, const uint8_t * payload, unsigned int plength, boolean retained);
virtual boolean publish_P(const char* topic, const uint8_t * payload, unsigned int plength, boolean retained);
virtual boolean subscribe(const char* topic);
virtual boolean subscribe(const char* topic, uint8_t qos);
virtual boolean unsubscribe(const char* topic);
virtual boolean loop();
virtual boolean connected();
virtual int state();
};
#endif