From c225b02ad54c6c28fac7ae0ca5e3137265662d59 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Fri, 25 Oct 2024 10:05:41 +0300 Subject: [PATCH] logging: backend: websocket: Add missing header file The log_backend_ws.h include file was missing which caused build issues. Fixes #80392 Signed-off-by: Jukka Rissanen --- include/zephyr/logging/log_backend_ws.h | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 include/zephyr/logging/log_backend_ws.h diff --git a/include/zephyr/logging/log_backend_ws.h b/include/zephyr/logging/log_backend_ws.h new file mode 100644 index 00000000000..0894d2ca19c --- /dev/null +++ b/include/zephyr/logging/log_backend_ws.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_LOG_BACKEND_WS_H_ +#define ZEPHYR_LOG_BACKEND_WS_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Register websocket socket where the logging output is sent. + * + * @param fd Websocket socket value. + * + * @return 0 if ok, <0 if error + */ +int log_backend_ws_register(int fd); + +/** + * @brief Unregister websocket socket where the logging output was sent. + * + * @details After this the websocket output is disabled. + * + * @param fd Websocket socket value. + * + * @return 0 if ok, <0 if error + */ +int log_backend_ws_unregister(int fd); + +/** + * @brief Get the websocket logger backend + * + * @details This function returns the websocket logger backend. + * + * @return Pointer to the websocket logger backend. + */ +const struct log_backend *log_backend_ws_get(void); + +/** + * @brief Start the websocket logger backend + * + * @details This function starts the websocket logger backend. + */ +void log_backend_ws_start(void); + +#ifdef __cplusplus +} +#endif + +#endif /* ZEPHYR_LOG_BACKEND_WS_H_ */