+enum bt_param_validation_status validate_bound_type(
+ const bt_value *value,
+ struct bt_param_validation_context *context)
+{
+ enum bt_param_validation_status status = BT_PARAM_VALIDATION_STATUS_OK;
+
+ if (!bt_value_is_signed_integer(value) &&
+ !bt_value_is_string(value)) {
+ status = bt_param_validation_error(context,
+ "unexpected type: expected-types=[%s, %s], actual-type=%s",
+ bt_common_value_type_string(BT_VALUE_TYPE_SIGNED_INTEGER),
+ bt_common_value_type_string(BT_VALUE_TYPE_STRING),
+ bt_common_value_type_string(bt_value_get_type(value)));
+ }
+
+ return status;
+}
+
+struct bt_param_validation_map_value_entry_descr trimmer_params[] = {
+ { "gmt", BT_PARAM_VALIDATION_MAP_VALUE_ENTRY_OPTIONAL, { .type = BT_VALUE_TYPE_BOOL } },
+ { "begin", BT_PARAM_VALIDATION_MAP_VALUE_ENTRY_OPTIONAL, { .validation_func = validate_bound_type } },
+ { "end", BT_PARAM_VALIDATION_MAP_VALUE_ENTRY_OPTIONAL, { .validation_func = validate_bound_type } },
+ BT_PARAM_VALIDATION_MAP_VALUE_ENTRY_END
+};
+
+static
+bt_component_class_initialize_method_status init_trimmer_comp_from_params(
+ struct trimmer_comp *trimmer_comp,