4#define SINGLE_LEVEL_WILDCARD "+"
5#define TOPIC_LEVEL_SEPARATOR "/"
6#define MULTI_LEVEL_WILDCARD "#"
14 sMQTTTopic(
const char *name,
unsigned short nameLen,
const char *payload,
unsigned short payloadLen);
15 sMQTTTopic(std::string &name,std::string &payload,
char QoS=0);
22 _name = other->
Name();
26 _payload =
new char[strlen(other->
Payload()) + 1];
27 strcpy(_payload, other->
Payload());
52 bool match(
const std::string &other);
58 sMQTTClientList::iterator cli;
for (cli = clients.begin(); cli != clients.end(); cli++)
if (*cli == client) { clients.erase(cli);
break; }
59 return clients.empty();
61 const sMQTTClientList getSubscribeList() {
68 unsigned short _payloadLen;
70 sMQTTClientList clients;
73typedef std::vector<sMQTTTopic*> sMQTTTopicList;
Main Client class.
Definition: sMQTTClient.h:22
Definition: sMQTTTopic.h:11
void subscribe(sMQTTClient *client)
Definition: sMQTTTopic.cpp:43
const char * Payload()
topic payload
Definition: sMQTTTopic.h:38
unsigned char QoS()
topic qos
Definition: sMQTTTopic.h:42
bool match(sMQTTTopic *other)
Definition: sMQTTTopic.cpp:49
const char * Name()
toppic name
Definition: sMQTTTopic.h:34
Definition: sMQTTTopic.h:76