supla-device
Loading...
Searching...
No Matches
html_element.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_NETWORK_HTML_ELEMENT_H_
5#define SRC_SUPLA_NETWORK_HTML_ELEMENT_H_
6
7namespace Supla {
8
9class WebSender;
10
11enum HtmlSection {
12 HTML_SECTION_FORM,
13 HTML_SECTION_DEVICE_INFO,
14 HTML_SECTION_NETWORK,
15 HTML_SECTION_PROTOCOL,
16 HTML_SECTION_BETA_FORM,
17 HTML_SECTION_BUTTON_BEFORE,
18 HTML_SECTION_BUTTON_AFTER,
19 HTML_SECTION_LOGS
20};
21
23 public:
24 static HtmlElement *begin();
25 static HtmlElement *last();
26
27 static const char *selected(bool isSelected);
28 static const char *checked(bool isChecked);
29
30 HtmlElement *next();
31
32 explicit HtmlElement(HtmlSection section = HTML_SECTION_FORM);
33 virtual ~HtmlElement();
34 virtual void send(Supla::WebSender *sender) = 0;
35 virtual bool handleResponse(const char *key, const char *value);
36 virtual void onProcessingEnd();
37 HtmlSection section;
38
39 protected:
40 static HtmlElement *firstPtr;
41 HtmlElement *nextPtr = nullptr;
42};
43
44}; // namespace Supla
45
46#endif // SRC_SUPLA_NETWORK_HTML_ELEMENT_H_
Definition html_element.h:22
Definition web_sender.h:160