+ bt_component_borrow_from_private(private_component);
+ struct bt_graph *graph;
+
+ if (!component) {
+ BT_LOGW_STR("Invalid parameter: component is NULL.");
+ status = BT_COMPONENT_STATUS_INVALID;
+ goto end;
+ }
+
+ if (component->class->type != BT_COMPONENT_CLASS_TYPE_SOURCE) {
+ BT_LOGW("Invalid parameter: component's class is not a source component class: "
+ "comp-addr=%p, comp-name=\"%s\", comp-class-type=%s",
+ component, bt_component_get_name(component),
+ bt_component_class_type_string(component->class->type));
+ status = BT_COMPONENT_STATUS_INVALID;
+ goto end;
+ }
+
+ graph = bt_component_borrow_graph(component);