// const char *jackctl_parameter_get_name(jackctl_parameter_t * parameter); static int _parameter_get_name(ClientData clientData, Tcl_Interp *interp, int argc, Tcl_Obj* const *objv) { if (argc != 3) return fw_error_str(interp, "usage: jack-ctl parameter-get-name parameter"); jackctl_parameter_t * parameter; if (_get_pointer(interp, objv[2], (void**)¶meter) != TCL_OK) return TCL_ERROR; return _return_string(interp, jackctl_parameter_get_name(parameter)); }
static jackctl_parameter_t * jackctl_get_parameter(const JSList * parameters_list, const char * parameter_name) { while (parameters_list) { if (strcmp(jackctl_parameter_get_name((jackctl_parameter_t *)parameters_list->data), parameter_name) == 0) { return (jackctl_parameter_t *)parameters_list->data; } parameters_list = jack_slist_next(parameters_list); } return NULL; }
static void print_parameters(const JSList * node_ptr) { while (node_ptr != NULL) { jackctl_parameter_t * parameter = (jackctl_parameter_t *)node_ptr->data; printf("\nparameter name = %s\n", jackctl_parameter_get_name(parameter)); printf("parameter id = %c\n", jackctl_parameter_get_id(parameter)); printf("parameter short decs = %s\n", jackctl_parameter_get_short_description(parameter)); printf("parameter long decs = %s\n", jackctl_parameter_get_long_description(parameter)); print_value(jackctl_parameter_get_default_value(parameter), jackctl_parameter_get_type(parameter)); node_ptr = jack_slist_next(node_ptr); } }