ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::web_server_idf Namespace Reference

Data Structures

class  AsyncEventSource
 
class  AsyncEventSourceResponse
 
class  AsyncResponseStream
 
class  AsyncWebHandler
 
class  AsyncWebParameter
 
class  AsyncWebServer
 
class  AsyncWebServerRequest
 
class  AsyncWebServerResponse
 
class  AsyncWebServerResponseContent
 
class  AsyncWebServerResponseEmpty
 
class  AsyncWebServerResponseProgmem
 
class  DefaultHeaders
 
struct  DeferredEvent
 
struct  HttpHeader
 
class  MultipartReader
 

Typedefs

using ChunkPieceSink = void (*)(void *ctx, const char *piece, size_t len)
 
using message_generator_t = void(esphome::web_server::WebServer *, void *, json::JsonBuilder &)
 
using AsyncEventSourceClient = AsyncEventSourceResponse
 

Functions

 ESPHOME_LOG_TAG (TAG, "multipart")
 
bool str_startswith_case_insensitive (const char *str, size_t str_len, const char *prefix)
 
void extract_header_param (const char *header, size_t header_len, const char *param, std::string &out)
 
bool parse_multipart_boundary (const char *content_type, const char **boundary_start, size_t *boundary_len)
 
void str_trim (const char *str, size_t len, std::string &out)
 
void for_each_chunk_piece (const char *message, size_t message_len, ChunkPieceSink sink, void *ctx)
 
size_t build_chunk_prefix (char *buf, size_t size, const char *event, uint32_t id, uint32_t reconnect, bool with_data)
 
void write_chunk_header (char *buf, size_t chunk_len)
 
size_t url_decode (char *str)
 Decode URL-encoded string in-place (e.g., %20 -> space, + -> space) Returns the new length of the decoded string.
 
bool request_has_header (httpd_req_t *req, const char *name)
 
optional< std::string > request_get_header (httpd_req_t *req, const char *name)
 
optional< std::string > query_key_value (const char *query_url, size_t query_len, const char *key)
 
bool query_has_key (const char *query_url, size_t query_len, const char *key)
 
bool str_ncmp_ci (const char *s1, const char *s2, size_t n)
 
const char * strcasestr_n (const char *haystack, size_t haystack_len, const char *needle)
 
bool char_equals_ci (char a, char b)
 
 ESPHOME_LOG_TAG (TAG, "web_server_idf")
 

Variables

constexpr size_t CHUNK_HDR_LEN = 10
 
constexpr char CHUNK_END [] = "\r\n"
 
constexpr size_t CHUNK_END_LEN = sizeof(CHUNK_END) - 1
 
constexpr char SSE_SEP [] = "\r\ndata: "
 
constexpr size_t SSE_SEP_LEN = sizeof(SSE_SEP) - 1
 
constexpr char SSE_SUFFIX [] = "\r\n\r\n\r\n"
 
constexpr size_t SSE_SUFFIX_LEN = sizeof(SSE_SUFFIX) - 1
 

Typedef Documentation

◆ AsyncEventSourceClient

◆ ChunkPieceSink

using esphome::web_server_idf::ChunkPieceSink = void (*)(void *ctx, const char *piece, size_t len)

Definition at line 26 of file sse_chunk.h.

◆ message_generator_t

Function Documentation

◆ build_chunk_prefix()

size_t esphome::web_server_idf::build_chunk_prefix ( char * buf,
size_t size,
const char * event,
uint32_t id,
uint32_t reconnect,
bool with_data )

Definition at line 38 of file sse_chunk.cpp.

◆ char_equals_ci()

bool esphome::web_server_idf::char_equals_ci ( char a,
char b )
inline

Definition at line 20 of file utils.h.

◆ ESPHOME_LOG_TAG() [1/2]

esphome::web_server_idf::ESPHOME_LOG_TAG ( TAG ,
"multipart"  )

◆ ESPHOME_LOG_TAG() [2/2]

esphome::web_server_idf::ESPHOME_LOG_TAG ( TAG ,
"web_server_idf"  )

◆ extract_header_param()

void esphome::web_server_idf::extract_header_param ( const char * header,
size_t header_len,
const char * param,
std::string & out )

Definition at line 122 of file multipart.cpp.

◆ for_each_chunk_piece()

void esphome::web_server_idf::for_each_chunk_piece ( const char * message,
size_t message_len,
ChunkPieceSink sink,
void * ctx )

Definition at line 10 of file sse_chunk.cpp.

◆ parse_multipart_boundary()

bool esphome::web_server_idf::parse_multipart_boundary ( const char * content_type,
const char ** boundary_start,
size_t * boundary_len )

Definition at line 195 of file multipart.cpp.

◆ query_has_key()

bool esphome::web_server_idf::query_has_key ( const char * query_url,
size_t query_len,
const char * key )

Definition at line 70 of file utils.cpp.

◆ query_key_value()

optional< std::string > esphome::web_server_idf::query_key_value ( const char * query_url,
size_t query_len,
const char * key )

Definition at line 53 of file utils.cpp.

◆ request_get_header()

optional< std::string > esphome::web_server_idf::request_get_header ( httpd_req_t * req,
const char * name )

Definition at line 36 of file utils.cpp.

◆ request_has_header()

bool esphome::web_server_idf::request_has_header ( httpd_req_t * req,
const char * name )

Definition at line 34 of file utils.cpp.

◆ str_ncmp_ci()

bool esphome::web_server_idf::str_ncmp_ci ( const char * s1,
const char * s2,
size_t n )

Definition at line 83 of file utils.cpp.

◆ str_startswith_case_insensitive()

bool esphome::web_server_idf::str_startswith_case_insensitive ( const char * str,
size_t str_len,
const char * prefix )

Definition at line 111 of file multipart.cpp.

◆ str_trim()

void esphome::web_server_idf::str_trim ( const char * str,
size_t len,
std::string & out )

Definition at line 252 of file multipart.cpp.

◆ strcasestr_n()

const char * esphome::web_server_idf::strcasestr_n ( const char * haystack,
size_t haystack_len,
const char * needle )

Definition at line 93 of file utils.cpp.

◆ url_decode()

size_t esphome::web_server_idf::url_decode ( char * str)

Decode URL-encoded string in-place (e.g., %20 -> space, + -> space) Returns the new length of the decoded string.

Definition at line 11 of file utils.cpp.

◆ write_chunk_header()

void esphome::web_server_idf::write_chunk_header ( char * buf,
size_t chunk_len )

Definition at line 57 of file sse_chunk.cpp.

Variable Documentation

◆ CHUNK_END

char esphome::web_server_idf::CHUNK_END[] = "\r\n"
constexpr

Definition at line 16 of file sse_chunk.h.

◆ CHUNK_END_LEN

size_t esphome::web_server_idf::CHUNK_END_LEN = sizeof(CHUNK_END) - 1
constexpr

Definition at line 17 of file sse_chunk.h.

◆ CHUNK_HDR_LEN

size_t esphome::web_server_idf::CHUNK_HDR_LEN = 10
constexpr

Definition at line 14 of file sse_chunk.h.

◆ SSE_SEP

char esphome::web_server_idf::SSE_SEP[] = "\r\ndata: "
constexpr

Definition at line 19 of file sse_chunk.h.

◆ SSE_SEP_LEN

size_t esphome::web_server_idf::SSE_SEP_LEN = sizeof(SSE_SEP) - 1
constexpr

Definition at line 20 of file sse_chunk.h.

◆ SSE_SUFFIX

char esphome::web_server_idf::SSE_SUFFIX[] = "\r\n\r\n\r\n"
constexpr

Definition at line 22 of file sse_chunk.h.

◆ SSE_SUFFIX_LEN

size_t esphome::web_server_idf::SSE_SUFFIX_LEN = sizeof(SSE_SUFFIX) - 1
constexpr

Definition at line 23 of file sse_chunk.h.