supla-device
Loading...
Searching...
No Matches
mqtt_topic.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_PROTOCOL_MQTT_TOPIC_H_
5#define SRC_SUPLA_PROTOCOL_MQTT_TOPIC_H_
6
7namespace Supla {
8namespace Protocol {
9
10#define MAX_TOPIC_LEN 256
11
12class MqttTopic {
13 public:
14 explicit MqttTopic(const char *);
15 MqttTopic();
16
17 MqttTopic operator/(const char *);
18 MqttTopic& operator/=(const char *);
19
20 MqttTopic& operator+=(const char *);
21
22 MqttTopic operator/(const int);
23 MqttTopic& operator/=(const int);
24
25 void append(const char *);
26
27 const char *c_str();
28
29 protected:
30 char data[MAX_TOPIC_LEN] = {};
31};
32
33} // namespace Protocol
34} // namespace Supla
35
36#endif // SRC_SUPLA_PROTOCOL_MQTT_TOPIC_H_
Definition mqtt_topic.h:12