diff options
author | Haakon Sporsheim <[email protected]> | 2015-09-29 08:43:55 +0200 |
---|---|---|
committer | Haakon Sporsheim <[email protected]> | 2015-09-29 09:28:41 +0200 |
commit | 7959fc3ef0307cbdf33e06152c8ff8ab48e97b8f (patch) | |
tree | 7418e0b3e281023b301e9779e53273d551d7f95f /include | |
parent | d1183d70876a8782aa2ba83329e9efa2fad1848c (diff) | |
download | cubeb-7959fc3ef0307cbdf33e06152c8ff8ab48e97b8f.tar.gz cubeb-7959fc3ef0307cbdf33e06152c8ff8ab48e97b8f.zip |
Add both devid and device_id (str) in device_info.
The caller now doesn't need to use the id_to_str() intricacies and we
don't have to bother with adding a symetric free() for the retrieved value.
Diffstat (limited to 'include')
-rw-r--r-- | include/cubeb/cubeb.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/cubeb/cubeb.h b/include/cubeb/cubeb.h index 0a5bbee..91c30ab 100644 --- a/include/cubeb/cubeb.h +++ b/include/cubeb/cubeb.h @@ -193,7 +193,8 @@ typedef enum { } cubeb_device_pref; typedef struct { - cubeb_devid device_id; /* Device identifier */ + cubeb_devid devid; /* Device identifier handle */ + char * device_id; /* Device identifier which might be presented in a UI */ char * friendly_name; /* Friendly device name which might be presented in a UI */ char * group_id; /* Two devices have the same group identifier if they belong to the same physical device; for example a headset and microphone. */ char * vendor_name; /* Optional vendor name, may be NULL */ @@ -431,13 +432,11 @@ int cubeb_enumerate_devices(cubeb * context, @retval CUBEB_OK */ int cubeb_device_list_destroy(cubeb * context, cubeb_device_list * list); -/** Retrieves the device id as string. - The string must be free()ed by the caller. +/** Destroy a cubeb_device_info structure. @param context - @param devid device id - @param str pointer to string + @param info pointer device info structure to destroy @retval CUBEB_OK */ -int cubeb_device_id_to_str(cubeb * context, const cubeb_devid devid, char ** str); +int cubeb_device_info_destroy(cubeb * context, cubeb_device_info * info); /** Registers a callback which is called when device list changes.. @param context |