Make interface types a string

This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
This commit is contained in:
Wim Taymans 2019-12-19 13:15:10 +01:00
parent 9657486a81
commit f391353c7f
123 changed files with 791 additions and 1251 deletions

View file

@ -32,9 +32,10 @@ extern "C" {
#include <spa/utils/defs.h>
#include <spa/param/param.h>
struct pw_client_node;
#define PW_TYPE_INTERFACE_ClientNode PW_TYPE_INFO_INTERFACE_BASE "ClientNode"
#define PW_VERSION_CLIENT_NODE 3
struct pw_client_node;
#define PW_EXTENSION_MODULE_CLIENT_NODE PIPEWIRE_MODULE_PREFIX "module-client-node"

View file

@ -31,9 +31,10 @@ extern "C" {
#include <spa/utils/defs.h>
struct pw_metadata;
#define PW_TYPE_INTERFACE_Metadata PW_TYPE_INFO_INTERFACE_BASE "Metadata"
#define PW_VERSION_METADATA 3
struct pw_metadata;
#define PW_EXTENSION_MODULE_METADATA PIPEWIRE_MODULE_PREFIX "module-metadata"

View file

@ -36,7 +36,9 @@
extern "C" {
#endif
#define PW_VERSION_CLIENT_ENDPOINT 0
#define PW_TYPE_INTERFACE_ClientEndpoint PW_TYPE_INFO_INTERFACE_BASE "ClientEndpoint"
#define PW_VERSION_CLIENT_ENDPOINT 0
struct pw_client_endpoint;
#define PW_CLIENT_ENDPOINT_EVENT_SET_SESSION_ID 0
@ -166,6 +168,7 @@ struct pw_client_endpoint_methods {
#define pw_client_endpoint_update(o,...) pw_client_endpoint_method(o,update,0,__VA_ARGS__)
#define pw_client_endpoint_stream_update(o,...) pw_client_endpoint_method(o,stream_update,0,__VA_ARGS__)
#define PW_TYPE_INTERFACE_ClientSession PW_TYPE_INFO_INTERFACE_BASE "ClientSession"
#define PW_VERSION_CLIENT_SESSION 0
struct pw_client_session;

View file

@ -35,12 +35,19 @@
extern "C" {
#endif
#define PW_VERSION_SESSION 0
#define PW_TYPE_INTERFACE_Session PW_TYPE_INFO_INTERFACE_BASE "Session"
#define PW_VERSION_SESSION 0
struct pw_session;
#define PW_VERSION_ENDPOINT 0
#define PW_TYPE_INTERFACE_Endpoint PW_TYPE_INFO_INTERFACE_BASE "Endpoint"
#define PW_VERSION_ENDPOINT 0
struct pw_endpoint;
#define PW_VERSION_ENDPOINT_STREAM 0
#define PW_TYPE_INTERFACE_EndpointStream PW_TYPE_INFO_INTERFACE_BASE "EndpointStream"
#define PW_VERSION_ENDPOINT_STREAM 0
struct pw_endpoint_stream;
#define PW_TYPE_INTERFACE_EndpointLink PW_TYPE_INFO_INTERFACE_BASE "EndpointLink"
#define PW_VERSION_ENDPOINT_LINK 0
struct pw_endpoint_link;