supla-device
Toggle main menu visibility
Loading...
Searching...
No Matches
src
supla
protocol
mqtt_channel_handler.h
1
/*
2
* Copyright (C) AC SOFTWARE SP. Z O.O
3
*
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
8
*/
9
10
#ifndef SRC_SUPLA_PROTOCOL_MQTT_CHANNEL_HANDLER_H_
11
#define SRC_SUPLA_PROTOCOL_MQTT_CHANNEL_HANDLER_H_
12
13
#include <stdint.h>
14
15
namespace
Supla {
16
class
Element
;
17
namespace
Protocol {
18
19
class
Mqtt
;
20
21
class
MqttChannelHandler
{
22
public
:
23
virtual
~MqttChannelHandler
() =
default
;
24
25
virtual
int
mqttHandledChannelType()
const
= 0;
26
27
virtual
void
mqttPublishChannelState(Mqtt *mqtt,
Supla::Element
*element) = 0;
28
virtual
void
mqttSubscribeChannel(Mqtt *mqtt,
Supla::Element
*element) = 0;
29
virtual
bool
mqttProcessData(Mqtt *mqtt,
30
const
char
*topic_part,
31
const
char
*payload,
32
Supla::Element
*element) = 0;
33
virtual
void
mqttPublishHADiscovery(Mqtt *mqtt,
Supla::Element
*element) = 0;
34
35
MqttChannelHandler
*mqttNextHandler()
const
{
36
return
nextHandler;
37
}
38
39
private
:
40
friend
class
Mqtt;
41
MqttChannelHandler
*nextHandler =
nullptr
;
42
};
43
44
}
// namespace Protocol
45
}
// namespace Supla
46
47
#endif
// SRC_SUPLA_PROTOCOL_MQTT_CHANNEL_HANDLER_H_
Supla::Element
Base class for all elements of SuplaDevice.
Definition
element.h:37
Supla::Protocol::MqttChannelHandler
Definition
mqtt_channel_handler.h:21
Supla::Protocol::Mqtt
Definition
mqtt.h:79
Generated by
1.17.0