HAMQTT 0.1.0
ESP-IDF component for integrating devices with Home Assistant over MQTT
|
Internal representation of a Home Assistant MQTT button. More...
#include <hamqtt_button.h>
Public Member Functions | |
HAMQTT_Button * | hamqtt_button_create (HAMQTT_Button_Config *config, HAMQTT_Button_On_Press_Func on_press_func, void *on_press_func_args) |
Create a new HAMQTT button. | |
void | hamqtt_button_destroy (HAMQTT_Button *button) |
Destroy a HAMQTT button and free all resources. | |
const HAMQTT_Button_Config * | hamqtt_button_get_config (const HAMQTT_Button *button) |
Get the configuration used to initialize the button. |
Internal representation of a Home Assistant MQTT button.
HAMQTT_Button * hamqtt_button_create | ( | HAMQTT_Button_Config * | config, |
HAMQTT_Button_On_Press_Func | on_press_func, | ||
void * | on_press_func_args ) |
Create a new HAMQTT button.
config | Pointer to a button configuration. Must remain valid for the lifetime of the button. |
on_press_func | Function pointer for handling pressing the ubtton. (See HAMQTT_Button_On_Press_Func). |
on_press_func_args | A pointer to the arguments to be passed to the on_press_func. |
void hamqtt_button_destroy | ( | HAMQTT_Button * | button | ) |
Destroy a HAMQTT button and free all resources.
button | Pointer to the button to destroy. Must not be NULL. |
const HAMQTT_Button_Config * hamqtt_button_get_config | ( | const HAMQTT_Button * | button | ) |
Get the configuration used to initialize the button.
button | Pointer to the button. |