|
| APIConnection (std::unique_ptr< socket::Socket > socket, APIServer *parent) |
|
virtual | ~APIConnection () |
|
void | start () |
|
void | loop () |
|
bool | send_list_info_done () |
|
bool | send_binary_sensor_state (binary_sensor::BinarySensor *binary_sensor) |
|
bool | send_cover_state (cover::Cover *cover) |
|
void | cover_command (const CoverCommandRequest &msg) override |
|
bool | send_fan_state (fan::Fan *fan) |
|
void | fan_command (const FanCommandRequest &msg) override |
|
bool | send_light_state (light::LightState *light) |
|
void | light_command (const LightCommandRequest &msg) override |
|
bool | send_sensor_state (sensor::Sensor *sensor) |
|
bool | send_switch_state (switch_::Switch *a_switch) |
|
void | switch_command (const SwitchCommandRequest &msg) override |
|
bool | send_text_sensor_state (text_sensor::TextSensor *text_sensor) |
|
void | set_camera_state (std::shared_ptr< camera::CameraImage > image) |
|
void | camera_image (const CameraImageRequest &msg) override |
|
bool | send_climate_state (climate::Climate *climate) |
|
void | climate_command (const ClimateCommandRequest &msg) override |
|
bool | send_number_state (number::Number *number) |
|
void | number_command (const NumberCommandRequest &msg) override |
|
bool | send_date_state (datetime::DateEntity *date) |
|
void | date_command (const DateCommandRequest &msg) override |
|
bool | send_time_state (datetime::TimeEntity *time) |
|
void | time_command (const TimeCommandRequest &msg) override |
|
bool | send_datetime_state (datetime::DateTimeEntity *datetime) |
|
void | datetime_command (const DateTimeCommandRequest &msg) override |
|
bool | send_text_state (text::Text *text) |
|
void | text_command (const TextCommandRequest &msg) override |
|
bool | send_select_state (select::Select *select) |
|
void | select_command (const SelectCommandRequest &msg) override |
|
void | button_command (const ButtonCommandRequest &msg) override |
|
bool | send_lock_state (lock::Lock *a_lock) |
|
void | lock_command (const LockCommandRequest &msg) override |
|
bool | send_valve_state (valve::Valve *valve) |
|
void | valve_command (const ValveCommandRequest &msg) override |
|
bool | send_media_player_state (media_player::MediaPlayer *media_player) |
|
void | media_player_command (const MediaPlayerCommandRequest &msg) override |
|
bool | try_send_log_message (int level, const char *tag, const char *line, size_t message_len) |
|
void | send_homeassistant_action (const HomeassistantActionRequest &call) |
|
void | subscribe_bluetooth_le_advertisements (const SubscribeBluetoothLEAdvertisementsRequest &msg) override |
|
void | unsubscribe_bluetooth_le_advertisements (const UnsubscribeBluetoothLEAdvertisementsRequest &msg) override |
|
void | bluetooth_device_request (const BluetoothDeviceRequest &msg) override |
|
void | bluetooth_gatt_read (const BluetoothGATTReadRequest &msg) override |
|
void | bluetooth_gatt_write (const BluetoothGATTWriteRequest &msg) override |
|
void | bluetooth_gatt_read_descriptor (const BluetoothGATTReadDescriptorRequest &msg) override |
|
void | bluetooth_gatt_write_descriptor (const BluetoothGATTWriteDescriptorRequest &msg) override |
|
void | bluetooth_gatt_get_services (const BluetoothGATTGetServicesRequest &msg) override |
|
void | bluetooth_gatt_notify (const BluetoothGATTNotifyRequest &msg) override |
|
bool | send_subscribe_bluetooth_connections_free_response (const SubscribeBluetoothConnectionsFreeRequest &msg) override |
|
void | bluetooth_scanner_set_mode (const BluetoothScannerSetModeRequest &msg) override |
|
void | send_time_request () |
|
void | subscribe_voice_assistant (const SubscribeVoiceAssistantRequest &msg) override |
|
void | on_voice_assistant_response (const VoiceAssistantResponse &msg) override |
|
void | on_voice_assistant_event_response (const VoiceAssistantEventResponse &msg) override |
|
void | on_voice_assistant_audio (const VoiceAssistantAudio &msg) override |
|
void | on_voice_assistant_timer_event_response (const VoiceAssistantTimerEventResponse &msg) override |
|
void | on_voice_assistant_announce_request (const VoiceAssistantAnnounceRequest &msg) override |
|
bool | send_voice_assistant_get_configuration_response (const VoiceAssistantConfigurationRequest &msg) override |
|
void | voice_assistant_set_configuration (const VoiceAssistantSetConfiguration &msg) override |
|
void | zwave_proxy_frame (const ZWaveProxyFrame &msg) override |
|
void | zwave_proxy_request (const ZWaveProxyRequest &msg) override |
|
bool | send_alarm_control_panel_state (alarm_control_panel::AlarmControlPanel *a_alarm_control_panel) |
|
void | alarm_control_panel_command (const AlarmControlPanelCommandRequest &msg) override |
|
void | send_event (event::Event *event, const std::string &event_type) |
|
bool | send_update_state (update::UpdateEntity *update) |
|
void | update_command (const UpdateCommandRequest &msg) override |
|
void | on_disconnect_response (const DisconnectResponse &value) override |
|
void | on_ping_response (const PingResponse &value) override |
|
void | on_home_assistant_state_response (const HomeAssistantStateResponse &msg) override |
|
void | on_get_time_response (const GetTimeResponse &value) override |
|
bool | send_hello_response (const HelloRequest &msg) override |
|
bool | send_authenticate_response (const AuthenticationRequest &msg) override |
|
bool | send_disconnect_response (const DisconnectRequest &msg) override |
|
bool | send_ping_response (const PingRequest &msg) override |
|
bool | send_device_info_response (const DeviceInfoRequest &msg) override |
|
void | list_entities (const ListEntitiesRequest &msg) override |
|
void | subscribe_states (const SubscribeStatesRequest &msg) override |
|
void | subscribe_logs (const SubscribeLogsRequest &msg) override |
|
void | subscribe_homeassistant_services (const SubscribeHomeassistantServicesRequest &msg) override |
|
void | subscribe_home_assistant_states (const SubscribeHomeAssistantStatesRequest &msg) override |
|
void | execute_service (const ExecuteServiceRequest &msg) override |
|
bool | send_noise_encryption_set_key_response (const NoiseEncryptionSetKeyRequest &msg) override |
|
bool | is_authenticated () override |
|
bool | is_connection_setup () override |
|
uint8_t | get_log_subscription_level () const |
|
bool | client_supports_api_version (uint16_t major, uint16_t minor) const |
|
void | on_fatal_error () override |
|
void | on_unauthenticated_access () override |
|
void | on_no_setup_connection () override |
|
ProtoWriteBuffer | create_buffer (uint32_t reserve_size) override |
|
void | prepare_first_message_buffer (std::vector< uint8_t > &shared_buf, size_t header_padding, size_t total_size) |
|
bool | try_to_clear_buffer (bool log_out_of_space) |
|
bool | send_buffer (ProtoWriteBuffer buffer, uint8_t message_type) override |
|
std::string | get_client_combined_info () const |
|
virtual void | siren_command (const SirenCommandRequest &msg)=0 |
|
bool | send_message (const ProtoMessage &msg, uint8_t message_type) |
|
|
void | complete_authentication_ () |
|
void | process_state_subscriptions_ () |
|
bool | check_voice_assistant_api_connection_ () const |
|
template<typename Iterator > |
void | process_iterator_batch_ (Iterator &iterator) |
|
uint32_t | get_batch_delay_ms_ () const |
|
bool | schedule_batch_ () |
|
void | process_batch_ () |
|
void | clear_batch_ () |
|
void | log_proto_message_ (EntityBase *entity, const MessageCreator &creator, uint8_t message_type) |
|
void | log_batch_item_ (const DeferredBatch::BatchItem &item) |
|
bool | send_message_smart_ (EntityBase *entity, MessageCreatorPtr creator, uint8_t message_type, uint8_t estimated_size) |
|
bool | schedule_message_ (EntityBase *entity, MessageCreator creator, uint8_t message_type, uint8_t estimated_size) |
|
bool | schedule_message_ (EntityBase *entity, MessageCreatorPtr function_ptr, uint8_t message_type, uint8_t estimated_size) |
|
bool | schedule_message_front_ (EntityBase *entity, MessageCreatorPtr function_ptr, uint8_t message_type, uint8_t estimated_size) |
|
void | log_warning_ (const LogString *message, APIError err) |
|
void | log_socket_operation_failed_ (APIError err) |
|
void | on_hello_request (const HelloRequest &msg) override |
|
void | on_authentication_request (const AuthenticationRequest &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_execute_service_request (const ExecuteServiceRequest &msg) override |
|
void | on_noise_encryption_set_key_request (const NoiseEncryptionSetKeyRequest &msg) override |
|
void | on_button_command_request (const ButtonCommandRequest &msg) override |
|
void | on_camera_image_request (const CameraImageRequest &msg) override |
|
void | on_climate_command_request (const ClimateCommandRequest &msg) override |
|
void | on_cover_command_request (const CoverCommandRequest &msg) override |
|
void | on_date_command_request (const DateCommandRequest &msg) override |
|
void | on_date_time_command_request (const DateTimeCommandRequest &msg) override |
|
void | on_fan_command_request (const FanCommandRequest &msg) override |
|
void | on_light_command_request (const LightCommandRequest &msg) override |
|
void | on_lock_command_request (const LockCommandRequest &msg) override |
|
void | on_media_player_command_request (const MediaPlayerCommandRequest &msg) override |
|
void | on_number_command_request (const NumberCommandRequest &msg) override |
|
void | on_select_command_request (const SelectCommandRequest &msg) override |
|
void | on_siren_command_request (const SirenCommandRequest &msg) override |
|
void | on_switch_command_request (const SwitchCommandRequest &msg) override |
|
void | on_text_command_request (const TextCommandRequest &msg) override |
|
void | on_time_command_request (const TimeCommandRequest &msg) override |
|
void | on_update_command_request (const UpdateCommandRequest &msg) override |
|
void | on_valve_command_request (const ValveCommandRequest &msg) override |
|
void | on_subscribe_bluetooth_le_advertisements_request (const SubscribeBluetoothLEAdvertisementsRequest &msg) override |
|
void | on_bluetooth_device_request (const BluetoothDeviceRequest &msg) override |
|
void | on_bluetooth_gatt_get_services_request (const BluetoothGATTGetServicesRequest &msg) override |
|
void | on_bluetooth_gatt_read_request (const BluetoothGATTReadRequest &msg) override |
|
void | on_bluetooth_gatt_write_request (const BluetoothGATTWriteRequest &msg) override |
|
void | on_bluetooth_gatt_read_descriptor_request (const BluetoothGATTReadDescriptorRequest &msg) override |
|
void | on_bluetooth_gatt_write_descriptor_request (const BluetoothGATTWriteDescriptorRequest &msg) override |
|
void | on_bluetooth_gatt_notify_request (const BluetoothGATTNotifyRequest &msg) override |
|
void | on_subscribe_bluetooth_connections_free_request (const SubscribeBluetoothConnectionsFreeRequest &msg) override |
|
void | on_unsubscribe_bluetooth_le_advertisements_request (const UnsubscribeBluetoothLEAdvertisementsRequest &msg) override |
|
void | on_bluetooth_scanner_set_mode_request (const BluetoothScannerSetModeRequest &msg) override |
|
void | on_subscribe_voice_assistant_request (const SubscribeVoiceAssistantRequest &msg) override |
|
void | on_voice_assistant_configuration_request (const VoiceAssistantConfigurationRequest &msg) override |
|
void | on_voice_assistant_set_configuration (const VoiceAssistantSetConfiguration &msg) override |
|
void | on_alarm_control_panel_command_request (const AlarmControlPanelCommandRequest &msg) override |
|
void | on_z_wave_proxy_frame (const ZWaveProxyFrame &msg) override |
|
void | on_z_wave_proxy_request (const ZWaveProxyRequest &msg) override |
|
void | read_message (uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) override |
|
void | log_send_message_ (const char *name, const std::string &dump) |
|
void | read_message (uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) override |
|
bool | send_message_ (const ProtoMessage &msg, uint8_t message_type) |
|
bool | check_connection_setup_ () |
|
bool | check_authenticated_ () |
|
|
static uint16_t | encode_message_to_buffer (ProtoMessage &msg, uint8_t message_type, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | fill_and_encode_entity_state (EntityBase *entity, StateResponseProtoMessage &msg, uint8_t message_type, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | fill_and_encode_entity_info (EntityBase *entity, InfoResponseProtoMessage &msg, uint8_t message_type, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_binary_sensor_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_binary_sensor_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_cover_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_cover_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_fan_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_fan_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_light_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_light_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_sensor_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_sensor_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_switch_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_switch_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_text_sensor_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_text_sensor_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_climate_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_climate_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_number_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_number_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_date_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_date_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_time_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_time_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_datetime_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_datetime_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_text_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_text_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_select_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_select_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_button_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_lock_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_lock_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_valve_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_valve_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_media_player_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_media_player_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_alarm_control_panel_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_alarm_control_panel_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_event_response (event::Event *event, const std::string &event_type, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_event_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_update_state (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_update_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_camera_info (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_list_info_done (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_disconnect_request (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
static uint16_t | try_send_ping_request (EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single) |
|
Definition at line 47 of file api_connection.h.