ESPHome  2022.9.1
Public Member Functions | Protected Member Functions
esphome::api::APIServerConnection Class Referenceabstract

#include <api_pb2_service.h>

Inheritance diagram for esphome::api::APIServerConnection:
esphome::api::APIServerConnectionBase esphome::api::ProtoService esphome::api::APIConnection

Public Member Functions

virtual HelloResponse hello (const HelloRequest &msg)=0
 
virtual ConnectResponse connect (const ConnectRequest &msg)=0
 
virtual DisconnectResponse disconnect (const DisconnectRequest &msg)=0
 
virtual PingResponse ping (const PingRequest &msg)=0
 
virtual DeviceInfoResponse device_info (const DeviceInfoRequest &msg)=0
 
virtual void list_entities (const ListEntitiesRequest &msg)=0
 
virtual void subscribe_states (const SubscribeStatesRequest &msg)=0
 
virtual void subscribe_logs (const SubscribeLogsRequest &msg)=0
 
virtual void subscribe_homeassistant_services (const SubscribeHomeassistantServicesRequest &msg)=0
 
virtual void subscribe_home_assistant_states (const SubscribeHomeAssistantStatesRequest &msg)=0
 
virtual void subscribe_bluetooth_le_advertisements (const SubscribeBluetoothLEAdvertisementsRequest &msg)=0
 
virtual GetTimeResponse get_time (const GetTimeRequest &msg)=0
 
virtual void execute_service (const ExecuteServiceRequest &msg)=0
 
virtual void cover_command (const CoverCommandRequest &msg)=0
 
virtual void fan_command (const FanCommandRequest &msg)=0
 
virtual void light_command (const LightCommandRequest &msg)=0
 
virtual void switch_command (const SwitchCommandRequest &msg)=0
 
virtual void camera_image (const CameraImageRequest &msg)=0
 
virtual void climate_command (const ClimateCommandRequest &msg)=0
 
virtual void number_command (const NumberCommandRequest &msg)=0
 
virtual void select_command (const SelectCommandRequest &msg)=0
 
virtual void button_command (const ButtonCommandRequest &msg)=0
 
virtual void lock_command (const LockCommandRequest &msg)=0
 
virtual void media_player_command (const MediaPlayerCommandRequest &msg)=0
 
- Public Member Functions inherited from esphome::api::APIServerConnectionBase
bool send_hello_response (const HelloResponse &msg)
 
bool send_connect_response (const ConnectResponse &msg)
 
bool send_disconnect_request (const DisconnectRequest &msg)
 
bool send_disconnect_response (const DisconnectResponse &msg)
 
virtual void on_disconnect_response (const DisconnectResponse &value)
 
bool send_ping_request (const PingRequest &msg)
 
bool send_ping_response (const PingResponse &msg)
 
virtual void on_ping_response (const PingResponse &value)
 
bool send_device_info_response (const DeviceInfoResponse &msg)
 
bool send_list_entities_done_response (const ListEntitiesDoneResponse &msg)
 
bool send_list_entities_binary_sensor_response (const ListEntitiesBinarySensorResponse &msg)
 
bool send_binary_sensor_state_response (const BinarySensorStateResponse &msg)
 
bool send_list_entities_cover_response (const ListEntitiesCoverResponse &msg)
 
bool send_cover_state_response (const CoverStateResponse &msg)
 
bool send_list_entities_fan_response (const ListEntitiesFanResponse &msg)
 
bool send_fan_state_response (const FanStateResponse &msg)
 
bool send_list_entities_light_response (const ListEntitiesLightResponse &msg)
 
bool send_light_state_response (const LightStateResponse &msg)
 
bool send_list_entities_sensor_response (const ListEntitiesSensorResponse &msg)
 
bool send_sensor_state_response (const SensorStateResponse &msg)
 
bool send_list_entities_switch_response (const ListEntitiesSwitchResponse &msg)
 
bool send_switch_state_response (const SwitchStateResponse &msg)
 
bool send_list_entities_text_sensor_response (const ListEntitiesTextSensorResponse &msg)
 
bool send_text_sensor_state_response (const TextSensorStateResponse &msg)
 
bool send_subscribe_logs_response (const SubscribeLogsResponse &msg)
 
bool send_homeassistant_service_response (const HomeassistantServiceResponse &msg)
 
bool send_subscribe_home_assistant_state_response (const SubscribeHomeAssistantStateResponse &msg)
 
virtual void on_home_assistant_state_response (const HomeAssistantStateResponse &value)
 
bool send_get_time_request (const GetTimeRequest &msg)
 
bool send_get_time_response (const GetTimeResponse &msg)
 
virtual void on_get_time_response (const GetTimeResponse &value)
 
bool send_list_entities_services_response (const ListEntitiesServicesResponse &msg)
 
bool send_list_entities_camera_response (const ListEntitiesCameraResponse &msg)
 
bool send_camera_image_response (const CameraImageResponse &msg)
 
bool send_list_entities_climate_response (const ListEntitiesClimateResponse &msg)
 
bool send_climate_state_response (const ClimateStateResponse &msg)
 
bool send_list_entities_number_response (const ListEntitiesNumberResponse &msg)
 
bool send_number_state_response (const NumberStateResponse &msg)
 
bool send_list_entities_select_response (const ListEntitiesSelectResponse &msg)
 
bool send_select_state_response (const SelectStateResponse &msg)
 
bool send_list_entities_lock_response (const ListEntitiesLockResponse &msg)
 
bool send_lock_state_response (const LockStateResponse &msg)
 
bool send_list_entities_button_response (const ListEntitiesButtonResponse &msg)
 
bool send_list_entities_media_player_response (const ListEntitiesMediaPlayerResponse &msg)
 
bool send_media_player_state_response (const MediaPlayerStateResponse &msg)
 
bool send_bluetooth_le_advertisement_response (const BluetoothLEAdvertisementResponse &msg)
 

Protected Member Functions

void on_hello_request (const HelloRequest &msg) override
 
void on_connect_request (const ConnectRequest &msg) override
 
void on_disconnect_request (const DisconnectRequest &msg) override
 
void on_ping_request (const PingRequest &msg) override
 
void on_device_info_request (const DeviceInfoRequest &msg) override
 
void on_list_entities_request (const ListEntitiesRequest &msg) override
 
void on_subscribe_states_request (const SubscribeStatesRequest &msg) override
 
void on_subscribe_logs_request (const SubscribeLogsRequest &msg) override
 
void on_subscribe_homeassistant_services_request (const SubscribeHomeassistantServicesRequest &msg) override
 
void on_subscribe_home_assistant_states_request (const SubscribeHomeAssistantStatesRequest &msg) override
 
void on_subscribe_bluetooth_le_advertisements_request (const SubscribeBluetoothLEAdvertisementsRequest &msg) override
 
void on_get_time_request (const GetTimeRequest &msg) override
 
void on_execute_service_request (const ExecuteServiceRequest &msg) override
 
void on_cover_command_request (const CoverCommandRequest &msg) override
 
void on_fan_command_request (const FanCommandRequest &msg) override
 
void on_light_command_request (const LightCommandRequest &msg) override
 
void on_switch_command_request (const SwitchCommandRequest &msg) override
 
void on_camera_image_request (const CameraImageRequest &msg) override
 
void on_climate_command_request (const ClimateCommandRequest &msg) override
 
void on_number_command_request (const NumberCommandRequest &msg) override
 
void on_select_command_request (const SelectCommandRequest &msg) override
 
void on_button_command_request (const ButtonCommandRequest &msg) override
 
void on_lock_command_request (const LockCommandRequest &msg) override
 
void on_media_player_command_request (const MediaPlayerCommandRequest &msg) override
 
- Protected Member Functions inherited from esphome::api::APIServerConnectionBase
bool read_message (uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) override
 
- Protected Member Functions inherited from esphome::api::ProtoService
virtual bool is_authenticated ()=0
 
virtual bool is_connection_setup ()=0
 
virtual void on_fatal_error ()=0
 
virtual void on_unauthenticated_access ()=0
 
virtual void on_no_setup_connection ()=0
 
virtual ProtoWriteBuffer create_buffer ()=0
 
virtual bool send_buffer (ProtoWriteBuffer buffer, uint32_t message_type)=0
 
template<class C >
bool send_message_ (const C &msg, uint32_t message_type)
 

Detailed Description

Definition at line 166 of file api_pb2_service.h.

Member Function Documentation

◆ button_command()

virtual void esphome::api::APIServerConnection::button_command ( const ButtonCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ camera_image()

virtual void esphome::api::APIServerConnection::camera_image ( const CameraImageRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ climate_command()

virtual void esphome::api::APIServerConnection::climate_command ( const ClimateCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ connect()

virtual ConnectResponse esphome::api::APIServerConnection::connect ( const ConnectRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ cover_command()

virtual void esphome::api::APIServerConnection::cover_command ( const CoverCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ device_info()

virtual DeviceInfoResponse esphome::api::APIServerConnection::device_info ( const DeviceInfoRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ disconnect()

virtual DisconnectResponse esphome::api::APIServerConnection::disconnect ( const DisconnectRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ execute_service()

virtual void esphome::api::APIServerConnection::execute_service ( const ExecuteServiceRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ fan_command()

virtual void esphome::api::APIServerConnection::fan_command ( const FanCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ get_time()

virtual GetTimeResponse esphome::api::APIServerConnection::get_time ( const GetTimeRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ hello()

virtual HelloResponse esphome::api::APIServerConnection::hello ( const HelloRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ light_command()

virtual void esphome::api::APIServerConnection::light_command ( const LightCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ list_entities()

virtual void esphome::api::APIServerConnection::list_entities ( const ListEntitiesRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ lock_command()

virtual void esphome::api::APIServerConnection::lock_command ( const LockCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ media_player_command()

virtual void esphome::api::APIServerConnection::media_player_command ( const MediaPlayerCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ number_command()

virtual void esphome::api::APIServerConnection::number_command ( const NumberCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ on_button_command_request()

void esphome::api::APIServerConnection::on_button_command_request ( const ButtonCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 849 of file api_pb2_service.cpp.

◆ on_camera_image_request()

void esphome::api::APIServerConnection::on_camera_image_request ( const CameraImageRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 797 of file api_pb2_service.cpp.

◆ on_climate_command_request()

void esphome::api::APIServerConnection::on_climate_command_request ( const ClimateCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 810 of file api_pb2_service.cpp.

◆ on_connect_request()

void esphome::api::APIServerConnection::on_connect_request ( const ConnectRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 627 of file api_pb2_service.cpp.

◆ on_cover_command_request()

void esphome::api::APIServerConnection::on_cover_command_request ( const CoverCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 745 of file api_pb2_service.cpp.

◆ on_device_info_request()

void esphome::api::APIServerConnection::on_device_info_request ( const DeviceInfoRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 645 of file api_pb2_service.cpp.

◆ on_disconnect_request()

void esphome::api::APIServerConnection::on_disconnect_request ( const DisconnectRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 633 of file api_pb2_service.cpp.

◆ on_execute_service_request()

void esphome::api::APIServerConnection::on_execute_service_request ( const ExecuteServiceRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 733 of file api_pb2_service.cpp.

◆ on_fan_command_request()

void esphome::api::APIServerConnection::on_fan_command_request ( const FanCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 758 of file api_pb2_service.cpp.

◆ on_get_time_request()

void esphome::api::APIServerConnection::on_get_time_request ( const GetTimeRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 723 of file api_pb2_service.cpp.

◆ on_hello_request()

void esphome::api::APIServerConnection::on_hello_request ( const HelloRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 621 of file api_pb2_service.cpp.

◆ on_light_command_request()

void esphome::api::APIServerConnection::on_light_command_request ( const LightCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 771 of file api_pb2_service.cpp.

◆ on_list_entities_request()

void esphome::api::APIServerConnection::on_list_entities_request ( const ListEntitiesRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 655 of file api_pb2_service.cpp.

◆ on_lock_command_request()

void esphome::api::APIServerConnection::on_lock_command_request ( const LockCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 862 of file api_pb2_service.cpp.

◆ on_media_player_command_request()

void esphome::api::APIServerConnection::on_media_player_command_request ( const MediaPlayerCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 875 of file api_pb2_service.cpp.

◆ on_number_command_request()

void esphome::api::APIServerConnection::on_number_command_request ( const NumberCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 823 of file api_pb2_service.cpp.

◆ on_ping_request()

void esphome::api::APIServerConnection::on_ping_request ( const PingRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 639 of file api_pb2_service.cpp.

◆ on_select_command_request()

void esphome::api::APIServerConnection::on_select_command_request ( const SelectCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 836 of file api_pb2_service.cpp.

◆ on_subscribe_bluetooth_le_advertisements_request()

void esphome::api::APIServerConnection::on_subscribe_bluetooth_le_advertisements_request ( const SubscribeBluetoothLEAdvertisementsRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 711 of file api_pb2_service.cpp.

◆ on_subscribe_home_assistant_states_request()

void esphome::api::APIServerConnection::on_subscribe_home_assistant_states_request ( const SubscribeHomeAssistantStatesRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 700 of file api_pb2_service.cpp.

◆ on_subscribe_homeassistant_services_request()

void esphome::api::APIServerConnection::on_subscribe_homeassistant_services_request ( const SubscribeHomeassistantServicesRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 688 of file api_pb2_service.cpp.

◆ on_subscribe_logs_request()

void esphome::api::APIServerConnection::on_subscribe_logs_request ( const SubscribeLogsRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 677 of file api_pb2_service.cpp.

◆ on_subscribe_states_request()

void esphome::api::APIServerConnection::on_subscribe_states_request ( const SubscribeStatesRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 666 of file api_pb2_service.cpp.

◆ on_switch_command_request()

void esphome::api::APIServerConnection::on_switch_command_request ( const SwitchCommandRequest msg)
overrideprotectedvirtual

Reimplemented from esphome::api::APIServerConnectionBase.

Definition at line 784 of file api_pb2_service.cpp.

◆ ping()

virtual PingResponse esphome::api::APIServerConnection::ping ( const PingRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ select_command()

virtual void esphome::api::APIServerConnection::select_command ( const SelectCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ subscribe_bluetooth_le_advertisements()

virtual void esphome::api::APIServerConnection::subscribe_bluetooth_le_advertisements ( const SubscribeBluetoothLEAdvertisementsRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ subscribe_home_assistant_states()

virtual void esphome::api::APIServerConnection::subscribe_home_assistant_states ( const SubscribeHomeAssistantStatesRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ subscribe_homeassistant_services()

virtual void esphome::api::APIServerConnection::subscribe_homeassistant_services ( const SubscribeHomeassistantServicesRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ subscribe_logs()

virtual void esphome::api::APIServerConnection::subscribe_logs ( const SubscribeLogsRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ subscribe_states()

virtual void esphome::api::APIServerConnection::subscribe_states ( const SubscribeStatesRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.

◆ switch_command()

virtual void esphome::api::APIServerConnection::switch_command ( const SwitchCommandRequest msg)
pure virtual

Implemented in esphome::api::APIConnection.


The documentation for this class was generated from the following files: