lib: private functions: do not repeat `private` word
[babeltrace.git] / lib / graph / iterator.c
index c709eae49b5336cdff2a0d8c85bf870721e09c34..ffaf7d453778f40b88d0e0d153b3495f1e52d5fc 100644 (file)
@@ -37,6 +37,7 @@
 #include <babeltrace/graph/connection.h>
 #include <babeltrace/graph/connection-internal.h>
 #include <babeltrace/graph/component.h>
+#include <babeltrace/graph/component-internal.h>
 #include <babeltrace/graph/component-source-internal.h>
 #include <babeltrace/graph/component-class-internal.h>
 #include <babeltrace/graph/component-class-sink-colander-internal.h>
@@ -52,6 +53,7 @@
 #include <babeltrace/graph/notification-stream.h>
 #include <babeltrace/graph/notification-stream-internal.h>
 #include <babeltrace/graph/port.h>
+#include <babeltrace/graph/private-graph.h>
 #include <babeltrace/graph/graph-internal.h>
 #include <babeltrace/types.h>
 #include <babeltrace/assert-internal.h>
@@ -882,7 +884,7 @@ struct bt_notification_iterator *bt_output_port_notification_iterator_create(
        output_port_comp = bt_port_get_component(output_port);
        BT_ASSERT_PRE(output_port_comp,
                "Output port has no component: %!+p", output_port);
-       graph = bt_component_get_graph(output_port_comp);
+       graph = bt_object_get_ref(bt_component_borrow_graph(output_port_comp));
        BT_ASSERT(graph);
 
        /* Create notification iterator */
@@ -918,8 +920,8 @@ struct bt_notification_iterator *bt_output_port_notification_iterator_create(
        colander_data.notifs = (void *) iterator->base.notifs->pdata;
        colander_data.count_addr = &iterator->count;
 
-       graph_status = bt_graph_add_component_with_init_method_data(
-               iterator->graph, colander_comp_cls, colander_comp_name,
+       graph_status = bt_private_graph_add_component_with_init_method_data(
+               (void *) iterator->graph, colander_comp_cls, colander_comp_name,
                NULL, &colander_data, &iterator->colander);
        if (graph_status != BT_GRAPH_STATUS_OK) {
                BT_LOGW("Cannot add colander sink component to graph: "
@@ -936,7 +938,7 @@ struct bt_notification_iterator *bt_output_port_notification_iterator_create(
        colander_in_port = bt_component_sink_get_input_port_by_index(
                iterator->colander, 0);
        BT_ASSERT(colander_in_port);
-       graph_status = bt_graph_connect_ports(iterator->graph,
+       graph_status = bt_private_graph_connect_ports((void *) iterator->graph,
                output_port, colander_in_port, NULL);
        if (graph_status != BT_GRAPH_STATUS_OK) {
                BT_LOGW("Cannot add colander sink component to graph: "
This page took 0.024228 seconds and 4 git commands to generate.