|
|
|
|
@ -191,49 +191,6 @@ const char *LiveGetDeviceName(int number)
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* \brief Get the number of pre registered devices
|
|
|
|
|
*
|
|
|
|
|
* \retval cnt the number of pre registered devices
|
|
|
|
|
*/
|
|
|
|
|
int LiveGetDeviceNameCount(void)
|
|
|
|
|
{
|
|
|
|
|
int i = 0;
|
|
|
|
|
LiveDeviceName *pd;
|
|
|
|
|
|
|
|
|
|
TAILQ_FOREACH(pd, &pre_live_devices, next) {
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return i;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* \brief Get a pointer to the pre device name at idx
|
|
|
|
|
*
|
|
|
|
|
* \param number idx of the pre device in our list
|
|
|
|
|
*
|
|
|
|
|
* \retval ptr pointer to the string containing the device
|
|
|
|
|
* \retval NULL on error
|
|
|
|
|
*/
|
|
|
|
|
const char *LiveGetDeviceNameName(int number)
|
|
|
|
|
{
|
|
|
|
|
int i = 0;
|
|
|
|
|
LiveDeviceName *pd;
|
|
|
|
|
|
|
|
|
|
TAILQ_FOREACH(pd, &pre_live_devices, next) {
|
|
|
|
|
if (i == number) {
|
|
|
|
|
return pd->dev;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** \internal
|
|
|
|
|
* \brief Shorten a device name that is to long
|
|
|
|
|
*
|
|
|
|
|
|