supla-device
Loading...
Searching...
No Matches
src
supla
network
html
text_cmd_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_TEXT_CMD_INPUT_PARAMETER_H_
20
#define SRC_SUPLA_NETWORK_HTML_TEXT_CMD_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
RegisteredCmdActionMap
{
31
char
*cmd =
nullptr
;
32
int
eventId = 0;
33
RegisteredCmdActionMap
*next =
nullptr
;
34
35
~RegisteredCmdActionMap
();
36
};
37
38
class
TextCmdInputParameter :
public
HtmlElement,
public
LocalAction
{
39
public
:
40
TextCmdInputParameter(
const
char
*paramTag,
const
char
*paramLabel);
41
virtual
~TextCmdInputParameter();
42
void
send(
Supla::WebSender
* sender)
override
;
43
bool
handleResponse(
const
char
* key,
const
char
* value)
override
;
44
void
registerCmd(
const
char
*cmdStr,
int
eventId);
45
46
protected
:
47
char
*tag =
nullptr
;
48
char
*label =
nullptr
;
49
RegisteredCmdActionMap
*firstCmd =
nullptr
;
50
};
51
52
};
// namespace Html
53
};
// namespace Supla
54
55
56
#endif
// SRC_SUPLA_NETWORK_HTML_TEXT_CMD_INPUT_PARAMETER_H_
Supla::LocalAction
Definition
local_action.h:53
Supla::WebSender
Definition
web_sender.h:26
Supla::Html::RegisteredCmdActionMap
Definition
text_cmd_input_parameter.h:30
Generated by
1.13.2