supla-device
Loading...
Searching...
No Matches
src
supla
network
html
select_input_parameter.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
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
*/
18
19
#ifndef SRC_SUPLA_NETWORK_HTML_SELECT_INPUT_PARAMETER_H_
20
#define SRC_SUPLA_NETWORK_HTML_SELECT_INPUT_PARAMETER_H_
21
22
#include <supla/network/html_element.h>
23
#include <supla/local_action.h>
24
#include <stdint.h>
25
26
namespace
Supla {
27
28
namespace
Html {
29
30
struct
SelectValueMapElement
{
31
char
*name =
nullptr
;
32
int
value = 0;
33
SelectValueMapElement
*next =
nullptr
;
34
35
~SelectValueMapElement
();
36
};
37
38
class
SelectInputParameter :
public
HtmlElement,
public
LocalAction
{
39
public
:
40
SelectInputParameter();
41
SelectInputParameter(
const
char
*paramTag,
const
char
*paramLabel);
42
virtual
~SelectInputParameter();
43
void
send(
Supla::WebSender
* sender)
override
;
44
bool
handleResponse(
const
char
* key,
const
char
* value)
override
;
45
void
registerValue(
const
char
*name,
int
value);
46
void
setTag(
const
char
*tagValue);
47
void
setLabel(
const
char
*labelValue);
48
void
onProcessingEnd()
override
;
49
50
void
setBaseTypeBitCount(uint8_t value);
51
52
protected
:
53
char
*tag =
nullptr
;
54
char
*label =
nullptr
;
55
SelectValueMapElement
*firstValue =
nullptr
;
56
bool
configChanged =
false
;
57
uint8_t baseTypeBitCount = 32;
58
};
59
60
};
// namespace Html
61
};
// namespace Supla
62
63
#endif
// SRC_SUPLA_NETWORK_HTML_SELECT_INPUT_PARAMETER_H_
Supla::LocalAction
Definition
local_action.h:53
Supla::WebSender
Definition
web_sender.h:26
Supla::Html::SelectValueMapElement
Definition
select_input_parameter.h:30
Generated by
1.13.2