You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
3.6 KiB
125 lines
3.6 KiB
## <i class="fa fa-code"></i> Constructor
|
|
|
|
### AutoConnectAux
|
|
|
|
```cpp
|
|
AutoConnectAux(const String& uri = String(""), const String& title = String(""), const bool menu = true, const AutoConnectElementVT addons = AutoConnectElementVT())
|
|
```
|
|
<dl class="apidl">
|
|
<dt>**Parameters**</dt>
|
|
<dd><span class="apidef">uri</span>URI of this custom Web Page.</dd>
|
|
<dd><span class="apidef">title</span>Page title of this custom web page. It will appear on the auto connection menu and at the top of that page.</dd>
|
|
<dd><span class="apidef">addons</span>Reference to AutoConnectElement collection.</dt>
|
|
</dl>
|
|
|
|
## <i class="fa fa-code"></i> Public member functions
|
|
|
|
### <i class="fa fa-caret-right"></i> add
|
|
|
|
```cpp
|
|
void add(AutoConnectElement& addon)
|
|
```
|
|
```cpp
|
|
void add(AutoConnectElementVT addons)
|
|
```
|
|
Add an element to the AutoConnectAux. An added element is displayed on the custom Web page invoked from the AutoConnect menu.
|
|
|
|
### <i class="fa fa-caret-right"></i> getElement
|
|
|
|
```cpp
|
|
template<typename T> T& getElement(const String& name)
|
|
```
|
|
```cpp
|
|
AutoConnectElement* getElement(const String& name)
|
|
```
|
|
|
|
Get registered AutoConnectElement as specified name.
|
|
|
|
### <i class="fa fa-caret-right"></i> getElements
|
|
|
|
```cpp
|
|
AutoConnectElementVT& getElements(void)
|
|
```
|
|
Get vector of reference of all elements.
|
|
|
|
### <i class="fa fa-caret-right"></i> load
|
|
|
|
```cpp
|
|
bool load(const String& in)
|
|
```
|
|
```cpp
|
|
bool load(const __FlashStringHelper* in)
|
|
```
|
|
```cpp
|
|
bool load(Stream& in)
|
|
```
|
|
Load whole elements to AutoConnectAux Pages.
|
|
|
|
### <i class="fa fa-caret-right"></i> loadElement
|
|
|
|
```cpp
|
|
bool loadElement(const String& in, const String& name = String(""))
|
|
```
|
|
```cpp
|
|
bool loadElement(const __FlashStringHelper* in, const String& name = String(""))
|
|
```
|
|
```cpp
|
|
bool loadElement(Stream& in, const String& name = String(""))
|
|
```
|
|
Load specified element.
|
|
|
|
### <i class="fa fa-caret-right"></i> menu
|
|
|
|
```cpp
|
|
void menu(const bool post)
|
|
```
|
|
Set or reset the display as menu item for this AutoConnectAux.
|
|
|
|
### <i class="fa fa-caret-right"></i> on
|
|
|
|
```cpp
|
|
void on(const AuxHandlerFunctionT handler, const AutoConnectExitOrder_t order = AC_EXIT_AHEAD)
|
|
```
|
|
Register the handler function of the AutoConnectAux.
|
|
<dl class="apidl">
|
|
<dt>**Parameters**</dt>
|
|
<dd><span class="apidef">handler</span>A function that behaves when a request to the AutoConnectAux page occurs. AuxHandlerFunctionT type is defined by the following declaration.</dd>
|
|
<dd><span class="apidef"></span>`String handler(AutoConnectAux&, PageArgument&)`</dd>
|
|
<dd><span class="apidef">order</span>Specifies when the handler is called with the following enumeration value.</dd>
|
|
: - **AC_EXIT_AHEAD** :
|
|
Called before AutoConnect generates the HTML of the page. You set the value of AutoConnectElements in the handler then its value will be displayed on the page.
|
|
: - **AC_EXIT_LATER** :
|
|
Called after AutoConnect generates the HTML of the page. You can append to HTML generated by AutoConnect.
|
|
: - **AC_EXIT_BOTH** :
|
|
Called even before generating HTML and after generated.
|
|
</dl>
|
|
|
|
### <i class="fa fa-caret-right"></i> release
|
|
|
|
```cpp
|
|
bool release(const String& name)
|
|
```
|
|
Release a specified AutoConnectElement.
|
|
|
|
### <i class="fa fa-caret-right"></i> saveElement
|
|
|
|
```cpp
|
|
size_t saveElement(Stream& out, std::vector<String> const& names = {})
|
|
```
|
|
Write elements of AutoConnectAux to the stream.
|
|
|
|
### <i class="fa fa-caret-right"></i> setElementValue
|
|
|
|
```cpp
|
|
bool setElementValue(const String& name, const String value)
|
|
```
|
|
```cpp
|
|
bool setElementValue(const String& name, std::vector<String> const& values)
|
|
```
|
|
|
|
### <i class="fa fa-caret-right"></i> setTitle
|
|
|
|
```cpp
|
|
void setTitle(const String& title)
|
|
```
|
|
Set the title string of the AutoConnectAux page.
|
|
|