lib: rename transforming bt_X_borrow_Y() -> bt_X_as_Y()
[babeltrace.git] / include / babeltrace / graph / component-filter.h
index 428e39ac398cd982b45d67c6967d790c54d681f2..89238f2817bbfc34c68ef3641eb691f157b2d0a1 100644 (file)
@@ -2,8 +2,6 @@
 #define BABELTRACE_GRAPH_COMPONENT_FILTER_H
 
 /*
- * BabelTrace - Filter Plug-in Interface
- *
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
 #include <stdint.h>
-#include <babeltrace/graph/component.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-struct bt_port;
 struct bt_component;
+struct bt_component_filter;
+struct bt_port_input;
+struct bt_port_output;
+
+static inline
+struct bt_component *bt_component_filter_as_component(
+               struct bt_component_filter *component)
+{
+       return (void *) component;
+}
+
+extern uint64_t bt_component_filter_get_input_port_count(
+               struct bt_component_filter *component);
+
+extern struct bt_port_input *bt_component_filter_borrow_input_port_by_name(
+               struct bt_component_filter *component, const char *name);
+
+extern struct bt_port_input *bt_component_filter_borrow_input_port_by_index(
+               struct bt_component_filter *component, uint64_t index);
+
+extern uint64_t bt_component_filter_get_output_port_count(
+               struct bt_component_filter *component);
+
+extern struct bt_port_output *bt_component_filter_borrow_output_port_by_name(
+               struct bt_component_filter *component, const char *name);
 
-extern int64_t bt_component_filter_get_input_port_count(
-               struct bt_component *component);
-extern struct bt_port *bt_component_filter_get_input_port_by_name(
-               struct bt_component *component, const char *name);
-extern struct bt_port *bt_component_filter_get_input_port_by_index(
-               struct bt_component *component, uint64_t index);
-
-extern int64_t bt_component_filter_get_output_port_count(
-               struct bt_component *component);
-extern struct bt_port *bt_component_filter_get_output_port_by_name(
-               struct bt_component *component, const char *name);
-extern struct bt_port *bt_component_filter_get_output_port_by_index(
-               struct bt_component *component, uint64_t index);
+extern struct bt_port_output *bt_component_filter_borrow_output_port_by_index(
+               struct bt_component_filter *component, uint64_t index);
 
 #ifdef __cplusplus
 }
This page took 0.025386 seconds and 4 git commands to generate.