summaryrefslogtreecommitdiffstats
path: root/src/version.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/version.h.in')
-rw-r--r--src/version.h.in61
1 files changed, 51 insertions, 10 deletions
diff --git a/src/version.h.in b/src/version.h.in
index 1ed86c1..021cd05 100644
--- a/src/version.h.in
+++ b/src/version.h.in
@@ -16,6 +16,8 @@
#ifndef LY_VERSION_H_
#define LY_VERSION_H_
+#include "ly_config.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -30,22 +32,61 @@ extern "C" {
#define LY_PROJ_VERSION_MICRO @LIBYANG_MICRO_VERSION@ /**< project micro version number */
#define LY_PROJ_VERSION "@LIBYANG_VERSION@" /**< project version string */
-struct ly_version {
- uint32_t major; /**< Major version number */
- uint32_t minor; /**< Minor version number */
- uint32_t micro; /**< Micro version number */
- const char *str; /**< Version string */
-};
+/**
+ * @brief Get libyang major SO version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL uint32_t ly_version_so_major(void);
+
+/**
+ * @brief Get libyang minor SO version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL uint32_t ly_version_so_minor(void);
+
+/**
+ * @brief Get libyang micro SO version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL uint32_t ly_version_so_micro(void);
+
+/**
+ * @brief Get libyang string SO version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL const char *ly_version_so_str(void);
/**
- * @brief libyang SO version.
+ * @brief Get libyang major project version.
+ *
+ * @return LY version.
*/
-LIBYANG_API_DECL extern struct ly_version ly_version_so;
+LIBYANG_API_DECL uint32_t ly_version_proj_major(void);
/**
- * @brief libyang project version.
+ * @brief Get libyang minor project version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL uint32_t ly_version_proj_minor(void);
+
+/**
+ * @brief Get libyang micro project version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL uint32_t ly_version_proj_micro(void);
+
+/**
+ * @brief Get libyang string project version.
+ *
+ * @return LY version.
*/
-LIBYANG_API_DECL extern struct ly_version ly_version_proj;
+LIBYANG_API_DECL const char *ly_version_proj_str(void);
#ifdef __cplusplus
}