HAMQTT 0.1.0
ESP-IDF component for integrating devices with Home Assistant over MQTT
Loading...
Searching...
No Matches
hamqtt_component_internal.h
Go to the documentation of this file.
1/*
2 * Copyright 2025 Ethan Barnes
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
30
31#pragma once
32#include "hamqtt_component.h"
33
35
36/* ----- V-Table (interface) ----- */
37
45 esp_err_t (*get_discovery_config)(HAMQTT_Component *component,
46 cJSON *root,
47 const char *device_unique_id);
48
49 void (*handle_mqtt_message)(HAMQTT_Component *component,
50 const char *topic,
51 const char *data);
52
53 void (*update)(HAMQTT_Component *component,
54 esp_mqtt_client_handle_t mqtt_client);
55
56 const char *(*get_unique_id)(HAMQTT_Component *component);
57
58 const char *const *(*get_subscribed_topics)(HAMQTT_Component *component,
59 size_t *count);
60
61};
62
63/* ----- Base Object ----- */
64
70};
Interface definition for Home Assistant MQTT components.
Definition hamqtt_component_internal.h:44
Base struct representing a generic Home Assistant MQTT component.
Definition hamqtt_component_internal.h:68