BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
MqttMessage.h
1 #pragma once
2 
3 #include <string>
4 
5 namespace BeeeOn {
6 
7 class MqttMessage {
8 public:
9  enum QoS {
10  MOST_ONCE = 0,
11  LEAST_ONCE = 1,
12  EXACTLY_ONCE = 2,
13  };
14 
15  MqttMessage();
17  const std::string &topic,
18  const std::string &message,
19  QoS oqs = QoS::LEAST_ONCE);
20 
21  std::string topic() const;
22  std::string message() const;
23  QoS qos() const;
24 
25  bool isEmpty() const;
26 
27  bool operator !() const;
28 
29 private:
30  std::string m_topic;
31  std::string m_message;
32  MqttMessage::QoS m_qos;
33 };
34 
35 }
Definition: MqttMessage.h:7