blob: 021cd058aba1a5255e2447f4960886b2414afa22 [file] [log] [blame]
Radek Krejci2c22f122018-09-05 15:08:03 +02001/**
Michal Vaskoc5a22832020-08-20 13:21:33 +02002 * @file version.h
Radek Krejci2c22f122018-09-05 15:08:03 +02003 * @author Radek Krejci <rkrejci@cesnet.cz>
Michal Vasko3ab37cc2024-06-28 10:40:07 +02004 * @author Michal Vasko <mvasko@cesnet.cz>
Michal Vaskoc5a22832020-08-20 13:21:33 +02005 * @brief libyang version definitions
Radek Krejci2c22f122018-09-05 15:08:03 +02006 *
Michal Vasko3ab37cc2024-06-28 10:40:07 +02007 * Copyright (c) 2020 - 2024 CESNET, z.s.p.o.
Radek Krejci2c22f122018-09-05 15:08:03 +02008 *
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 Vaskoc5a22832020-08-20 13:21:33 +020016#ifndef LY_VERSION_H_
17#define LY_VERSION_H_
Radek Krejci2c22f122018-09-05 15:08:03 +020018
David Schweizer70addcf2024-06-28 16:17:54 +020019#include "ly_config.h"
20
Michal Vasko3ab37cc2024-06-28 10:40:07 +020021#ifdef __cplusplus
22extern "C" {
23#endif
24
Radek Krejcia43d69d2019-04-04 10:34:46 +020025#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 Krejci2c22f122018-09-05 15:08:03 +020029
David Schweizerc5996da2024-06-26 10:52:20 +020030#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 Vasko11581632024-07-15 15:04:58 +020035/**
36 * @brief Get libyang major SO version.
37 *
38 * @return LY version.
39 */
40LIBYANG_API_DECL uint32_t ly_version_so_major(void);
Michal Vasko3ab37cc2024-06-28 10:40:07 +020041
42/**
Michal Vasko11581632024-07-15 15:04:58 +020043 * @brief Get libyang minor SO version.
44 *
45 * @return LY version.
Michal Vasko3ab37cc2024-06-28 10:40:07 +020046 */
Michal Vasko11581632024-07-15 15:04:58 +020047LIBYANG_API_DECL uint32_t ly_version_so_minor(void);
Michal Vasko3ab37cc2024-06-28 10:40:07 +020048
49/**
Michal Vasko11581632024-07-15 15:04:58 +020050 * @brief Get libyang micro SO version.
51 *
52 * @return LY version.
Michal Vasko3ab37cc2024-06-28 10:40:07 +020053 */
Michal Vasko11581632024-07-15 15:04:58 +020054LIBYANG_API_DECL uint32_t ly_version_so_micro(void);
55
56/**
57 * @brief Get libyang string SO version.
58 *
59 * @return LY version.
60 */
61LIBYANG_API_DECL const char *ly_version_so_str(void);
62
63/**
64 * @brief Get libyang major project version.
65 *
66 * @return LY version.
67 */
68LIBYANG_API_DECL uint32_t ly_version_proj_major(void);
69
70/**
71 * @brief Get libyang minor project version.
72 *
73 * @return LY version.
74 */
75LIBYANG_API_DECL uint32_t ly_version_proj_minor(void);
76
77/**
78 * @brief Get libyang micro project version.
79 *
80 * @return LY version.
81 */
82LIBYANG_API_DECL uint32_t ly_version_proj_micro(void);
83
84/**
85 * @brief Get libyang string project version.
86 *
87 * @return LY version.
88 */
89LIBYANG_API_DECL const char *ly_version_proj_str(void);
Michal Vasko3ab37cc2024-06-28 10:40:07 +020090
91#ifdef __cplusplus
92}
93#endif
94
Michal Vaskoc5a22832020-08-20 13:21:33 +020095#endif /* LY_VERSION_H_ */