Trace IR and notification APIs: split into private and public APIs
[babeltrace.git] / include / babeltrace / graph / component-internal.h
index 13e632ed3cf8c5edd66e237e1e6bed9c4bb80afa..682b250e72af04ddd81a0a9e6ebe831e67f1c452 100644 (file)
@@ -45,6 +45,8 @@ struct bt_component_destroy_listener {
        void *data;
 };
 
+struct bt_graph;
+
 struct bt_component {
        struct bt_object base;
        struct bt_component_class *class;
@@ -76,6 +78,13 @@ struct bt_private_component *bt_private_component_from_component(
        return (void *) component;
 }
 
+static inline
+struct bt_graph *bt_component_borrow_graph(struct bt_component *comp)
+{
+       BT_ASSERT(comp);
+       return (void *) bt_object_borrow_parent(&comp->base);
+}
+
 BT_HIDDEN
 enum bt_component_status bt_component_create(
                struct bt_component_class *component_class,
This page took 0.033388 seconds and 4 git commands to generate.