Start of bt_component_factory implementation
[babeltrace.git] / include / babeltrace / plugin / component-factory-internal.h
index e6d368da3b499d9f300da4d2c32f370986642fef..3149bad3529b231ed847a58530a8bedf2cf5ddf4 100644 (file)
@@ -1,27 +1,60 @@
+#ifndef BABELTRACE_PLUGIN_COMPONENT_FACTORY_INTERNAL_H
+#define BABELTRACE_PLUGIN_COMPONENT_FACTORY_INTERNAL_H
 
-/** Component initialization functions */
-/**
- * Allocate a source component.
+/*
+ * BabelTrace - Component Factory Internal
  *
- * @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
- */
-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);
-
-/**
- * Allocate a sink component.
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
- * @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
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
  */
-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);
+
+#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/plugin/component-factory.h>
+#include <babeltrace/plugin/component.h>
+#include <babeltrace/plugin/plugin-system.h>
+#include <glib.h>
+#include <gmodule.h>
+
+struct component_entry {
+       enum bt_component_type type;
+       GString *name;
+};
+
+struct source_component_entry {
+       struct component_entry parent;
+       bt_component_source_init_cb init;
+       
+};
+
+struct sink_component_entry {
+       struct component_entry parent;
+       bt_component_sink_init_cb init;
+};
+
+struct bt_component_factory {
+       /** Array of GModule pointers */
+       GPtrArray *modules;
+       /** Array of pointers to struct component_entry */
+       GPtrArray *components;
+};
+
+#endif /* BABELTRACE_PLUGIN_COMPONENT_FACTORY_INTERNAL_H */
This page took 0.024428 seconds and 4 git commands to generate.