| 1 | /* SPDX-License-Identifier: BSD-2-Clause */ |
| 2 | /* |
| 3 | * Copyright (C) 2024 Intel Corporation. |
| 4 | * Author Walfred Tedeschi <[email protected]> |
| 5 | * Copyright (C) 2025 Linutronix GmbH |
| 6 | */ |
| 7 | |
| 8 | #ifndef _LOG_MQTT_H_ |
| 9 | #define _LOG_MQTT_H_ |
| 10 | |
| 11 | struct mosquitto; |
| 12 | |
| 13 | struct log_mqtt_thread_context { |
| 14 | pthread_t mqtt_log_task_id; |
| 15 | struct mosquitto *mosq; |
| 16 | volatile int stop; |
| 17 | }; |
| 18 | |
| 19 | struct log_mqtt_thread_context *log_mqtt_thread_create(void); |
| 20 | void log_mqtt_thread_stop(struct log_mqtt_thread_context *thread_context); |
| 21 | void log_mqtt_thread_free(struct log_mqtt_thread_context *thread_context); |
| 22 | void log_mqtt_thread_wait_for_finish(struct log_mqtt_thread_context *thread_context); |
| 23 | |
| 24 | #endif /* _LOG_MQTT_H_ */ |