Visibility: split graph API into public and private interfaces
[babeltrace.git] / lib / component / filter.c
index da08c7fe7834dad6be1861ebea6689544895f041..2b1eb51f9d0a7c6cecc5a32c54ac154aedff26d0 100644 (file)
 #include <babeltrace/component/notification/notification.h>
 #include <babeltrace/component/notification/iterator-internal.h>
 
-BT_HIDDEN
-struct bt_notification_iterator *bt_component_filter_create_notification_iterator(
-               struct bt_component *component)
-{
-       return bt_component_create_iterator(component, NULL);
-}
-
-BT_HIDDEN
-struct bt_notification_iterator *bt_component_filter_create_notification_iterator_with_init_method_data(
-               struct bt_component *component, void *init_method_data)
-{
-       return bt_component_create_iterator(component, init_method_data);
-}
-
 BT_HIDDEN
 void bt_component_filter_destroy(struct bt_component *component)
 {
@@ -147,21 +133,6 @@ struct bt_port *bt_component_filter_get_default_input_port(
                        DEFAULT_INPUT_PORT_NAME);
 }
 
-struct bt_port *bt_component_filter_add_input_port(
-               struct bt_component *component, const char *name)
-{
-       struct bt_port *port = NULL;
-
-       if (!component ||
-                       component->class->type != BT_COMPONENT_CLASS_TYPE_FILTER) {
-               goto end;
-       }
-
-       port = bt_component_add_input_port(component, name);
-end:
-       return port;
-}
-
 enum bt_component_status bt_component_filter_get_output_port_count(
                struct bt_component *component, uint64_t *count)
 {
@@ -215,10 +186,67 @@ struct bt_port *bt_component_filter_get_default_output_port(
                        DEFAULT_OUTPUT_PORT_NAME);
 }
 
-struct bt_port *bt_component_filter_add_output_port(
-               struct bt_component *component, const char *name)
+struct bt_private_port *
+bt_private_component_filter_get_input_private_port_at_index(
+               struct bt_private_component *private_component, int index)
+{
+       return bt_private_port_from_port(
+               bt_component_filter_get_input_port_at_index(
+                       bt_component_from_private(private_component), index));
+}
+
+struct bt_private_port *
+bt_private_component_filter_get_default_private_input_port(
+               struct bt_private_component *private_component)
+{
+       return bt_private_port_from_port(
+               bt_component_filter_get_default_input_port(
+                       bt_component_from_private(private_component)));
+}
+
+struct bt_private_port *bt_private_component_filter_add_input_private_port(
+               struct bt_private_component *private_component,
+               const char *name)
+{
+       struct bt_port *port = NULL;
+       struct bt_component *component =
+               bt_component_from_private(private_component);
+
+       if (!component ||
+                       component->class->type != BT_COMPONENT_CLASS_TYPE_FILTER) {
+               goto end;
+       }
+
+       port = bt_component_add_input_port(component, name);
+end:
+       return bt_private_port_from_port(port);
+}
+
+struct bt_private_port *
+bt_private_component_filter_get_output_private_port_at_index(
+               struct bt_private_component *private_component, int index)
+{
+       return bt_private_port_from_port(
+               bt_component_filter_get_output_port_at_index(
+                       bt_component_from_private(private_component), index));
+}
+
+struct bt_private_port *
+bt_private_component_filter_get_default_private_output_port(
+               struct bt_private_component *private_component)
+{
+       return bt_private_port_from_port(
+               bt_component_filter_get_default_output_port(
+                       bt_component_from_private(private_component)));
+}
+
+struct bt_private_port *bt_private_component_filter_add_output_private_port(
+               struct bt_private_component *private_component,
+               const char *name)
 {
        struct bt_port *port = NULL;
+       struct bt_component *component =
+               bt_component_from_private(private_component);
 
        if (!component ||
                        component->class->type != BT_COMPONENT_CLASS_TYPE_FILTER) {
@@ -227,5 +255,5 @@ struct bt_port *bt_component_filter_add_output_port(
 
        port = bt_component_add_output_port(component, name);
 end:
-       return port;
+       return bt_private_port_from_port(port);
 }
This page took 0.027041 seconds and 4 git commands to generate.