More type cleanups

SPA_ID_* -> SPA_TYPE_*. We use 'type' for all registered types.
ID refers to either a registered type or an enum.
Improve introspection of object ids. Make 0 an invalid enum and
use it to look up the object id type.
Move some type-info files together.
Swap type and id of the object, we first specify the type and then
the id because the meaning of the id depends on the object type.
This commit is contained in:
Wim Taymans 2018-08-27 15:03:11 +02:00
parent 281b65934e
commit 90c1a95eef
117 changed files with 1198 additions and 1272 deletions

View file

@ -35,16 +35,16 @@ struct spa_handle {
/* user_data that can be set by the application */
void *user_data;
/**
* Get the interface provided by \a handle with \a interface_id.
* Get the interface provided by \a handle with \a type.
*
* \param handle a spa_handle
* \param interface_id the interface id
* \param type the interface type
* \param interface result to hold the interface.
* \return 0 on success
* -ENOTSUP when there are no interfaces
* -EINVAL when handle or info is NULL
*/
int (*get_interface) (struct spa_handle *handle, uint32_t interface_id, void **interface);
int (*get_interface) (struct spa_handle *handle, uint32_t type, void **interface);
/**
* Clean up the memory of \a handle. After this, \a handle should not be used
* anymore.