node: add User command and event

Add a User command and event id with a String property called 'extra' to
make it possible to send arbitrary User defined commands and events.
Also makes it possible to make User commands in pw-cli.

pw-cli c 86 User '{ extra="{ test: foo }" }'
This commit is contained in:
Wim Taymans 2025-05-20 10:32:10 +02:00
parent 5a54ecd8df
commit 7dc1d28b2c
3 changed files with 28 additions and 2 deletions

View file

@ -36,12 +36,24 @@ enum spa_node_command {
SPA_NODE_COMMAND_ParamEnd, /**< end a transaction */
SPA_NODE_COMMAND_RequestProcess,/**< Sent to a driver when some other node emitted
* the RequestProcess event. */
SPA_NODE_COMMAND_User, /**< User defined command */
};
#define SPA_NODE_COMMAND_ID(cmd) SPA_COMMAND_ID(cmd, SPA_TYPE_COMMAND_Node)
#define SPA_NODE_COMMAND_INIT(id) SPA_COMMAND_INIT(SPA_TYPE_COMMAND_Node, id)
/* properties for SPA_TYPE_COMMAND_Node */
enum spa_command_node {
SPA_COMMAND_NODE_START,
SPA_COMMAND_NODE_START_User = 0x1000,
SPA_COMMAND_NODE_extra, /** extra info (String) */
SPA_COMMAND_NODE_START_CUSTOM = 0x1000000,
};
/**
* \}
*/