ucm: unify snd_use_case_geti(), add snd_use_case_card_list() template

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2010-10-12 13:29:05 +02:00
parent 0ae6c43b86
commit 3a34394508
2 changed files with 34 additions and 8 deletions

View file

@ -245,14 +245,16 @@ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
* \brief Get current - integer
* \param uc_mgr Use case manager
* \param identifier
* \return Value if success, otherwise a negative error code
* \param value result
* \return Zero if success, otherwise a negative error code
*
* Known identifiers:
* _devstatus/<device> - return status for given device
* _modstatus/<modifier> - return status for given modifier
*/
long snd_use_case_geti(snd_use_case_mgr_t *uc_mgr,
const char *identifier);
int snd_use_case_geti(snd_use_case_mgr_t *uc_mgr,
const char *identifier,
long *value);
/**
* \brief Set new
@ -310,6 +312,21 @@ int snd_use_case_mgr_close(snd_use_case_mgr_t *uc_mgr);
*/
int snd_use_case_mgr_reset(snd_use_case_mgr_t *uc_mgr);
/*
* helper functions
*/
/**
* \brief Obtain a list of cards
* \param uc_mgr Use case manager (may be NULL - card list)
* \param list Returned allocated list
* \return Number of list entries if success, otherwise a negative error code
*/
static inline int snd_use_case_card_list(const char **list[])
{
return snd_use_case_get_list(NULL, NULL, list);
}
/**
* \}
*/