| 1 | /* |
| 2 | * SPDX-License-Identifier: MIT |
| 3 | * |
| 4 | * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation |
| 5 | */ |
| 6 | |
| 7 | #ifndef BABELTRACE2_CTF_WRITER_UTILS_H |
| 8 | #define BABELTRACE2_CTF_WRITER_UTILS_H |
| 9 | |
| 10 | /* For bt_ctf_bool */ |
| 11 | #include <babeltrace2-ctf-writer/types.h> |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | |
| 17 | extern bt_ctf_bool bt_ctf_identifier_is_valid(const char *identifier); |
| 18 | |
| 19 | static inline |
| 20 | int bt_ctf_validate_identifier(const char *identifier) |
| 21 | { |
| 22 | return bt_ctf_identifier_is_valid(identifier) ? 1 : 0; |
| 23 | } |
| 24 | |
| 25 | #ifdef __cplusplus |
| 26 | } |
| 27 | #endif |
| 28 | |
| 29 | #endif /* BABELTRACE2_CTF_WRITER_UTILS_H */ |