AutoConnectAux API
Constructor¶
AutoConnectAux¶
AutoConnectAux(const String& uri = String(""), const String& title = String(""), const bool menu = true, const AutoConnectElementVT addons = AutoConnectElementVT())
- Parameters
- uriURI of this custom Web Page.
- titlePage title of this custom web page. It will appear on the auto connection menu and at the top of that page.
- addonsReference to AutoConnectElement collection.
Public member functions¶
add¶
void add(AutoConnectElement& addon)
void add(AutoConnectElementVT addons)
getElement¶
template<typename T> T& getElement(const String& name)
AutoConnectElement* getElement(const String& name)
Get registered AutoConnectElement as specified name.
getElements¶
AutoConnectElementVT& getElements(void)
load¶
bool load(const String& in)
bool load(const __FlashStringHelper* in)
bool load(Stream& in)
loadElement¶
bool loadElement(const String& in, const String& name = String(""))
bool loadElement(const __FlashStringHelper* in, const String& name = String(""))
bool loadElement(Stream& in, const String& name = String(""))
menu¶
void menu(const bool post)
on¶
void on(const AuxHandlerFunctionT handler, const AutoConnectExitOrder_t order = AC_EXIT_AHEAD)
- Register the handler function of the AutoConnectAux.
- Parameters
- handlerA function that behaves when a request to the AutoConnectAux page occurs. AuxHandlerFunctionT type is defined by the following declaration.
String handler(AutoConnectAux&, PageArgument&)
- orderSpecifies when the handler is called with the following enumeration value.
-
- 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.
release¶
bool release(const String& name)
saveElement¶
size_t saveElement(Stream& out, std::vector<String> const& names = {})
setElementValue¶
bool setElementValue(const String& name, const String value)
bool setElementValue(const String& name, std::vector<String> const& values)
setTitle¶
void setTitle(const String& title)