Add filter component creation and validation callback
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 11 Dec 2016 08:57:56 +0000 (03:57 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:08 +0000 (14:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/plugin-system/component.c

index e722089ef58c7f5e0bc1792bec7c5efc67cc886b..340e8066475e5c540a18908e631ce0efca67b1d8 100644 (file)
@@ -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;
        }
 
This page took 0.024535 seconds and 4 git commands to generate.