supla-device
Loading...
Searching...
No Matches
src
supla
network
html
network_address_parameters.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_NETWORK_ADDRESS_PARAMETERS_H_
5
#define SRC_SUPLA_NETWORK_HTML_NETWORK_ADDRESS_PARAMETERS_H_
6
7
#include <supla/network/netif_config.h>
8
9
class
SuplaDeviceClass
;
10
11
namespace
Supla {
12
13
class
WebSender;
14
15
namespace
Html {
16
17
class
NetworkAddressParameters
{
18
public
:
19
NetworkAddressParameters
(
const
char
* blobName,
const
char
* prefix);
20
21
void
send(
Supla::WebSender
* sender);
22
bool
handleResponse(
const
char
* key,
const
char
* value);
23
void
onProcessingEnd();
24
25
private
:
26
void
ensureLoaded();
27
void
renderField(
Supla::WebSender
* sender,
28
const
char
* suffix,
29
const
char
* label,
30
const
char
* value,
31
const
char
* placeholder,
32
const
char
* pattern,
33
const
char
* title,
34
bool
requiredWhenStatic);
35
bool
matchKey(
const
char
* key,
const
char
* suffix)
const
;
36
void
buildKey(
char
* out,
size_t
outSize,
const
char
* suffix)
const
;
37
void
buildId(
char
* out,
size_t
outSize,
const
char
* suffix)
const
{
38
buildKey(out, outSize, suffix);
39
}
40
41
const
char
* blobName_ =
nullptr
;
42
const
char
* prefix_ =
nullptr
;
43
const
char
* sectionTitle_ =
nullptr
;
44
NetifConfigBlob
config_ = {};
45
bool
loaded_ =
false
;
46
bool
responseSeen_ =
false
;
47
bool
invalidInput_ =
false
;
48
};
49
50
}
// namespace Html
51
}
// namespace Supla
52
53
#endif
// SRC_SUPLA_NETWORK_HTML_NETWORK_ADDRESS_PARAMETERS_H_
SuplaDeviceClass
Definition
SuplaDevice.h:167
Supla::Html::NetworkAddressParameters
Definition
network_address_parameters.h:17
Supla::WebSender
Definition
web_sender.h:160
Supla::NetifConfigBlob
Definition
netif_config.h:22
Generated by
1.12.0