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

@ -593,9 +593,9 @@ static void
on_remote_data(void *data, int fd, uint32_t mask)
{
struct client *impl = data;
struct pw_core_proxy *this = impl->this.core_proxy;
struct pw_core *this = impl->this.core;
struct pw_protocol_native_connection *conn = impl->connection;
struct pw_context *context = pw_core_proxy_get_context(this);
struct pw_context *context = pw_core_get_context(this);
struct pw_loop *loop = pw_context_get_main_loop(context);
int res;
@ -643,7 +643,7 @@ on_remote_data(void *data, int fd, uint32_t mask)
spa_debug_pod(0, NULL, (struct spa_pod *)msg->data);
}
proxy = pw_core_proxy_find_proxy(this, msg->id);
proxy = pw_core_find_proxy(this, msg->id);
if (proxy == NULL || proxy->zombie) {
if (proxy == NULL)
pw_log_error(NAME" %p: could not find proxy %u", this, msg->id);
@ -683,7 +683,7 @@ on_remote_data(void *data, int fd, uint32_t mask)
error:
pw_log_error(NAME" %p: got connection error %d (%s)", impl, res, spa_strerror(res));
pw_proxy_notify((struct pw_proxy*)this,
struct pw_core_proxy_events, error, 0, 0,
struct pw_core_events, error, 0, 0,
this->recv_seq, res, "connection error");
pw_loop_destroy_source(loop, impl->source);
impl->source = NULL;
@ -1006,28 +1006,28 @@ const static struct pw_protocol_implementaton protocol_impl = {
static struct spa_pod_builder *
impl_ext_begin_proxy(struct pw_proxy *proxy, uint8_t opcode, struct pw_protocol_native_message **msg)
{
struct client *impl = SPA_CONTAINER_OF(proxy->core_proxy->conn, struct client, this);
struct client *impl = SPA_CONTAINER_OF(proxy->core->conn, struct client, this);
return pw_protocol_native_connection_begin(impl->connection, proxy->id, opcode, msg);
}
static uint32_t impl_ext_add_proxy_fd(struct pw_proxy *proxy, int fd)
{
struct client *impl = SPA_CONTAINER_OF(proxy->core_proxy->conn, struct client, this);
struct client *impl = SPA_CONTAINER_OF(proxy->core->conn, struct client, this);
return pw_protocol_native_connection_add_fd(impl->connection, fd);
}
static int impl_ext_get_proxy_fd(struct pw_proxy *proxy, uint32_t index)
{
struct client *impl = SPA_CONTAINER_OF(proxy->core_proxy->conn, struct client, this);
struct client *impl = SPA_CONTAINER_OF(proxy->core->conn, struct client, this);
return pw_protocol_native_connection_get_fd(impl->connection, index);
}
static int impl_ext_end_proxy(struct pw_proxy *proxy,
struct spa_pod_builder *builder)
{
struct pw_core_proxy *core_proxy = proxy->core_proxy;
struct client *impl = SPA_CONTAINER_OF(core_proxy->conn, struct client, this);
return core_proxy->send_seq = pw_protocol_native_connection_end(impl->connection, builder);
struct pw_core *core = proxy->core;
struct client *impl = SPA_CONTAINER_OF(core->conn, struct client, this);
return core->send_seq = pw_protocol_native_connection_end(impl->connection, builder);
}
static struct spa_pod_builder *