lib: append `_FUNC` to `BT_PLUGIN_{INITIALIZE,FINALIZE}*`
[babeltrace.git] / tests / lib / test-plugin-plugins / minimal.c
CommitLineData
cbb9e0b1
PP
1/*
2 * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; under version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 */
17
71c5da58 18#include <babeltrace2/babeltrace.h>
edb2ec3c 19#include <stdlib.h>
d746b6e8 20#include <glib.h>
cbb9e0b1 21
4175c1d5 22static bt_plugin_initialize_func_status plugin_init(bt_self_plugin *plugin)
cbb9e0b1 23{
4175c1d5
FD
24 g_setenv("BT_TEST_PLUGIN_INITIALIZE_CALLED", "1", 1);
25 return BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK;
cbb9e0b1
PP
26}
27
ddc4d7d7 28static void plugin_finalize(void)
cbb9e0b1 29{
ddc4d7d7 30 g_setenv("BT_TEST_PLUGIN_FINALIZE_CALLED", "1", 1);
cbb9e0b1
PP
31}
32
edb2ec3c 33BT_PLUGIN_MODULE();
6ba0b073 34BT_PLUGIN(test_minimal);
cbb9e0b1
PP
35BT_PLUGIN_DESCRIPTION("Minimal Babeltrace plugin with no component classes");
36BT_PLUGIN_AUTHOR("Janine Sutto");
37BT_PLUGIN_LICENSE("Beerware");
1906e012
PP
38BT_PLUGIN_INITIALIZE_FUNC(plugin_init);
39BT_PLUGIN_FINALIZE_FUNC(plugin_finalize);
This page took 0.053582 seconds and 4 git commands to generate.