3 * Copyright (c) 2023 Samsung Electronics Co., Ltd
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is furnished
10 * to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 #include <dlog-internal.h>
29 * @brief Get buffer ID by name
30 * @details Returns the ID of the buffer with the given name
31 * @param[in] name The name of the buffer whose ID we seek
32 * @return If such buffer exists, its ID.
33 * Else, LOG_ID_INVALID.
36 log_id_t log_id_by_name(const char *name);
39 * @brief Get buffer name by ID
40 * @details Returns the name of the buffer with the given ID
41 * @param[in] id The ID of the buffer whose name we seek
42 * @return If such buffer exists, its name.
46 char * log_name_by_id(log_id_t id);
49 * @brief Is core buffer
50 * @details Returns whether given buffer is one of the original four buffers
51 * @param[in] id The ID of the buffer
54 bool is_core_buffer(log_id_t id);
57 * @brief Is platform buffer
58 * @details Returns whether given buffer is meant for platform use
59 * @param[in] id The ID of the buffer
62 bool is_platform_buffer(log_id_t id);
65 * @brief Is buffer valid
66 * @details Returns whether given buffer ID represents an actual buffer
67 * @param[in] id The ID of the buffer
70 bool is_buffer_valid(log_id_t id);