Commit | Line | Data |
---|---|---|
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 | ||
18 | #include <babeltrace/plugin/plugin-dev.h> | |
19 | #include <babeltrace/component/component.h> | |
20 | ||
d3e4dcd8 | 21 | static enum bt_component_status sink_consume(struct bt_component *component) |
cbb9e0b1 | 22 | { |
cbb9e0b1 PP |
23 | return BT_COMPONENT_STATUS_OK; |
24 | } | |
25 | ||
d3e4dcd8 PP |
26 | enum bt_component_status dummy_init_iterator_method( |
27 | struct bt_component *component, struct bt_notification_iterator *iter) | |
cbb9e0b1 PP |
28 | { |
29 | return BT_COMPONENT_STATUS_OK; | |
30 | } | |
31 | ||
6ba0b073 | 32 | BT_PLUGIN(test_sfs); |
cbb9e0b1 PP |
33 | BT_PLUGIN_DESCRIPTION("Babeltrace plugin with source, sink, and filter component classes"); |
34 | BT_PLUGIN_AUTHOR("Janine Sutto"); | |
35 | BT_PLUGIN_LICENSE("Beerware"); | |
36 | ||
d3e4dcd8 PP |
37 | BT_PLUGIN_SOURCE_COMPONENT_CLASS(source, dummy_init_iterator_method); |
38 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(source, "A source."); | |
6ba0b073 | 39 | |
d3e4dcd8 PP |
40 | BT_PLUGIN_SINK_COMPONENT_CLASS(sink, sink_consume); |
41 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(sink, "A sink."); | |
6ba0b073 | 42 | |
d3e4dcd8 PP |
43 | BT_PLUGIN_FILTER_COMPONENT_CLASS(filter, dummy_init_iterator_method); |
44 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(filter, "A filter."); |