mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
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:
parent
281b65934e
commit
90c1a95eef
117 changed files with 1198 additions and 1272 deletions
|
|
@ -37,18 +37,8 @@ enum spa_monitor_event {
|
|||
SPA_MONITOR_EVENT_Changed,
|
||||
};
|
||||
|
||||
#define SPA_MONITOR_EVENT_ID(ev) SPA_EVENT_ID(ev, SPA_ID_EVENT_Monitor)
|
||||
|
||||
/** properties for SPA_ID_OBJECT_MonitorItem */
|
||||
enum spa_monitor_item {
|
||||
SPA_MONITOR_ITEM_id,
|
||||
SPA_MONITOR_ITEM_flags,
|
||||
SPA_MONITOR_ITEM_state,
|
||||
SPA_MONITOR_ITEM_name,
|
||||
SPA_MONITOR_ITEM_class,
|
||||
SPA_MONITOR_ITEM_info,
|
||||
SPA_MONITOR_ITEM_factory,
|
||||
};
|
||||
/** monitor event id, one of enum spa_monitor_event */
|
||||
#define SPA_MONITOR_EVENT_ID(ev) SPA_EVENT_ID(ev, SPA_TYPE_EVENT_Monitor)
|
||||
|
||||
enum spa_monitor_item_flags {
|
||||
SPA_MONITOR_ITEM_FLAG_NONE = 0,
|
||||
|
|
@ -61,6 +51,18 @@ enum spa_monitor_item_state {
|
|||
SPA_MONITOR_ITEM_STATE_UNAVAILABLE, /*< The item is unavailable */
|
||||
};
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_MonitorItem */
|
||||
enum spa_monitor_item {
|
||||
SPA_MONITOR_ITEM_START, /**< id of object, one of enum spa_monitor_event */
|
||||
SPA_MONITOR_ITEM_id,
|
||||
SPA_MONITOR_ITEM_flags, /**< one of enum spa_monitor_item_flags */
|
||||
SPA_MONITOR_ITEM_state, /**< one of enum spa_monitor_item_state */
|
||||
SPA_MONITOR_ITEM_name,
|
||||
SPA_MONITOR_ITEM_class,
|
||||
SPA_MONITOR_ITEM_info,
|
||||
SPA_MONITOR_ITEM_factory,
|
||||
};
|
||||
|
||||
/**
|
||||
* spa_monitor_callbacks:
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue