X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace2%2Fversion.h;h=d7b2822a9ef789db0452524358989c30200af627;hb=19e20ba95029abaae4f155eef2cbbdcf6f59959e;hp=7fed407a92c6a27b0a57efc21897e3c03a2e06df;hpb=71c5da58f2e63c0ea0df3b603d615f5aa3dde008;p=babeltrace.git diff --git a/include/babeltrace2/version.h b/include/babeltrace2/version.h index 7fed407a..d7b2822a 100644 --- a/include/babeltrace2/version.h +++ b/include/babeltrace2/version.h @@ -1,8 +1,8 @@ -#ifndef BABELTRACE_VERSION_H -#define BABELTRACE_VERSION_H +#ifndef BABELTRACE2_VERSION_H +#define BABELTRACE2_VERSION_H /* - * Copyright 2017 Philippe Proulx + * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,17 +23,116 @@ * SOFTWARE. */ +#ifndef __BT_IN_BABELTRACE_H +# error "Please include instead." +#endif + #ifdef __cplusplus extern "C" { #endif -extern int bt_version_get_major(void); -extern int bt_version_get_minor(void); -extern int bt_version_get_patch(void); -extern const char *bt_version_get_extra(void); +/*! +@defgroup api-version Library version + +@brief + Library version getters. + +This module contains four functions to get the four parts of the +library's version: + +
+
Major version
+
bt_version_get_major()
+ +
Minor version
+
bt_version_get_minor()
+ +
Patch version
+
bt_version_get_patch()
+ +
Development stage
+
bt_version_get_development_stage()
+
+ +You can also get the version's name and description if available with +bt_version_get_name() and bt_version_get_name_description(). +*/ + +/*! @{ */ + +/*! +@brief + Returns the major version of libbabeltrace2. + +@returns + Major version of the library. +*/ +extern unsigned int bt_version_get_major(void); + +/*! +@brief + Returns the minor version of libbabeltrace2. + +@returns + Minor version of the library. +*/ +extern unsigned int bt_version_get_minor(void); + +/*! +@brief + Returns the patch version of libbabeltrace2. + +@returns + Patch version of the library. +*/ +extern unsigned int bt_version_get_patch(void); + +/*! +@brief + Returns the development stage of libbabeltrace2's version. + +The development stage \em can contain a version suffix such as +-pre5 or -rc1. + +@returns + Development stage of the library's version, or \c NULL if none. +*/ +extern const char *bt_version_get_development_stage(void); + +/*! +@brief + Returns libbabeltrace2's version name. + +If the version name is not available, which can be the case for a +development build, this function returns \c NULL. + +@returns + Library's version name, or \c NULL if not available. + +@sa bt_version_get_name_description() — + Returns the description of libbabeltrace2's version name. +*/ +extern const char *bt_version_get_name(void); + +/*! +@brief + Returns libbabeltrace2's version name's description. + +If the version name's description is not available, which can be the +case for a development build, this function returns \c NULL. + +@returns + Library's version name's description, or \c NULL if not available. + +@sa bt_version_get_name() — + Returns libbabeltrace2's version name. +*/ +extern const char *bt_version_get_name_description(void); + +/*! @} */ #ifdef __cplusplus } #endif -#endif /* BABELTRACE_VERSION_H */ +#endif /* BABELTRACE2_VERSION_H */