ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
improv_base.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
5
6#ifdef USE_IMPROV_NEXT_URL
7#include <improv.h>
8#endif
9
10namespace esphome::improv_base {
11
13 public:
14#ifdef USE_IMPROV_NEXT_URL
15 void set_next_url(const char *next_url) { this->next_url_ = next_url; }
16#endif
17
18 protected:
19#ifdef USE_IMPROV_NEXT_URL
21 size_t get_formatted_next_url_(char *buffer, size_t buffer_size);
23 void add_next_url_(improv::RpcResponseBuilder &builder, size_t max_len);
24 const char *next_url_{nullptr};
25#endif
26};
27
28} // namespace esphome::improv_base
void set_next_url(const char *next_url)
Definition improv_base.h:15
size_t get_formatted_next_url_(char *buffer, size_t buffer_size)
Format next_url_ into buffer, replacing placeholders. Returns length written.
void add_next_url_(improv::RpcResponseBuilder &builder, size_t max_len)
Append the formatted next_url to the RPC response, warning if it does not fit.
uint32_t buffer
Definition gif.cpp:50