lib: add bt_version_get_extra_{name,description,patch_names}
[babeltrace.git] / include / babeltrace2 / version.h
CommitLineData
3fd40f46
PP
1#ifndef BABELTRACE2_VERSION_H
2#define BABELTRACE2_VERSION_H
7a6224c4
PP
3
4/*
0dcb770f 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
9df34b44
PP
26#ifndef __BT_IN_BABELTRACE_H
27# error "Please include <babeltrace2/babeltrace.h> instead."
28#endif
29
e0831b38
PP
30#ifdef __cplusplus
31extern "C" {
32#endif
33
7704a0af
PP
34/*!
35@defgroup api-version Library version
36
37@brief
38 Library version getters.
39
a0446fa8 40This module contains functions to get information about the library's
58df4c80 41version:
7704a0af
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
58df4c80 53 <dt>\bt_dt_opt Development stage</dt>
19e20ba9 54 <dd>bt_version_get_development_stage()</dd>
2491e1b5 55
58df4c80
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>
a0446fa8
PP
64
65 <dt>\bt_dt_opt Extra name</dt>
66 <dd>bt_version_get_extra_name()</dd>
67
68 <dt>\bt_dt_opt Extra description</dt>
69 <dd>bt_version_get_extra_description()</dd>
70
71 <dt>\bt_dt_opt Extra patch names</dt>
72 <dd>bt_version_get_extra_patch_names()</dd>
58df4c80 73</dl>
7704a0af
PP
74*/
75
76/*! @{ */
77
78/*!
79@brief
80 Returns the major version of libbabeltrace2.
81
82@returns
83 Major version of the library.
84*/
4f79144c 85extern unsigned int bt_version_get_major(void);
7704a0af
PP
86
87/*!
88@brief
89 Returns the minor version of libbabeltrace2.
90
91@returns
92 Minor version of the library.
93*/
4f79144c 94extern unsigned int bt_version_get_minor(void);
7704a0af
PP
95
96/*!
97@brief
98 Returns the patch version of libbabeltrace2.
99
100@returns
101 Patch version of the library.
102*/
4f79144c 103extern unsigned int bt_version_get_patch(void);
7704a0af
PP
104
105/*!
106@brief
19e20ba9 107 Returns the development stage of libbabeltrace2's version.
7704a0af 108
19e20ba9 109The development stage \em can contain a version suffix such as
7704a0af
PP
110<code>-pre5</code> or <code>-rc1</code>.
111
112@returns
19e20ba9 113 Development stage of the library's version, or \c NULL if none.
7704a0af 114*/
19e20ba9 115extern const char *bt_version_get_development_stage(void);
7a6224c4 116
2491e1b5
PP
117/*!
118@brief
58df4c80
PP
119 Returns the version control system (VCS) revision's description of
120 libbabeltrace2's version.
121
122The VCS revision description is only available for a non-release build
123of the library.
124
125@returns
126 Version control system revision's description of the library's
127 version, or \c NULL if none.
128*/
129extern const char *bt_version_get_vcs_revision_description(void);
130
131/*!
132@brief
133 Returns libbabeltrace2's release name.
2491e1b5 134
58df4c80 135If the release name is not available, which can be the case for a
2491e1b5
PP
136development build, this function returns \c NULL.
137
138@returns
58df4c80 139 Library's release name, or \c NULL if not available.
2491e1b5
PP
140
141@sa bt_version_get_name_description() &mdash;
58df4c80 142 Returns the description of libbabeltrace2's release name.
2491e1b5
PP
143*/
144extern const char *bt_version_get_name(void);
145
146/*!
147@brief
58df4c80 148 Returns libbabeltrace2's release name's description.
2491e1b5 149
58df4c80 150If the release name's description is not available, which can be the
2491e1b5
PP
151case for a development build, this function returns \c NULL.
152
153@returns
58df4c80 154 Library's release name's description, or \c NULL if not available.
2491e1b5
PP
155
156@sa bt_version_get_name() &mdash;
58df4c80 157 Returns libbabeltrace2's release name.
2491e1b5
PP
158*/
159extern const char *bt_version_get_name_description(void);
160
a0446fa8
PP
161/*!
162@brief
163 Returns the extra name of libbabeltrace2's version.
164
165The extra name of the library's version can be set at build time for a
166custom build.
167
168@returns
169 Library's version extra name, or \c NULL if not available.
170*/
171extern const char *bt_version_get_extra_name(void);
172
173/*!
174@brief
175 Returns the extra description of libbabeltrace2's version.
176
177The extra description of the library's version can be set at build time
178for a custom build.
179
180@returns
181 @parblock
182 Library's version extra description, or \c NULL if not available.
183
184 Can contain newlines.
185 @endparblock
186*/
187extern const char *bt_version_get_extra_description(void);
188
189/*!
190@brief
191 Returns the extra patch names of libbabeltrace2's version.
192
193The extra patch names of the library's version can be set at build time
194for a custom build.
195
196@returns
197 @parblock
198 Library's version extra patch names, or \c NULL if not available.
199
200 Each line of the returned string contains the name of a patch
201 applied to Babeltrace's source tree for a custom build.
202 @endparblock
203*/
204extern const char *bt_version_get_extra_patch_names(void);
205
7704a0af
PP
206/*! @} */
207
e0831b38
PP
208#ifdef __cplusplus
209}
210#endif
211
3fd40f46 212#endif /* BABELTRACE2_VERSION_H */
This page took 0.057935 seconds and 4 git commands to generate.