|
supla-device
|


Public Types | |
| enum class | WebServerMode { HttpOnly , HttpsOnly , Auto } |
Public Member Functions | |
| WebServer (Supla::HtmlGenerator *) | |
| virtual void | start ()=0 |
| virtual void | stop ()=0 |
| virtual void | setWebServerMode (WebServerMode mode) |
| virtual WebServerMode | getWebServerMode () const |
| virtual WebServerMode | resolveWebServerMode () const |
| void | setSuplaDeviceClass (SuplaDeviceClass *) |
| void | notifyClientConnected (bool isPost=false) |
| virtual void | parsePost (const char *postContent, int size, bool lastChunk=true) |
| virtual void | resetParser () |
| const char * | getCsrfToken () |
| bool | isCsrfTokenValid (const char *token) |
| void | setBetaProcessing () |
| void | setCsrfFirstFieldRequired (bool required) |
| virtual bool | verifyEmbeddedHttpsCertificates () |
Static Public Member Functions | |
| static WebServer * | Instance () |
Public Attributes | |
| Supla::HtmlGenerator * | htmlGenerator = nullptr |
Protected Member Functions | |
| void | addSecurityLog (Supla::SecurityLogSource source, const char *log) const |
| void | addSecurityLog (uint32_t source, const char *log) const |
| bool | isSectionAllowed (Supla::HtmlSection section) const |
| Check if section is allowed in current POST request. | |
| void | cleanupParser () |
Protected Attributes | |
| bool | destroyGenerator = false |
| SuplaDeviceClass * | sdc = nullptr |
| bool | keyFound = false |
| int | partialSize = 0 |
| char | key [HTML_KEY_LENGTH] = {} |
| char * | value = nullptr |
| bool | betaProcessing = false |
| bool | csrfFirstFieldRequired = true |
| bool | csrfValidated = false |
| bool | csrfRejected = false |
| uint8_t | csrfSecret [16] = {} |
| char | csrfToken [33] = {} |
Static Protected Attributes | |
| static WebServer * | webServerInstance = nullptr |
|
protected |
Check if section is allowed in current POST request.
It excludes html elements in /beta page POST, and vice versa
| section |