*/
#include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/plugin/component-internal.h>
+#include <babeltrace/plugin/component-factory.h>
+#include <babeltrace/plugin/component.h>
#include <babeltrace/plugin/plugin-system.h>
+#include <babeltrace/plugin/plugin.h>
+#include <glib.h>
+#include <gmodule.h>
-/** Component initialization functions */
-/**
- * Allocate a source component.
- *
- * @param name Component instance name (will be copied)
- * @param private_data Private component implementation data
- * @param destroy_cb Component private data clean-up callback
- * @param iterator_create_cb Iterator creation callback
- * @returns A source component instance
- */
-BT_HIDDEN
-extern struct bt_component *bt_component_source_create(const char *name,
- void *private_data, bt_component_destroy_cb destroy_func,
- bt_component_source_iterator_create_cb iterator_create_cb);
+struct component_class {
+ enum bt_component_type type;
+ GString *name;
+};
-/**
- * Allocate a sink component.
- *
- * @param name Component instance name (will be copied)
- * @param private_data Private component implementation data
- * @param destroy_cb Component private data clean-up callback
- * @param notification_cb Notification handling callback
- * @returns A sink component instance
- */
-BT_HIDDEN
-extern struct bt_component *bt_component_sink_create(const char *name,
- void *private_data, bt_component_destroy_cb destroy_func,
- bt_component_sink_handle_notification_cb notification_cb);
+struct source_component_class {
+ struct component_class parent;
+ bt_component_source_init_cb init;
+
+};
+
+struct sink_component_class {
+ struct component_class parent;
+ bt_component_sink_init_cb init;
+};
+
+struct plugin {
+ const char *name;
+ const char *author;
+ const char *license;
+ bt_plugin_init_func init;
+ bt_plugin_init_func exit;
+ GModule *module;
+ /** Array of pointers to struct component_class */
+ GPtrArray *components;
+};
+
+struct bt_component_factory {
+ /** Array of pointers to struct plugin */
+ GPtrArray *plugins;
+};
#endif /* BABELTRACE_PLUGIN_COMPONENT_FACTORY_INTERNAL_H */