Implement the component graph interface
[babeltrace.git] / include / babeltrace / component / component.h
index 08de0d74c8b3ace711233f8bcc8a653f117233df..0d3e355ac75e7c3b676f2f7eabc644f6ee9e0960 100644 (file)
@@ -27,6 +27,7 @@
  * SOFTWARE.
  */
 
+#include <babeltrace/component/component-class.h>
 #include <babeltrace/component/notification/iterator.h>
 #include <babeltrace/values.h>
 #include <stdio.h>
 extern "C" {
 #endif
 
+struct bt_component_class;
+struct bt_component_graph;
+struct bt_component;
+struct bt_value;
+
 /**
  * Status code. Errors are always negative.
  */
@@ -56,12 +62,10 @@ enum bt_component_status {
        BT_COMPONENT_STATUS_INVALID =           -3,
        /** Memory allocation failure. */
        BT_COMPONENT_STATUS_NOMEM =             -4,
+       /** Element not found. */
+       BT_COMPONENT_STATUS_NOT_FOUND =         -5,
 };
 
-struct bt_component_class;
-struct bt_component;
-struct bt_value;
-
 /**
  * Create an instance of a component from a component class.
  *
@@ -74,6 +78,10 @@ extern struct bt_component *bt_component_create(
                struct bt_component_class *component_class, const char *name,
                struct bt_value *params);
 
+extern struct bt_component *bt_component_create_with_init_method_data(
+               struct bt_component_class *component_class, const char *name,
+               struct bt_value *params, void *init_method_data);
+
 /**
  * Get a component's private data.
  *
@@ -112,6 +120,8 @@ extern struct bt_component_class *bt_component_get_class(
 extern enum bt_component_class_type bt_component_get_class_type(
                struct bt_component *component);
 
+extern struct bt_graph *bt_component_get_graph(struct bt_component *component);
+
 #ifdef __cplusplus
 }
 #endif
This page took 0.03066 seconds and 4 git commands to generate.