X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fcomponent-internal.h;h=682b250e72af04ddd81a0a9e6ebe831e67f1c452;hb=e5be10efe4d5543ba697c7e607ca0a5c33fa3ccb;hp=65f5e4d82bac46e1fded9cf378f7e17078d8ea7c;hpb=5c5632787fc9cafa602c89a28966bcfd01ec0204;p=babeltrace.git diff --git a/include/babeltrace/graph/component-internal.h b/include/babeltrace/graph/component-internal.h index 65f5e4d8..682b250e 100644 --- a/include/babeltrace/graph/component-internal.h +++ b/include/babeltrace/graph/component-internal.h @@ -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, @@ -87,7 +96,8 @@ enum bt_component_status bt_component_accept_port_connection( struct bt_port *other_port); BT_HIDDEN -void bt_component_port_connected(struct bt_component *comp, +enum bt_component_status bt_component_port_connected( + struct bt_component *comp, struct bt_port *self_port, struct bt_port *other_port); BT_HIDDEN