X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fgraph.h;h=a2dfbd8235f85e63d64e3a48fd6e2c6fd8fe7130;hb=a256a42d2324f0ba50153f29e2f7ef513a9905c0;hp=06f2af1b122407a46b07e29465a1fec1969f0d15;hpb=090a4c0ac02fab83b9ad13bc2abb81534820f7f4;p=babeltrace.git diff --git a/include/babeltrace/graph/graph.h b/include/babeltrace/graph/graph.h index 06f2af1b..a2dfbd82 100644 --- a/include/babeltrace/graph/graph.h +++ b/include/babeltrace/graph/graph.h @@ -38,6 +38,7 @@ struct bt_port; struct bt_connection; enum bt_graph_status { + BT_GRAPH_STATUS_COMPONENT_REFUSES_PORT_CONNECTION = 111, /** Canceled. */ BT_GRAPH_STATUS_CANCELED = 125, /** No sink can consume at the moment. */ @@ -53,6 +54,7 @@ enum bt_graph_status { BT_GRAPH_STATUS_NO_SINK = -6, /** General error. */ BT_GRAPH_STATUS_ERROR = -1, + BT_GRAPH_STATUS_NOMEM = -12, }; typedef void (*bt_graph_port_added_listener)(struct bt_port *port, @@ -73,9 +75,9 @@ extern struct bt_graph *bt_graph_create(void); * Creates a connection between two components using the two ports specified * and adds the connection and components (if not already added) to the graph. */ -extern struct bt_connection *bt_graph_connect_ports(struct bt_graph *graph, - struct bt_port *upstream, - struct bt_port *downstream); +extern enum bt_graph_status bt_graph_connect_ports(struct bt_graph *graph, + struct bt_port *upstream, struct bt_port *downstream, + struct bt_connection **connection); /** * Run graph to completion or until a single sink is left and "AGAIN" is received.