ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
improv_base
improv_base.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstddef>
4
#include "
esphome/core/defines.h
"
5
6
#ifdef USE_IMPROV_NEXT_URL
7
#include <improv.h>
8
#endif
9
10
namespace
esphome::improv_base
{
11
12
class
ImprovBase
{
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
esphome::improv_base::ImprovBase
Definition
improv_base.h:12
esphome::improv_base::ImprovBase::set_next_url
void set_next_url(const char *next_url)
Definition
improv_base.h:15
esphome::improv_base::ImprovBase::get_formatted_next_url_
size_t get_formatted_next_url_(char *buffer, size_t buffer_size)
Format next_url_ into buffer, replacing placeholders. Returns length written.
Definition
improv_base.cpp:30
esphome::improv_base::ImprovBase::next_url_
const char * next_url_
Definition
improv_base.h:24
esphome::improv_base::ImprovBase::add_next_url_
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.
Definition
improv_base.cpp:69
defines.h
buffer
uint32_t buffer
Definition
gif.cpp:50
esphome::improv_base
Definition
improv_base.cpp:9
Generated by
1.12.0