diff options
author | Wim Taymans <wtaymans@redhat.com> | 2019-12-19 13:15:10 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2019-12-19 13:36:04 +0100 |
commit | f391353c7f6b9b23c1d7e39c2b73200f04d8effb (patch) | |
tree | 8db4fc52ab00ba31dff590a3e8c447209f3989ff /src/tests | |
parent | 9657486a81dc67a7daa030b57b3c2a3df75656cf (diff) |
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.
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test-context.c | 5 | ||||
-rw-r--r-- | src/tests/test-interfaces.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/tests/test-context.c b/src/tests/test-context.c index 9fa38cf6..621103f8 100644 --- a/src/tests/test-context.c +++ b/src/tests/test-context.c @@ -22,6 +22,9 @@ * DEALINGS IN THE SOFTWARE. */ +#include <spa/support/dbus.h> +#include <spa/support/cpu.h> + #include <pipewire/pipewire.h> #include <pipewire/global.h> @@ -206,7 +209,7 @@ static void test_support(void) struct pw_context *context; const struct spa_support *support; uint32_t n_support; - uint32_t types[] = { + const char * types[] = { SPA_TYPE_INTERFACE_DataSystem, SPA_TYPE_INTERFACE_DataLoop, SPA_TYPE_INTERFACE_System, diff --git a/src/tests/test-interfaces.c b/src/tests/test-interfaces.c index 1a841fa9..82cc7647 100644 --- a/src/tests/test-interfaces.c +++ b/src/tests/test-interfaces.c @@ -48,7 +48,7 @@ static void test_core_abi(void) uint32_t version, size_t user_data_size); void * (*create_object) (void *object, const char *factory_name, - uint32_t type, + const char *type, uint32_t version, const struct spa_dict *props, size_t user_data_size); @@ -101,14 +101,14 @@ static void test_registry_abi(void) struct spa_hook *listener, const struct pw_registry_events *events, void *data); - void * (*bind) (void *object, uint32_t id, uint32_t type, uint32_t version, + void * (*bind) (void *object, uint32_t id, const char *type, uint32_t version, size_t user_data_size); int (*destroy) (void *object, uint32_t id); } methods = { PW_VERSION_REGISTRY_METHODS, }; struct { uint32_t version; void (*global) (void *object, uint32_t id, - uint32_t permissions, uint32_t type, uint32_t version, + uint32_t permissions, const char *type, uint32_t version, const struct spa_dict *props); void (*global_remove) (void *object, uint32_t id); } events = { PW_VERSION_REGISTRY_EVENTS, }; |