Radek Krejci | 2c22f12 | 2018-09-05 15:08:03 +0200 | [diff] [blame] | 1 | /** |
Michal Vasko | c5a2283 | 2020-08-20 13:21:33 +0200 | [diff] [blame] | 2 | * @file version.h |
Radek Krejci | 2c22f12 | 2018-09-05 15:08:03 +0200 | [diff] [blame] | 3 | * @author Radek Krejci <rkrejci@cesnet.cz> |
Michal Vasko | 3ab37cc | 2024-06-28 10:40:07 +0200 | [diff] [blame] | 4 | * @author Michal Vasko <mvasko@cesnet.cz> |
Michal Vasko | c5a2283 | 2020-08-20 13:21:33 +0200 | [diff] [blame] | 5 | * @brief libyang version definitions |
Radek Krejci | 2c22f12 | 2018-09-05 15:08:03 +0200 | [diff] [blame] | 6 | * |
Michal Vasko | 3ab37cc | 2024-06-28 10:40:07 +0200 | [diff] [blame] | 7 | * Copyright (c) 2020 - 2024 CESNET, z.s.p.o. |
Radek Krejci | 2c22f12 | 2018-09-05 15:08:03 +0200 | [diff] [blame] | 8 | * |
| 9 | * This source code is licensed under BSD 3-Clause License (the "License"). |
| 10 | * You may not use this file except in compliance with the License. |
| 11 | * You may obtain a copy of the License at |
| 12 | * |
| 13 | * https://opensource.org/licenses/BSD-3-Clause |
| 14 | */ |
| 15 | |
Michal Vasko | c5a2283 | 2020-08-20 13:21:33 +0200 | [diff] [blame] | 16 | #ifndef LY_VERSION_H_ |
| 17 | #define LY_VERSION_H_ |
Radek Krejci | 2c22f12 | 2018-09-05 15:08:03 +0200 | [diff] [blame] | 18 | |
David Schweizer | 70addcf | 2024-06-28 16:17:54 +0200 | [diff] [blame] | 19 | #include "ly_config.h" |
| 20 | |
Michal Vasko | 3ab37cc | 2024-06-28 10:40:07 +0200 | [diff] [blame] | 21 | #ifdef __cplusplus |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
Radek Krejci | a43d69d | 2019-04-04 10:34:46 +0200 | [diff] [blame] | 25 | #define LY_VERSION_MAJOR @LIBYANG_MAJOR_SOVERSION@ /**< libyang major version number */ |
| 26 | #define LY_VERSION_MINOR @LIBYANG_MINOR_SOVERSION@ /**< libyang minor version number */ |
| 27 | #define LY_VERSION_MICRO @LIBYANG_MICRO_SOVERSION@ /**< libyang micro version number */ |
| 28 | #define LY_VERSION "@LIBYANG_SOVERSION_FULL@" /**< libyang version string */ |
Radek Krejci | 2c22f12 | 2018-09-05 15:08:03 +0200 | [diff] [blame] | 29 | |
David Schweizer | c5996da | 2024-06-26 10:52:20 +0200 | [diff] [blame] | 30 | #define LY_PROJ_VERSION_MAJOR @LIBYANG_MAJOR_VERSION@ /**< project major version number */ |
| 31 | #define LY_PROJ_VERSION_MINOR @LIBYANG_MINOR_VERSION@ /**< project minor version number */ |
| 32 | #define LY_PROJ_VERSION_MICRO @LIBYANG_MICRO_VERSION@ /**< project micro version number */ |
| 33 | #define LY_PROJ_VERSION "@LIBYANG_VERSION@" /**< project version string */ |
| 34 | |
Michal Vasko | 1158163 | 2024-07-15 15:04:58 +0200 | [diff] [blame] | 35 | /** |
| 36 | * @brief Get libyang major SO version. |
| 37 | * |
| 38 | * @return LY version. |
| 39 | */ |
| 40 | LIBYANG_API_DECL uint32_t ly_version_so_major(void); |
Michal Vasko | 3ab37cc | 2024-06-28 10:40:07 +0200 | [diff] [blame] | 41 | |
| 42 | /** |
Michal Vasko | 1158163 | 2024-07-15 15:04:58 +0200 | [diff] [blame] | 43 | * @brief Get libyang minor SO version. |
| 44 | * |
| 45 | * @return LY version. |
Michal Vasko | 3ab37cc | 2024-06-28 10:40:07 +0200 | [diff] [blame] | 46 | */ |
Michal Vasko | 1158163 | 2024-07-15 15:04:58 +0200 | [diff] [blame] | 47 | LIBYANG_API_DECL uint32_t ly_version_so_minor(void); |
Michal Vasko | 3ab37cc | 2024-06-28 10:40:07 +0200 | [diff] [blame] | 48 | |
| 49 | /** |
Michal Vasko | 1158163 | 2024-07-15 15:04:58 +0200 | [diff] [blame] | 50 | * @brief Get libyang micro SO version. |
| 51 | * |
| 52 | * @return LY version. |
Michal Vasko | 3ab37cc | 2024-06-28 10:40:07 +0200 | [diff] [blame] | 53 | */ |
Michal Vasko | 1158163 | 2024-07-15 15:04:58 +0200 | [diff] [blame] | 54 | LIBYANG_API_DECL uint32_t ly_version_so_micro(void); |
| 55 | |
| 56 | /** |
| 57 | * @brief Get libyang string SO version. |
| 58 | * |
| 59 | * @return LY version. |
| 60 | */ |
| 61 | LIBYANG_API_DECL const char *ly_version_so_str(void); |
| 62 | |
| 63 | /** |
| 64 | * @brief Get libyang major project version. |
| 65 | * |
| 66 | * @return LY version. |
| 67 | */ |
| 68 | LIBYANG_API_DECL uint32_t ly_version_proj_major(void); |
| 69 | |
| 70 | /** |
| 71 | * @brief Get libyang minor project version. |
| 72 | * |
| 73 | * @return LY version. |
| 74 | */ |
| 75 | LIBYANG_API_DECL uint32_t ly_version_proj_minor(void); |
| 76 | |
| 77 | /** |
| 78 | * @brief Get libyang micro project version. |
| 79 | * |
| 80 | * @return LY version. |
| 81 | */ |
| 82 | LIBYANG_API_DECL uint32_t ly_version_proj_micro(void); |
| 83 | |
| 84 | /** |
| 85 | * @brief Get libyang string project version. |
| 86 | * |
| 87 | * @return LY version. |
| 88 | */ |
| 89 | LIBYANG_API_DECL const char *ly_version_proj_str(void); |
Michal Vasko | 3ab37cc | 2024-06-28 10:40:07 +0200 | [diff] [blame] | 90 | |
| 91 | #ifdef __cplusplus |
| 92 | } |
| 93 | #endif |
| 94 | |
Michal Vasko | c5a2283 | 2020-08-20 13:21:33 +0200 | [diff] [blame] | 95 | #endif /* LY_VERSION_H_ */ |