|
Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
Public Member Functions | |
| void | addItem (int offset, String firmwareFileUrl) |
| void | start () |
| void | switchToRom (uint8_t romSlot) |
| void | setCallback (OtaUpdateDelegate reqUpdateDelegate) |
| void | setDelegate (OtaUpdateDelegate reqUpdateDelegate) |
| void | setBaseRequest (HttpRequest *request) |
| rBootHttpUpdateItem | getItem (unsigned int index) |
Protected Types | |
| typedef ObjectMap< String, HttpClientConnection > | HttpConnectionPool |
Protected Member Functions | |
| void | applyUpdate () |
| void | updateFailed () |
| virtual rBootItemOutputStream * | getStream () |
| virtual int | itemComplete (HttpConnection &client, bool success) |
| virtual int | updateComplete (HttpConnection &client, bool success) |
| bool | sendRequest (const Url &url, RequestCompletedDelegate requestComplete) |
| bool | sendRequest (const HttpMethod method, const Url &url, const HttpHeaders &headers, RequestCompletedDelegate requestComplete) |
| bool | sendRequest (const HttpMethod method, const Url &url, const HttpHeaders &headers, const String &body, RequestCompletedDelegate requestComplete) |
| bool | downloadString (const Url &url, RequestCompletedDelegate requestComplete) |
| bool | downloadFile (const Url &url, RequestCompletedDelegate requestComplete=nullptr) |
| bool | downloadFile (const Url &url, const String &saveFileName, RequestCompletedDelegate requestComplete=nullptr) |
| Queue request to download a file. More... | |
| bool | send (HttpRequest *request) |
| HttpRequest * | request (const String &url) SMING_DEPRECATED |
| HttpRequest * | createRequest (const Url &url) |
| Helper function to create a new request on a URL. More... | |
| String | getCacheKey (const Url &url) |
Static Protected Member Functions | |
| static void | cleanup () |
Protected Attributes | |
| Vector< rBootHttpUpdateItem > | items |
| int | currentItem = 0 |
| rboot_write_status | rBootWriteStatus |
| uint8_t | romSlot = NO_ROM_SWITCH |
| OtaUpdateDelegate | updateDelegate = nullptr |
| HttpRequest * | baseRequest = nullptr |
Static Protected Attributes | |
| static HttpConnectionPool | httpConnectionPool |
|
inlinestaticinherited |
Use this method to clean all request queues and object pools
|
inlineinherited |
Helper function to create a new request on a URL.
| url |
| HttpRequest* |
|
inherited |
Queue request to download a file.
| url | Source of file data |
| saveFilename | Path to save file to. Optional: specify nullptr to use name from url |
| requestComplete | Completion callback |
|
inlineinherited |
createRequest() instead