#include <babeltrace/graph/notification-iterator.h>
#include <babeltrace/graph/private-connection.h>
#include <babeltrace/object-internal.h>
+#include <stdbool.h>
struct bt_graph;
struct bt_port *downstream_port);
BT_HIDDEN
-void bt_connection_disconnect_ports(struct bt_connection *conn);
+void bt_connection_end(struct bt_connection *conn, bool try_remove_from_graph);
BT_HIDDEN
void bt_connection_remove_iterator(struct bt_connection *conn,
struct bt_notification_iterator *iterator);
+static inline
+struct bt_graph *bt_connection_borrow_graph(struct bt_connection *conn)
+{
+ assert(conn);
+ return (void *) conn->base.parent;
+}
+
static inline
enum bt_connection_status
bt_connection_status_from_notification_iterator_status(