lib: make the "port connected" method return a status
[babeltrace.git] / include / babeltrace / graph / connection-internal.h
index f99d125f77e395b4483036b17c18a375744300ae..73fb1b020ef2475c14c70c30623b8b914e1df4e7 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H
-#define BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H
+#ifndef BABELTRACE_GRAPH_CONNECTION_INTERNAL_H
+#define BABELTRACE_GRAPH_CONNECTION_INTERNAL_H
 
 /*
  * BabelTrace - Component Connection Internal
@@ -32,6 +32,7 @@
 #include <babeltrace/graph/notification-iterator-internal.h>
 #include <babeltrace/graph/private-connection.h>
 #include <babeltrace/object-internal.h>
+#include <babeltrace/assert-internal.h>
 #include <stdbool.h>
 
 struct bt_graph;
@@ -57,14 +58,11 @@ struct bt_connection {
         * created on this connection.
         */
        GPtrArray *iterators;
-};
 
-static inline
-struct bt_connection *bt_connection_from_private(
-               struct bt_private_connection *private_connection)
-{
-       return (void *) private_connection;
-}
+       bool notified_upstream_port_connected;
+       bool notified_downstream_port_connected;
+       bool notified_graph_ports_connected;
+};
 
 static inline
 struct bt_private_connection *bt_private_connection_from_connection(
@@ -88,7 +86,7 @@ void bt_connection_remove_iterator(struct bt_connection *conn,
 static inline
 struct bt_graph *bt_connection_borrow_graph(struct bt_connection *conn)
 {
-       assert(conn);
+       BT_ASSERT(conn);
        return (void *) conn->base.parent;
 }
 
@@ -144,4 +142,4 @@ const char *bt_connection_status_string(enum bt_connection_status status)
        }
 }
 
-#endif /* BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H */
+#endif /* BABELTRACE_GRAPH_CONNECTION_INTERNAL_H */
This page took 0.024409 seconds and 4 git commands to generate.