mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-04 06:46:24 -04: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
|
|
@ -26,6 +26,7 @@ extern "C" {
|
|||
|
||||
#include <spa/pod/command.h>
|
||||
|
||||
/* object id of SPA_TYPE_COMMAND_Node */
|
||||
enum spa_node_command {
|
||||
SPA_NODE_COMMAND_Suspend,
|
||||
SPA_NODE_COMMAND_Pause,
|
||||
|
|
@ -37,11 +38,11 @@ enum spa_node_command {
|
|||
SPA_NODE_COMMAND_Marker,
|
||||
};
|
||||
|
||||
#define SPA_NODE_COMMAND_ID(cmd) SPA_COMMAND_ID(cmd, SPA_ID_COMMAND_Node)
|
||||
#define SPA_NODE_COMMAND_ID(cmd) SPA_COMMAND_ID(cmd, SPA_TYPE_COMMAND_Node)
|
||||
|
||||
#define SPA_NODE_COMMAND_INIT(id) (struct spa_command) \
|
||||
{ { sizeof(struct spa_command_body), SPA_ID_Object }, \
|
||||
{ { id, SPA_ID_COMMAND_Node } } } \
|
||||
{ { sizeof(struct spa_command_body), SPA_TYPE_Object }, \
|
||||
{ { SPA_TYPE_COMMAND_Node, id } } } \
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue