lib: add bt_version_get_vcs_revision_description()
[babeltrace.git] / include / babeltrace2 / version.h
CommitLineData
924dc299
PP
1#ifndef BABELTRACE2_VERSION_H
2#define BABELTRACE2_VERSION_H
7a6224c4
PP
3
4/*
bbb7b5f0 5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
7a6224c4
PP
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 */
25
4fa90f32
PP
26#ifndef __BT_IN_BABELTRACE_H
27# error "Please include <babeltrace2/babeltrace.h> instead."
28#endif
29
9d408fca
PP
30#ifdef __cplusplus
31extern "C" {
32#endif
33
43c59509
PP
34/*!
35@defgroup api-version Library version
36
37@brief
38 Library version getters.
39
9ce402e0
PP
40This module contains four functions to information about the library's
41version:
43c59509
PP
42
43<dl>
44 <dt>Major version</dt>
45 <dd>bt_version_get_major()</dd>
46
47 <dt>Minor version</dt>
48 <dd>bt_version_get_minor()</dd>
49
50 <dt>Patch version</dt>
51 <dd>bt_version_get_patch()</dd>
52
9ce402e0 53 <dt>\bt_dt_opt Development stage</dt>
2671dfad 54 <dd>bt_version_get_development_stage()</dd>
33314f16 55
9ce402e0
PP
56 <dt>\bt_dt_opt Version control system revision's description</dt>
57 <dd>bt_version_get_vcs_revision_description()</dd>
58
59 <dt>\bt_dt_opt Release name</dt>
60 <dd>bt_version_get_name()</dd>
61
62 <dt>\bt_dt_opt Release name's description</dt>
63 <dd>bt_version_get_name_description()</dd>
64</dl>
43c59509
PP
65*/
66
67/*! @{ */
68
69/*!
70@brief
71 Returns the major version of libbabeltrace2.
72
73@returns
74 Major version of the library.
75*/
78deb913 76extern unsigned int bt_version_get_major(void);
43c59509
PP
77
78/*!
79@brief
80 Returns the minor version of libbabeltrace2.
81
82@returns
83 Minor version of the library.
84*/
78deb913 85extern unsigned int bt_version_get_minor(void);
43c59509
PP
86
87/*!
88@brief
89 Returns the patch version of libbabeltrace2.
90
91@returns
92 Patch version of the library.
93*/
78deb913 94extern unsigned int bt_version_get_patch(void);
43c59509
PP
95
96/*!
97@brief
2671dfad 98 Returns the development stage of libbabeltrace2's version.
43c59509 99
2671dfad 100The development stage \em can contain a version suffix such as
43c59509
PP
101<code>-pre5</code> or <code>-rc1</code>.
102
103@returns
2671dfad 104 Development stage of the library's version, or \c NULL if none.
43c59509 105*/
2671dfad 106extern const char *bt_version_get_development_stage(void);
7a6224c4 107
33314f16
PP
108/*!
109@brief
9ce402e0
PP
110 Returns the version control system (VCS) revision's description of
111 libbabeltrace2's version.
112
113The VCS revision description is only available for a non-release build
114of the library.
115
116@returns
117 Version control system revision's description of the library's
118 version, or \c NULL if none.
119*/
120extern const char *bt_version_get_vcs_revision_description(void);
121
122/*!
123@brief
124 Returns libbabeltrace2's release name.
33314f16 125
9ce402e0 126If the release name is not available, which can be the case for a
33314f16
PP
127development build, this function returns \c NULL.
128
129@returns
9ce402e0 130 Library's release name, or \c NULL if not available.
33314f16
PP
131
132@sa bt_version_get_name_description() &mdash;
9ce402e0 133 Returns the description of libbabeltrace2's release name.
33314f16
PP
134*/
135extern const char *bt_version_get_name(void);
136
137/*!
138@brief
9ce402e0 139 Returns libbabeltrace2's release name's description.
33314f16 140
9ce402e0 141If the release name's description is not available, which can be the
33314f16
PP
142case for a development build, this function returns \c NULL.
143
144@returns
9ce402e0 145 Library's release name's description, or \c NULL if not available.
33314f16
PP
146
147@sa bt_version_get_name() &mdash;
9ce402e0 148 Returns libbabeltrace2's release name.
33314f16
PP
149*/
150extern const char *bt_version_get_name_description(void);
151
43c59509
PP
152/*! @} */
153
9d408fca
PP
154#ifdef __cplusplus
155}
156#endif
157
924dc299 158#endif /* BABELTRACE2_VERSION_H */
This page took 0.0579499999999999 seconds and 4 git commands to generate.