X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fplugin%2Fsink-internal.h;h=b3a56f9526a09e6ec6898dfbe6ab051020d36ffe;hb=fec2a9f220bdae0ce64716538c111348302f2696;hp=30617789559a8d7a376f84c9143cda85c17809c3;hpb=0d884c50d1a934e65bf6893b0232b0e7fdecf70a;p=babeltrace.git diff --git a/include/babeltrace/plugin/sink-internal.h b/include/babeltrace/plugin/sink-internal.h index 30617789..b3a56f95 100644 --- a/include/babeltrace/plugin/sink-internal.h +++ b/include/babeltrace/plugin/sink-internal.h @@ -29,13 +29,47 @@ #include #include +#include #include +struct bt_value; + +struct bt_component_sink_class { + struct bt_component_class parent; +}; + +typedef uint32_t notification_mask_t; struct bt_component_sink { struct bt_component parent; - /* Component implementation callbacks */ - bt_component_sink_handle_notification_cb handle_notification; + bt_component_sink_consume_cb consume; + bt_component_sink_add_iterator_cb add_iterator; + GPtrArray *inputs; + unsigned int min_input_count; + unsigned int max_input_count; + bool validated_inputs; +/* notification_mask_t registered_notifications_mask;*/ }; +/** + * Allocate a sink component. + * + * @param class Component class + * @param params A dictionary of component parameters + * @returns A sink component instance + */ +BT_HIDDEN +struct bt_component *bt_component_sink_create( + struct bt_component_class *class, struct bt_value *params); + +/** + * Validate a sink component. + * + * @param component Sink component instance to validate + * @returns One of #bt_component_status + */ +BT_HIDDEN +enum bt_component_status bt_component_sink_validate( + struct bt_component *component); + #endif /* BABELTRACE_PLUGIN_SINK_INTERNAL_H */