rename core_proxy -> core

Rename core_proxy to core and move the introspect and interface
contents to core.h

In an effort to promote the proxy API.
This commit is contained in:
Wim Taymans 2019-12-11 07:46:59 +01:00
parent 8ea78c2e3f
commit ecc6b27cd7
54 changed files with 1068 additions and 1059 deletions

View file

@ -151,7 +151,7 @@ static void test_create(void)
spa_assert(pw_context_find_global(context, 0) == global);
spa_assert(pw_global_get_context(global) == context);
spa_assert(pw_global_get_type(global) == PW_TYPE_INTERFACE_Core);
spa_assert(pw_global_get_version(global) == PW_VERSION_CORE_PROXY);
spa_assert(pw_global_get_version(global) == PW_VERSION_CORE);
spa_assert(pw_global_get_id(global) == 0);
spa_assert(pw_global_get_object(global) == (void*)context);

View file

@ -42,7 +42,7 @@
#include <pipewire/properties.h>
#include <pipewire/protocol.h>
#include <pipewire/proxy.h>
#include <pipewire/core-proxy.h>
#include <pipewire/core.h>
#include <pipewire/resource.h>
#include <pipewire/stream.h>
#include <pipewire/thread-loop.h>

View file

@ -33,13 +33,13 @@ do { \
static void test_core_abi(void)
{
struct pw_core_proxy_methods m;
struct pw_core_proxy_events e;
struct pw_core_methods m;
struct pw_core_events e;
struct {
uint32_t version;
int (*add_listener) (void *object,
struct spa_hook *listener,
const struct pw_core_proxy_events *events,
const struct pw_core_events *events,
void *data);
int (*hello) (void *object, uint32_t version);
int (*sync) (void *object, uint32_t id, int seq);
@ -54,7 +54,7 @@ static void test_core_abi(void)
const struct spa_dict *props,
size_t user_data_size);
int (*destroy) (void *object, void *proxy);
} methods = { PW_VERSION_CORE_PROXY_METHODS, };
} methods = { PW_VERSION_CORE_METHODS, };
struct {
uint32_t version;
void (*info) (void *object, const struct pw_core_info *info);
@ -65,7 +65,7 @@ static void test_core_abi(void)
void (*bound_id) (void *object, uint32_t id, uint32_t global_id);
void (*add_mem) (void *object, uint32_t id, uint32_t type, int fd, uint32_t flags);
void (*remove_mem) (void *object, uint32_t id);
} events = { PW_VERSION_CORE_PROXY_EVENTS, };
} events = { PW_VERSION_CORE_EVENTS, };
TEST_FUNC(m, methods, version);
TEST_FUNC(m, methods, add_listener);
@ -76,7 +76,7 @@ static void test_core_abi(void)
TEST_FUNC(m, methods, get_registry);
TEST_FUNC(m, methods, create_object);
TEST_FUNC(m, methods, destroy);
spa_assert(PW_VERSION_CORE_PROXY_METHODS == 0);
spa_assert(PW_VERSION_CORE_METHODS == 0);
spa_assert(sizeof(m) == sizeof(methods));
TEST_FUNC(e, events, version);
@ -88,7 +88,7 @@ static void test_core_abi(void)
TEST_FUNC(e, events, bound_id);
TEST_FUNC(e, events, add_mem);
TEST_FUNC(e, events, remove_mem);
spa_assert(PW_VERSION_CORE_PROXY_EVENTS == 0);
spa_assert(PW_VERSION_CORE_EVENTS == 0);
spa_assert(sizeof(e) == sizeof(events));
}

View file

@ -134,7 +134,7 @@ static void test_create(void)
{
struct pw_main_loop *loop;
struct pw_context *context;
struct pw_core_proxy *core_proxy;
struct pw_core *core;
struct pw_stream *stream;
struct pw_stream_events stream_events = stream_events_error;
struct spa_hook listener = { 0, };
@ -147,9 +147,9 @@ static void test_create(void)
PW_KEY_CORE_DAEMON, "1",
NULL), 12);
spa_assert(context != NULL);
core_proxy = pw_context_connect_self(context, NULL, 0);
spa_assert(core_proxy != NULL);
stream = pw_stream_new(core_proxy, "test", NULL);
core = pw_context_connect_self(context, NULL, 0);
spa_assert(core != NULL);
stream = pw_stream_new(core, "test", NULL);
spa_assert(stream != NULL);
pw_stream_add_listener(stream, &listener, &stream_events, stream);
@ -186,7 +186,7 @@ static void test_properties(void)
{
struct pw_main_loop *loop;
struct pw_context *context;
struct pw_core_proxy *core_proxy;
struct pw_core *core;
const struct pw_properties *props;
struct pw_stream *stream;
struct pw_stream_events stream_events = stream_events_error;
@ -199,9 +199,9 @@ static void test_properties(void)
PW_KEY_CORE_DAEMON, "1",
NULL), 12);
spa_assert(context != NULL);
core_proxy = pw_context_connect_self(context, NULL, 0);
spa_assert(core_proxy != NULL);
stream = pw_stream_new(core_proxy, "test",
core = pw_context_connect_self(context, NULL, 0);
spa_assert(core != NULL);
stream = pw_stream_new(core, "test",
pw_properties_new("foo", "bar",
"biz", "fuzz",
NULL));