-struct bt_notification_iterator;
-
-extern int64_t bt_component_source_get_output_port_count(
- struct bt_component *component);
-extern struct bt_port *bt_component_source_get_output_port_by_name(
- struct bt_component *component, const char *name);
-extern struct bt_port *bt_component_source_get_output_port_by_index(
- struct bt_component *component, uint64_t index);
+struct bt_component_source;
+struct bt_port_output;
+
+static inline
+struct bt_component *bt_component_source_as_component(
+ struct bt_component_source *component)
+{
+ return (void *) component;
+}
+
+extern uint64_t bt_component_source_get_output_port_count(
+ struct bt_component_source *component);
+
+extern struct bt_port_output *bt_component_source_borrow_output_port_by_name(
+ struct bt_component_source *component, const char *name);
+
+extern struct bt_port_output *bt_component_source_borrow_output_port_by_index(
+ struct bt_component_source *component, uint64_t index);