13#ifdef USE_API_USER_DEFINED_ACTIONS
15class UserServiceDescriptor;
24#ifdef USE_RADIO_FREQUENCY
25namespace radio_frequency {
32 void begin(
bool include_internal =
false);
38 while (steps < max_steps && !this->
completed()) {
48 ESPDEPRECATED(
"Use try_advance() instead. Removed in 2027.3.0",
"2026.8.1")
54#define ENTITY_TYPE_(type, singular, plural, count, upper) virtual bool on_##singular(type *obj) = 0;
55#define ENTITY_CONTROLLER_TYPE_(type, singular, plural, count, upper, callback) \
56 ENTITY_TYPE_(type, singular, plural, count, upper)
59#undef ENTITY_CONTROLLER_TYPE_
62#ifdef USE_API_USER_DEFINED_ACTIONS
78#define ENTITY_TYPE_(type, singular, plural, count, upper) upper,
79#define ENTITY_CONTROLLER_TYPE_(type, singular, plural, count, upper, callback) upper,
82#undef ENTITY_CONTROLLER_TYPE_
84#ifdef USE_API_USER_DEFINED_ACTIONS
101 template<
typename Container>
104 if (this->
at_ >= items.size()) {
108 typename Container::value_type item = items[this->
at_];
109 if ((item->is_internal() && !this->include_internal_) || (this->*on_item)(item)) {
bool advance_step_()
One iteration step; false if no progress was made (callback refused or iterator not running).
void begin(bool include_internal=false)
ESPHOME_ALWAYS_INLINE void try_advance(size_t max_steps)
Run up to max_steps iteration steps; stops early when iteration completes or a callback refuses (that...
virtual bool on_service(api::UserServiceDescriptor *service)
void yield_after_step_()
End the current try_advance() pass after this step; lets callbacks that write directly to the socket ...
virtual bool on_camera(camera::Camera *camera)
ESPDEPRECATED("Use try_advance() instead. Removed in 2027.3.0", "2026.8.1") void advance()
bool process_platform_item_(const Container &items, bool(ComponentIterator::*on_item)(typename Container::value_type))
Abstract camera base class.