Commit | Line | Data |
---|---|---|
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 |
31 | extern "C" { | |
32 | #endif | |
33 | ||
43c59509 PP |
34 | /*! |
35 | @defgroup api-version Library version | |
36 | ||
37 | @brief | |
38 | Library version getters. | |
39 | ||
40 | This module contains four functions to get the four parts of the | |
41 | library's version: | |
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 | ||
53 | <dt>Extra information</dt> | |
54 | <dd>bt_version_get_extra()</dd> | |
55 | </dl> | |
33314f16 PP |
56 | |
57 | You can also get the version's name and description if available with | |
58 | bt_version_get_name() and bt_version_get_name_description(). | |
43c59509 PP |
59 | */ |
60 | ||
61 | /*! @{ */ | |
62 | ||
63 | /*! | |
64 | @brief | |
65 | Returns the major version of libbabeltrace2. | |
66 | ||
67 | @returns | |
68 | Major version of the library. | |
69 | */ | |
78deb913 | 70 | extern unsigned int bt_version_get_major(void); |
43c59509 PP |
71 | |
72 | /*! | |
73 | @brief | |
74 | Returns the minor version of libbabeltrace2. | |
75 | ||
76 | @returns | |
77 | Minor version of the library. | |
78 | */ | |
78deb913 | 79 | extern unsigned int bt_version_get_minor(void); |
43c59509 PP |
80 | |
81 | /*! | |
82 | @brief | |
83 | Returns the patch version of libbabeltrace2. | |
84 | ||
85 | @returns | |
86 | Patch version of the library. | |
87 | */ | |
78deb913 | 88 | extern unsigned int bt_version_get_patch(void); |
43c59509 PP |
89 | |
90 | /*! | |
91 | @brief | |
92 | Returns extra information about the version of libbabeltrace2. | |
93 | ||
94 | This extra information can contain a version suffix such as | |
95 | <code>-pre5</code> or <code>-rc1</code>. | |
96 | ||
97 | @returns | |
f2088c80 | 98 | Extra information about the library's version, or \c NULL if none. |
43c59509 | 99 | */ |
7a6224c4 PP |
100 | extern const char *bt_version_get_extra(void); |
101 | ||
33314f16 PP |
102 | /*! |
103 | @brief | |
104 | Returns libbabeltrace2's version name. | |
105 | ||
106 | If the version name is not available, which can be the case for a | |
107 | development build, this function returns \c NULL. | |
108 | ||
109 | @returns | |
110 | Library's version name, or \c NULL if not available. | |
111 | ||
112 | @sa bt_version_get_name_description() — | |
113 | Returns the description of libbabeltrace2's version name. | |
114 | */ | |
115 | extern const char *bt_version_get_name(void); | |
116 | ||
117 | /*! | |
118 | @brief | |
119 | Returns libbabeltrace2's version name's description. | |
120 | ||
121 | If the version name's description is not available, which can be the | |
122 | case for a development build, this function returns \c NULL. | |
123 | ||
124 | @returns | |
125 | Library's version name's description, or \c NULL if not available. | |
126 | ||
127 | @sa bt_version_get_name() — | |
128 | Returns libbabeltrace2's version name. | |
129 | */ | |
130 | extern const char *bt_version_get_name_description(void); | |
131 | ||
43c59509 PP |
132 | /*! @} */ |
133 | ||
9d408fca PP |
134 | #ifdef __cplusplus |
135 | } | |
136 | #endif | |
137 | ||
924dc299 | 138 | #endif /* BABELTRACE2_VERSION_H */ |