2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#ifndef MQTT_BRIDGE_LIB_BROKER_H
43#define MQTT_BRIDGE_LIB_BROKER_H
45#include <iot/mqtt/Topic.h>
51#ifndef DOXYGEN_SHOULD_SKIP_THIS
55#include <nlohmann/json.hpp>
67 const std::string& sessionStoreFileName,
68 const std::string& instanceName,
69 const std::string& protocol,
70 const std::string& encryption,
71 const std::string& transport,
73 const std::string& clientId,
74 const uint16_t keepAlive,
76 const std::string& willTopic,
77 const std::string& willMessage,
78 const uint8_t willQoS,
80 const std::string& username,
81 const std::string& password,
83 const std::string& prefix,
85 const std::list<iot::
mqtt::Topic>& topics);
105 const std::string&
getName()
const;
Broker * getBroker(const std::string &fullInstanceName)
void addMqtt(mqtt::bridge::lib::Mqtt *mqtt)
const std::string & getName() const
const std::list< const mqtt::bridge::lib::Mqtt * > & getMqttList() const
const std::map< const std::string, Broker > & getBrokerMap() const
void publish(const mqtt::bridge::lib::Mqtt *originMqtt, const iot::mqtt::packets::Publish &publish)
bool operator<(const Bridge &rhs) const
void addBroker(const std::string &fullInstanceName, Broker &&broker)
std::size_t enabledBroker
std::list< const mqtt::bridge::lib::Mqtt * > mqttList
bool getAllConnected1() const
Bridge(const std::string &name, const std::string &prefix, bool disabled)
std::map< const std::string, Broker > brokerMap
void removeMqtt(mqtt::bridge::lib::Mqtt *mqtt)
const std::string & getPrefix() const
const std::string & getName() const
bool getLoopPrevention() const
Broker(const Broker &)=delete
const nlohmann::json & getAddress() const
const std::string & getWillTopic() const
bool getWillRetain() const
const std::list< iot::mqtt::Topic > & getTopics() const
std::list< iot::mqtt::Topic > topics
uint16_t getKeepAlive() const
const std::string & getWillMessage() const
const std::string & getSessionStoreFileName() const
const std::string & getClientId() const
const std::string & getEncryption() const
const std::string & getUsername() const
bool getCleanSession() const
Broker(Bridge &bridge, const std::string &sessionStoreFileName, const std::string &instanceName, const std::string &protocol, const std::string &encryption, const std::string &transport, const nlohmann::json &address, const std::string &clientId, const uint16_t keepAlive, bool cleanSession, const std::string &willTopic, const std::string &willMessage, const uint8_t willQoS, bool willRetain, const std::string &username, const std::string &password, bool loopPrevention, const std::string &prefix, bool disabled, const std::list< iot::mqtt::Topic > &topics)
const std::string & getPassword() const
const std::string & getProtocol() const
Broker(Broker &&)=default
std::string sessionStoreFileName
const std::string & getTransport() const
Bridge & getBridge() const
const std::string & getPrefix() const
uint8_t getWillQoS() const
const Broker & getBroker() const
void bridgeStopped(const std::string &bridgeName)
void brokerConnected(const std::string &bridgeName, const std::string &instanceName)
void bridgeStarted(const std::string &bridgeName)
static SSEDistributor & instance()
void brokerDisconnected(const std::string &bridgeName, const std::string &instanceName)