-
Notifications
You must be signed in to change notification settings - Fork 0
/
dss_types.hpp
52 lines (38 loc) · 1.13 KB
/
dss_types.hpp
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef DS_MQTT_BRIDGE_DSS_TYPES_HPP
#define DS_MQTT_BRIDGE_DSS_TYPES_HPP
#include <iosfwd>
#include <string>
#include <nlohmann/json_fwd.hpp>
namespace dsmq {
namespace dss {
class Endpoint
{
friend void from_json( nlohmann::json const& src, Endpoint& dst );
friend std::ostream& operator<<( std::ostream& os, Endpoint const& val );
public:
Endpoint();
Endpoint( std::string host, std::string port, std::string apikey );
std::string const& host() const { return host_; }
std::string const& port() const { return port_; }
std::string const& apikey() const { return apikey_; }
private:
std::string host_;
std::string port_;
std::string apikey_;
};
class EventCallScene
{
friend void from_json( nlohmann::json const& src, EventCallScene& dst );
public:
static constexpr char const* name = "callSceneBus";
unsigned zone() const { return zone_; }
unsigned group() const { return group_; }
unsigned scene() const { return scene_; }
private:
unsigned zone_ {};
unsigned group_ {};
unsigned scene_ {};
};
} // namespace dss
} // namespace dsmq
#endif //DS_MQTT_BRIDGE_DSS_TYPES_HPP