#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/plugin/component-internal.h>
+#include <babeltrace/plugin/component-class-internal.h>
#include <babeltrace/plugin/plugin-system.h>
+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 */