|
|
|
@ -495,14 +495,14 @@ void AutoConnectAux::_storeElements(WebServerClass* webServer) { |
|
|
|
|
#ifdef AUTOCONNECT_USE_JSON |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Load AutoConnectAux page from JSON description stored in the sketch. |
|
|
|
|
* Load AutoConnectAux page from JSON description stored in PROGMEM. |
|
|
|
|
* This function can load AutoConnectAux for multiple AUX pages written |
|
|
|
|
* in JSON and is registered in AutoConnect. |
|
|
|
|
* @param aux JSON description to be load. |
|
|
|
|
* @return true Successfully loaded. |
|
|
|
|
*/ |
|
|
|
|
bool AutoConnect::load(const String& aux) { |
|
|
|
|
return _parseJson<const String&>(aux); |
|
|
|
|
bool AutoConnect::load(PGM_P aux) { |
|
|
|
|
return _parseJson<const __FlashStringHelper*>(reinterpret_cast<const __FlashStringHelper*>(aux)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -516,6 +516,17 @@ bool AutoConnect::load(const __FlashStringHelper* aux) { |
|
|
|
|
return _parseJson<const __FlashStringHelper*>(aux); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Load AutoConnectAux page from JSON description stored in the sketch. |
|
|
|
|
* This function can load AutoConnectAux for multiple AUX pages written |
|
|
|
|
* in JSON and is registered in AutoConnect. |
|
|
|
|
* @param aux JSON description to be load. |
|
|
|
|
* @return true Successfully loaded. |
|
|
|
|
*/ |
|
|
|
|
bool AutoConnect::load(const String& aux) { |
|
|
|
|
return _parseJson<const String&>(aux); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Load AutoConnectAux page from JSON description from the stream. |
|
|
|
|
* This function can load AutoConnectAux for multiple AUX pages written |
|
|
|
@ -622,6 +633,18 @@ bool AutoConnectAux::load(const String& in) { |
|
|
|
|
return _parseJson<const String&>(in); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constructs an AutoConnectAux instance by reading all the |
|
|
|
|
* AutoConnectElements of the specified URI from the elements passing |
|
|
|
|
* pointer to JSON stored in pgm_data array. |
|
|
|
|
* @param in AutoConnectAux element data which is described by JSON. |
|
|
|
|
* @return true The element collection successfully loaded. |
|
|
|
|
* @return false Invalid JSON data occurred.
|
|
|
|
|
*/ |
|
|
|
|
bool AutoConnectAux::load(PGM_P in) { |
|
|
|
|
return _parseJson<const __FlashStringHelper*>(reinterpret_cast<const __FlashStringHelper*>(in)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constructs an AutoConnectAux instance by reading all the |
|
|
|
|
* AutoConnectElements of the specified URI from the elements defined |
|
|
|
@ -672,26 +695,33 @@ bool AutoConnectAux::_load(JsonObject& jb) { |
|
|
|
|
* elements are to be loaded. |
|
|
|
|
* @return A reference of loaded AutoConnectElement instance. |
|
|
|
|
*/ |
|
|
|
|
bool AutoConnectAux::loadElement(const String& in, const String& name) { |
|
|
|
|
return _parseElement<const String&, const String&>(in, name); |
|
|
|
|
bool AutoConnectAux::loadElement(PGM_P in, const String& name) { |
|
|
|
|
return _parseElement<const __FlashStringHelper*, const String&>(reinterpret_cast<const __FlashStringHelper*>(in), name); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool AutoConnectAux::loadElement(const __FlashStringHelper* in, const String& name) { |
|
|
|
|
return _parseElement<const __FlashStringHelper*, const String&>(in, name); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool AutoConnectAux::loadElement(const String& in, const String& name) { |
|
|
|
|
return _parseElement<const String&, const String&>(in, name); |
|
|
|
|
} |
|
|
|
|
bool AutoConnectAux::loadElement(Stream& in, const String& name) { |
|
|
|
|
return _parseElement<Stream&, const String&>(in, name); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool AutoConnectAux::loadElement(const String& in, std::vector<String> const& names) { |
|
|
|
|
return _parseElement<const String&, std::vector<String> const&>(in, names); |
|
|
|
|
bool AutoConnectAux::loadElement(PGM_P in, std::vector<String> const& names) { |
|
|
|
|
return _parseElement<const __FlashStringHelper*, std::vector<String> const&>(reinterpret_cast<const __FlashStringHelper*>(in), names); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool AutoConnectAux::loadElement(const __FlashStringHelper* in, std::vector<String> const& names) { |
|
|
|
|
return _parseElement<const __FlashStringHelper*, std::vector<String> const&>(in, names); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool AutoConnectAux::loadElement(const String& in, std::vector<String> const& names) { |
|
|
|
|
return _parseElement<const String&, std::vector<String> const&>(in, names); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool AutoConnectAux::loadElement(Stream& in, std::vector<String> const& names) { |
|
|
|
|
return _parseElement<Stream&, std::vector<String> const&>(in, names); |
|
|
|
|
} |
|
|
|
|