Introduce bt_plugin and bt_component_class
[babeltrace.git] / include / babeltrace / plugin / sink-internal.h
index 30617789559a8d7a376f84c9143cda85c17809c3..f7b7bc4cbdfc0be76b4ae852e7f7a38d1fa85595 100644 (file)
 
 #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_component_sink_class {
+       struct bt_component_class parent;
+       bt_component_sink_init_cb init;
+};
+
 struct bt_component_sink {
        struct bt_component parent;
 
@@ -38,4 +44,15 @@ struct bt_component_sink {
        bt_component_sink_handle_notification_cb handle_notification;
 };
 
+/**
+ * Allocate a sink component.
+ *
+ * @param class                        Component class
+ * @param name                 Component instance name (will be copied)
+ * @returns                    A sink component instance
+ */
+BT_HIDDEN
+extern struct bt_component *bt_component_sink_create(
+               struct bt_component_class *class, const char *name);
+
 #endif /* BABELTRACE_PLUGIN_SINK_INTERNAL_H */
This page took 0.023271 seconds and 4 git commands to generate.