From 11b274447f8a8424b837088eeee53dea1c9e5fba Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sun, 11 Dec 2016 03:57:56 -0500 Subject: [PATCH] Add filter component creation and validation callback MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- lib/plugin-system/component.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/plugin-system/component.c b/lib/plugin-system/component.c index e722089e..340e8066 100644 --- a/lib/plugin-system/component.c +++ b/lib/plugin-system/component.c @@ -41,6 +41,7 @@ struct bt_component * (* const component_create_funcs[])( struct bt_component_class *, struct bt_value *) = { [BT_COMPONENT_TYPE_SOURCE] = bt_component_source_create, [BT_COMPONENT_TYPE_SINK] = bt_component_sink_create, + [BT_COMPONENT_TYPE_FILTER] = bt_component_filter_create, }; static @@ -48,6 +49,7 @@ enum bt_component_status (* const component_validation_funcs[])( struct bt_component *) = { [BT_COMPONENT_TYPE_SOURCE] = bt_component_source_validate, [BT_COMPONENT_TYPE_SINK] = bt_component_sink_validate, + [BT_COMPONENT_TYPE_FILTER] = bt_component_filter_validate, }; static @@ -185,8 +187,7 @@ struct bt_component *bt_component_create( type = bt_component_class_get_type(component_class); if (type <= BT_COMPONENT_TYPE_UNKNOWN || - type >= BT_COMPONENT_TYPE_FILTER) { - /* Filter components are not supported yet. */ + type > BT_COMPONENT_TYPE_FILTER) { goto end; } -- 2.34.1