lib: rename plural file names to singular
[babeltrace.git] / lib / graph / component-class-sink-colander.c
index 712c473177c632cbe944315ab8a046f92e0c9fae..e256d248594b60d281c85f4ad38d32ebae202dd5 100644 (file)
@@ -24,8 +24,7 @@
 #include <babeltrace/lib-logging-internal.h>
 
 #include <babeltrace/object.h>
-#include <babeltrace/graph/connection.h>
-#include <babeltrace/graph/private-component-class-sink.h>
+#include <babeltrace/graph/component-class-sink.h>
 #include <babeltrace/graph/self-component-sink.h>
 #include <babeltrace/graph/self-component-port.h>
 #include <babeltrace/graph/self-component-port-input-notification-iterator.h>
 #include <glib.h>
 
 static
-struct bt_private_component_class_sink *colander_comp_cls;
+struct bt_component_class_sink *colander_comp_cls;
 
 struct colander_data {
-       bt_notification_array notifs;
+       bt_notification_array_const notifs;
        uint64_t *count_addr;
        struct bt_self_component_port_input_notification_iterator *notif_iter;
 };
@@ -46,7 +45,7 @@ struct colander_data {
 static
 enum bt_self_component_status colander_init(
                struct bt_self_component_sink *self_comp,
-               struct bt_value *params, void *init_method_data)
+               const struct bt_value *params, void *init_method_data)
 {
        enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
        struct colander_data *colander_data = NULL;
@@ -102,7 +101,7 @@ static
 enum bt_self_component_status colander_input_port_connected(
                struct bt_self_component_sink *self_comp,
                struct bt_self_component_port_input *self_port,
-               struct bt_port_output *other_port)
+               const struct bt_port_output *other_port)
 {
        enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
        struct colander_data *colander_data =
@@ -135,7 +134,7 @@ enum bt_self_component_status colander_consume(
        struct colander_data *colander_data =
                bt_self_component_get_data(
                        bt_self_component_sink_as_self_component(self_comp));
-       bt_notification_array notifs;
+       bt_notification_array_const notifs;
 
        BT_ASSERT(colander_data);
 
@@ -180,24 +179,23 @@ struct bt_component_class_sink *bt_component_class_sink_colander_get(void)
                goto end;
        }
 
-       colander_comp_cls = bt_private_component_class_sink_create(
-               "colander", colander_consume);
+       colander_comp_cls = bt_component_class_sink_create("colander",
+               colander_consume);
        if (!colander_comp_cls) {
                BT_LOGE_STR("Cannot create sink colander component class.");
                goto end;
        }
 
-       (void) bt_private_component_class_sink_set_init_method(
+       (void) bt_component_class_sink_set_init_method(
                colander_comp_cls, colander_init);
-       (void) bt_private_component_class_sink_set_finalize_method(
+       (void) bt_component_class_sink_set_finalize_method(
                colander_comp_cls, colander_finalize);
-       (void) bt_private_component_class_sink_set_input_port_connected_method(
+       (void) bt_component_class_sink_set_input_port_connected_method(
                colander_comp_cls, colander_input_port_connected);
 
 end:
-       return bt_object_get_ref(
-               bt_private_component_class_sink_as_component_class_sink(
-                       colander_comp_cls));
+       bt_object_get_ref(colander_comp_cls);
+       return (void *) colander_comp_cls;
 }
 
 __attribute__((destructor)) static
This page took 0.024403 seconds and 4 git commands to generate.