static void print_internal(jackctl_internal_t * internal) { printf("\n-------------------------- \n"); printf("internal = %s\n", jackctl_internal_get_name(internal)); printf("-------------------------- \n"); print_parameters(jackctl_internal_get_parameters(internal)); }
// const char *jackctl_internal_get_name(jackctl_internal_t * internal); static int _internal_get_name(ClientData clientData, Tcl_Interp *interp, int argc, Tcl_Obj* const *objv) { if (argc != 3) return fw_error_str(interp, "usage: jack-ctl internal-get-name internal"); jackctl_internal_t * internal; if (_get_pointer(interp, objv[2], (void**)&internal) != TCL_OK) return TCL_ERROR; return _return_string(interp, jackctl_internal_get_name(internal)); }
static jackctl_internal_t * jackctl_server_get_internal(jackctl_server_t *server, const char *internal_name) { const JSList * node_ptr = jackctl_server_get_internals_list(server); while (node_ptr) { if (strcmp(jackctl_internal_get_name((jackctl_internal_t *)node_ptr->data), internal_name) == 0) { return (jackctl_internal_t *)node_ptr->data; } node_ptr = jack_slist_next(node_ptr); } return NULL; }
static void print_server_internals(jackctl_server_t *server, FILE* file) { const JSList * node_ptr = jackctl_server_get_internals_list(server); fprintf(file, "Available internals:\n"); while (node_ptr) { jackctl_internal_t* internal = (jackctl_internal_t *)node_ptr->data; fprintf(file, " %s\n", jackctl_internal_get_name(internal)); node_ptr = jack_slist_next(node_ptr); } fprintf(file, "\n"); }