* SOFTWARE.
*/
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/graph-internal.h>
-#include <babeltrace/component/connection-internal.h>
-#include <babeltrace/component/component-sink-internal.h>
-#include <babeltrace/component/component-source.h>
-#include <babeltrace/component/component-filter.h>
-#include <babeltrace/component/port.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/graph-internal.h>
+#include <babeltrace/graph/connection-internal.h>
+#include <babeltrace/graph/component-sink-internal.h>
+#include <babeltrace/graph/component-source.h>
+#include <babeltrace/graph/component-filter.h>
+#include <babeltrace/graph/port.h>
#include <babeltrace/compiler.h>
#include <unistd.h>
#include <glib.h>
goto end;
}
-struct bt_connection *bt_graph_connect(struct bt_graph *graph,
+struct bt_connection *bt_graph_connect_ports(struct bt_graph *graph,
struct bt_port *upstream_port,
struct bt_port *downstream_port)
{
* invocation.
*/
component_status = bt_component_accept_port_connection(
- upstream_component, upstream_port);
+ upstream_component, upstream_port, downstream_port);
if (component_status != BT_COMPONENT_STATUS_OK) {
goto error_rollback;
}
component_status = bt_component_accept_port_connection(
- downstream_component, downstream_port);
+ downstream_component, downstream_port, upstream_port);
if (component_status != BT_COMPONENT_STATUS_OK) {
goto error_rollback;
}
goto error_disconnect;
}
- new_connection = bt_graph_connect(graph, upstream_port,
- new_port);
+ new_connection = bt_graph_connect_ports(graph,
+ upstream_port, new_port);
if (!new_connection) {
goto error_disconnect;
}
goto error_disconnect;
}
- new_connection = bt_graph_connect(graph, new_port,
- downstream_port);
+ new_connection = bt_graph_connect_ports(graph,
+ new_port, downstream_port);
if (!new_connection) {
goto error_disconnect;
}