Make interface types a string

This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
This commit is contained in:
Wim Taymans 2019-12-19 13:15:10 +01:00
parent 9657486a81
commit f391353c7f
123 changed files with 791 additions and 1251 deletions

View file

@ -42,7 +42,9 @@ extern "C" {
* Devices or Nodes.
*
*/
#define SPA_VERSION_DEVICE 0
#define SPA_TYPE_INTERFACE_Device SPA_TYPE_INFO_INTERFACE_BASE "Device"
#define SPA_VERSION_DEVICE 0
struct spa_device { struct spa_interface iface; };
/**
@ -75,7 +77,7 @@ struct spa_device_object_info {
#define SPA_VERSION_DEVICE_OBJECT_INFO 0
uint32_t version;
uint32_t type; /**< the object type managed by this device */
const char *type; /**< the object type managed by this device */
const char *factory_name; /**< a factory name that implements the object */
#define SPA_DEVICE_OBJECT_CHANGE_MASK_FLAGS (1u<<0)