--- liblscp/trunk/lscp/device.h 2004/07/05 16:26:44 171 +++ liblscp/trunk/lscp/device.h 2006/11/28 22:46:32 952 @@ -2,7 +2,7 @@ // /**************************************************************************** liblscp - LinuxSampler Control Protocol API - Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -14,9 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ @@ -36,11 +36,11 @@ /** Parameter value type. */ typedef enum _lscp_type_t { - LSCP_TYPE_NONE = 0, - LSCP_TYPE_BOOL, - LSCP_TYPE_INT, - LSCP_TYPE_FLOAT, - LSCP_TYPE_STRING + LSCP_TYPE_NONE = 0, + LSCP_TYPE_BOOL, + LSCP_TYPE_INT, + LSCP_TYPE_FLOAT, + LSCP_TYPE_STRING } lscp_type_t; @@ -48,8 +48,8 @@ /** Common and simple key/value pair parameter tuple. */ typedef struct _lscp_param_t { - char * key; - char * value; + char * key; + char * value; } lscp_param_t; @@ -57,16 +57,16 @@ /** Common parameter info cache struct. */ typedef struct _lscp_param_info_t { - lscp_type_t type; - char * description; - int mandatory; - int fix; - int multiplicity; - char ** depends; - char * defaultv; - char * range_min; - char * range_max; - char ** possibilities; + lscp_type_t type; + char * description; + int mandatory; + int fix; + int multiplicity; + char ** depends; + char * defaultv; + char * range_min; + char * range_max; + char ** possibilities; } lscp_param_info_t; @@ -74,9 +74,9 @@ /** Common driver type info cache struct. */ typedef struct _lscp_driver_info_t { - char * description; - char * version; - char ** parameters; + char * description; + char * version; + char ** parameters; } lscp_driver_info_t; @@ -84,8 +84,8 @@ /** Common device info cache struct. */ typedef struct _lscp_device_info_t { - char * driver; - lscp_param_t *params; + char * driver; + lscp_param_t *params; } lscp_device_info_t; @@ -93,8 +93,8 @@ /** Common device channel/port info cache struct. */ typedef struct _lscp_device_port_info_t { - char * name; - lscp_param_t *params; + char * name; + lscp_param_t *params; } lscp_device_port_info_t; @@ -102,7 +102,8 @@ //------------------------------------------------------------------------- // Audio driver control functions. -const char ** lscp_get_available_audio_drivers(lscp_client_t *pClient); +int lscp_get_available_audio_drivers (lscp_client_t *pClient); +const char ** lscp_list_available_audio_drivers (lscp_client_t *pClient); lscp_driver_info_t * lscp_get_audio_driver_info (lscp_client_t *pClient, const char *pszAudioDriver); lscp_param_info_t * lscp_get_audio_driver_param_info(lscp_client_t *pClient, const char *pszAudioDriver, const char *pszParam, lscp_param_t *pDepList); @@ -127,7 +128,8 @@ //------------------------------------------------------------------------- // MIDI driver control functions. -const char ** lscp_get_available_midi_drivers (lscp_client_t *pClient); +int lscp_get_available_midi_drivers (lscp_client_t *pClient); +const char ** lscp_list_available_midi_drivers(lscp_client_t *pClient); lscp_driver_info_t * lscp_get_midi_driver_info (lscp_client_t *pClient, const char *pszMidiDriver); lscp_param_info_t * lscp_get_midi_driver_param_info (lscp_client_t *pClient, const char *pszMidiDriver, const char *pszParam, lscp_param_t *pDepList); @@ -148,6 +150,11 @@ lscp_param_info_t * lscp_get_midi_port_param_info (lscp_client_t *pClient, int iMidiDevice, int iMidiPort, const char *pszParam); lscp_status_t lscp_set_midi_port_param (lscp_client_t *pClient, int iMidiDevice, int iMidiPort, lscp_param_t *pParam); +//------------------------------------------------------------------------- +// Generic parameter list functions. + +const char * lscp_get_param_value (lscp_param_t *pParams, const char *pszParam); + #if defined(__cplusplus) }