*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
*/
#include <babeltrace/babeltrace.h>
-#include <babeltrace/context.h>
-#include <babeltrace/ctf-text/types.h>
+#include <babeltrace/types.h>
#include <stdlib.h>
-int babeltrace_verbose, babeltrace_debug;
+int bt_version_get_major(void)
+{
+ return BT_VERSION_MAJOR;
+}
+
+int bt_version_get_minor(void)
+{
+ return BT_VERSION_MINOR;
+}
+
+int bt_version_get_patch(void) {
+ return BT_VERSION_PATCH;
+}
-static
-void __attribute__((constructor)) init_babeltrace_lib(void)
+const char *bt_version_get_extra(void)
{
- if (getenv("BABELTRACE_VERBOSE"))
- babeltrace_verbose = 1;
- if (getenv("BABELTRACE_DEBUG"))
- babeltrace_debug = 1;
+ return BT_VERSION_EXTRA;
}