}
*/
-int bt_component_sink_get_input_port_count(struct bt_component *component)
+enum bt_component_status bt_component_sink_get_input_port_count(
+ struct bt_component *component, uint64_t *count)
{
- int ret;
+ enum bt_component_status status = BT_COMPONENT_STATUS_OK;
struct bt_component_sink *sink;
- if (!component) {
- ret = -1;
+ if (!component || !count) {
+ status = BT_COMPONENT_STATUS_INVALID;
goto end;
}
if (component->class->type != BT_COMPONENT_CLASS_TYPE_SINK) {
- ret = -1;
+ status = BT_COMPONENT_STATUS_INVALID;
goto end;
}
sink = container_of(component, struct bt_component_sink, parent);
- ret = sink->input_ports->len;
+ *count = (uint64_t) sink->input_ports->len;
end:
- return ret;
+ return status;
}
struct bt_port *bt_component_sink_get_input_port(