<dt>Extra information</dt>
<dd>bt_version_get_extra()</dd>
</dl>
+
+You can also get the version's name and description if available with
+bt_version_get_name() and bt_version_get_name_description().
*/
/*! @{ */
*/
extern const char *bt_version_get_extra(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
{
return strlen(BT_VERSION_EXTRA) == 0 ? NULL : BT_VERSION_EXTRA;
}
+
+const char *bt_version_get_name(void)
+{
+ return strlen(BT_VERSION_NAME) == 0 ? NULL : BT_VERSION_NAME;
+}
+
+const char *bt_version_get_name_description(void)
+{
+ return strlen(BT_VERSION_DESCRIPTION) == 0 ? NULL :
+ BT_VERSION_DESCRIPTION;
+}