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

@ -26,8 +26,9 @@ extern "C" {
#include <spa/param/param.h>
/** properties of SPA_ID_OBJECT_PropInfo */
/** properties of SPA_TYPE_OBJECT_PropInfo */
enum spa_prop_info {
SPA_PROP_INFO_START, /**< id of object, one of enum spa_param_type */
SPA_PROP_INFO_id, /**< associated id of the property */
SPA_PROP_INFO_name, /**< name of the property */
SPA_PROP_INFO_type, /**< type and range/enums of property */
@ -38,11 +39,11 @@ enum spa_prop_info {
* for the value. */
};
/** predefined properties for SPA_ID_OBJECT_Props */
/** predefined properties for SPA_TYPE_OBJECT_Props */
enum spa_prop {
SPA_PROP_BASE_GENERIC = 0x0,
SPA_PROP_START, /**< id of object, one of enum spa_param_type */
SPA_PROP_unknown, /**< an unknown property */
SPA_PROP_unknown, /**< an unknown property */
SPA_PROP_device,
SPA_PROP_deviceName,
@ -74,7 +75,7 @@ enum spa_prop {
SPA_PROP_gain,
SPA_PROP_sharpness,
SPA_PROP_BASE_CUSTOM = 0x10000,
SPA_PROP_START_CUSTOM = 0x10000,
};
#ifdef __cplusplus