pw_client -> pw_impl_client

This commit is contained in:
Wim Taymans 2019-12-11 11:21:43 +01:00
parent d70a47b7fe
commit 95688939bf
40 changed files with 236 additions and 236 deletions

View file

@ -50,7 +50,7 @@ struct impl {
struct spa_hook module_listener;
};
static int check_cmdline(struct pw_client *client, int pid, const char *str)
static int check_cmdline(struct pw_impl_client *client, int pid, const char *str)
{
char path[2048];
int fd;
@ -75,7 +75,7 @@ static int check_cmdline(struct pw_client *client, int pid, const char *str)
return 0;
}
static int check_flatpak(struct pw_client *client, int pid)
static int check_flatpak(struct pw_impl_client *client, int pid)
{
char root_path[2048];
int root_fd, info_fd, res;
@ -112,7 +112,7 @@ static int check_flatpak(struct pw_client *client, int pid)
}
static void
context_check_access(void *data, struct pw_client *client)
context_check_access(void *data, struct pw_impl_client *client)
{
struct impl *impl = data;
struct pw_permission permissions[1];
@ -122,7 +122,7 @@ context_check_access(void *data, struct pw_client *client)
int pid, res;
pid = -EINVAL;
if ((props = pw_client_get_properties(client)) != NULL) {
if ((props = pw_impl_client_get_properties(client)) != NULL) {
if ((str = pw_properties_get(props, PW_KEY_SEC_PID)) != NULL)
pid = atoi(str);
}
@ -175,18 +175,18 @@ context_check_access(void *data, struct pw_client *client)
granted:
pw_log_debug("module %p: client %p access granted", impl, client);
permissions[0] = PW_PERMISSION_INIT(-1, PW_PERM_RWX);
pw_client_update_permissions(client, 1, permissions);
pw_impl_client_update_permissions(client, 1, permissions);
return;
wait_permissions:
pw_log_debug("module %p: client %p wait for permissions", impl, client);
pw_client_update_properties(client, &SPA_DICT_INIT(items, 1));
pw_client_set_busy(client, true);
pw_impl_client_update_properties(client, &SPA_DICT_INIT(items, 1));
pw_impl_client_set_busy(client, true);
return;
blacklisted:
pw_resource_error(pw_client_get_core_resource(client), res, "blacklisted");
pw_client_update_properties(client, &SPA_DICT_INIT(items, 1));
pw_resource_error(pw_impl_client_get_core_resource(client), res, "blacklisted");
pw_impl_client_update_properties(client, &SPA_DICT_INIT(items, 1));
return;
}

View file

@ -101,7 +101,7 @@ static void node_free(void *data)
static void node_initialized(void *data)
{
struct node_data *nd = data;
struct pw_client *client;
struct pw_impl_client *client;
struct pw_resource *bound_resource;
struct pw_global *global;
int res;
@ -117,7 +117,7 @@ static void node_initialized(void *data)
if (res < 0)
goto error_bind;
if ((bound_resource = pw_client_find_resource(client, nd->new_id)) == NULL)
if ((bound_resource = pw_impl_client_find_resource(client, nd->new_id)) == NULL)
goto error_bind;
pw_resource_add_listener(bound_resource, &nd->resource_listener, &resource_events, nd);
@ -144,7 +144,7 @@ static void *create_object(void *_data,
uint32_t new_id)
{
struct factory_data *d = _data;
struct pw_client *client;
struct pw_impl_client *client;
struct pw_node *adapter, *slave;
const char *str, *factory_name;
int res;

View file

@ -69,7 +69,7 @@ static void *create_object(void *_data,
struct pw_factory *this = data->this;
void *result;
struct pw_resource *device_resource;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_impl_client *client = pw_resource_get_client(resource);
int res;
device_resource = pw_resource_new(client, new_id, PW_PERM_RWX, type, version, 0);
@ -88,7 +88,7 @@ static void *create_object(void *_data,
pw_properties_setf(properties, PW_KEY_FACTORY_ID, "%d",
pw_global_get_id(pw_factory_get_global(this)));
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%d",
pw_global_get_id(pw_client_get_global(client)));
pw_global_get_id(pw_impl_client_get_global(client)));
result = pw_client_device_new(device_resource, properties);
if (result == NULL) {

View file

@ -118,8 +118,8 @@ struct pw_device *pw_client_device_new(struct pw_resource *resource,
{
struct impl *impl;
struct pw_device *device;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_context *context = pw_client_get_context(client);
struct pw_impl_client *client = pw_resource_get_client(resource);
struct pw_context *context = pw_impl_client_get_context(client);
if (properties == NULL)
properties = pw_properties_new(NULL, NULL);

View file

@ -71,7 +71,7 @@ static void *create_object(void *_data,
{
void *result;
struct pw_resource *node_resource;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_impl_client *client = pw_resource_get_client(resource);
int res;
node_resource = pw_resource_new(client, new_id, PW_PERM_RWX, type, version, 0);

View file

@ -119,7 +119,7 @@ struct node {
struct spa_callbacks callbacks;
struct pw_resource *resource;
struct pw_client *client;
struct pw_impl_client *client;
struct spa_source data_source;
int writefd;
@ -1200,7 +1200,7 @@ void pw_client_node_registered(struct pw_client_node *this, struct pw_global *gl
{
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this);
struct pw_node *node = this->node;
struct pw_client *client = impl->node.client;
struct pw_impl_client *client = impl->node.client;
uint32_t node_id = global->id;
struct pw_memblock *m;
@ -1618,8 +1618,8 @@ struct pw_client_node *pw_client_node_new(struct pw_resource *resource,
{
struct impl *impl;
struct pw_client_node *this;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_context *context = pw_client_get_context(client);
struct pw_impl_client *client = pw_resource_get_client(resource);
struct pw_context *context = pw_impl_client_get_context(client);
const struct spa_support *support;
uint32_t n_support;
int res;

View file

@ -366,11 +366,11 @@ impl_node_sync(void *object, int seq)
return this->init_pending;
}
extern uint32_t pw_protocol_native0_type_from_v2(struct pw_client *client, uint32_t type);
extern uint32_t pw_protocol_native0_type_to_v2(struct pw_client *client, uint32_t type);
extern uint32_t pw_protocol_native0_type_from_v2(struct pw_impl_client *client, uint32_t type);
extern uint32_t pw_protocol_native0_type_to_v2(struct pw_impl_client *client, uint32_t type);
extern struct spa_pod *pw_protocol_native0_pod_from_v2(struct pw_client *client, const struct spa_pod *pod);
extern int pw_protocol_native0_pod_to_v2(struct pw_client *client, const struct spa_pod *pod,
extern struct spa_pod *pw_protocol_native0_pod_from_v2(struct pw_impl_client *client, const struct spa_pod *pod);
extern int pw_protocol_native0_pod_to_v2(struct pw_impl_client *client, const struct spa_pod *pod,
struct spa_pod_builder *b);
static void
@ -1255,8 +1255,8 @@ struct pw_client_node0 *pw_client_node0_new(struct pw_resource *resource,
{
struct impl *impl;
struct pw_client_node0 *this;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_context *context = pw_client_get_context(client);
struct pw_impl_client *client = pw_resource_get_client(resource);
struct pw_context *context = pw_impl_client_get_context(client);
const struct spa_support *support;
uint32_t n_support;
const char *name;

View file

@ -35,10 +35,10 @@
#define PW_PROTOCOL_NATIVE_FLAG_REMAP (1<<0)
extern uint32_t pw_protocol_native0_find_type(struct pw_client *client, const char *type);
extern int pw_protocol_native0_pod_to_v2(struct pw_client *client, const struct spa_pod *pod,
extern uint32_t pw_protocol_native0_find_type(struct pw_impl_client *client, const char *type);
extern int pw_protocol_native0_pod_to_v2(struct pw_impl_client *client, const struct spa_pod *pod,
struct spa_pod_builder *b);
extern uint32_t pw_protocol_native0_type_to_v2(struct pw_client *client,
extern uint32_t pw_protocol_native0_type_to_v2(struct pw_impl_client *client,
const struct spa_type_info *info, uint32_t type);
static void
@ -130,7 +130,7 @@ static void
client_node_marshal_command(void *object, uint32_t seq, const struct spa_command *command)
{
struct pw_resource *resource = object;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
struct spa_pod_builder *b;
struct spa_pod_frame f;
@ -188,7 +188,7 @@ client_node_marshal_port_set_param(void *object,
const struct spa_pod *param)
{
struct pw_resource *resource = object;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
struct spa_pod_builder *b;
struct spa_pod_frame f;
const char *typename;
@ -227,7 +227,7 @@ client_node_marshal_port_use_buffers(void *object,
uint32_t n_buffers, struct pw_client_node0_buffer *buffers)
{
struct pw_resource *resource = object;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
struct spa_pod_builder *b;
struct spa_pod_frame f;
uint32_t i, j;
@ -280,7 +280,7 @@ client_node_marshal_port_command(void *object,
const struct spa_command *command)
{
struct pw_resource *resource = object;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
struct spa_pod_builder *b;
struct spa_pod_frame f;

View file

@ -112,7 +112,7 @@ static void link_destroy(void *data)
static void link_initialized(void *data)
{
struct link_data *ld = data;
struct pw_client *client = pw_resource_get_client(ld->factory_resource);
struct pw_impl_client *client = pw_resource_get_client(ld->factory_resource);
int res;
ld->global = pw_link_get_global(ld->link);
@ -123,7 +123,7 @@ static void link_initialized(void *data)
goto error_bind;
if (!ld->linger) {
ld->resource = pw_client_find_resource(client, ld->new_id);
ld->resource = pw_impl_client_find_resource(client, ld->new_id);
if (ld->resource == NULL) {
res = -ENOENT;
goto error_bind;
@ -178,7 +178,7 @@ static void *create_object(void *_data,
uint32_t new_id)
{
struct factory_data *d = _data;
struct pw_client *client = NULL;
struct pw_impl_client *client = NULL;
struct pw_node *output_node, *input_node;
struct pw_port *outport, *inport;
struct pw_context *context;
@ -192,7 +192,7 @@ static void *create_object(void *_data,
bool linger;
client = pw_resource_get_client(resource);
context = pw_client_get_context(client);
context = pw_impl_client_get_context(client);
if (properties == NULL)
goto error_properties;

View file

@ -69,7 +69,7 @@ static void *create_object(void *_data,
{
void *result;
struct pw_resource *metadata_resource;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_impl_client *client = pw_resource_get_client(resource);
int res;
metadata_resource = pw_resource_new(client, new_id, PW_PERM_RWX, type, version, 0);
@ -79,7 +79,7 @@ static void *create_object(void *_data,
}
pw_log_debug(".");
result = pw_metadata_new(pw_client_get_context(client), metadata_resource, properties);
result = pw_metadata_new(pw_impl_client_get_context(client), metadata_resource, properties);
if (result == NULL) {
res = -errno;
goto error_node;

View file

@ -109,7 +109,7 @@ static const struct pw_resource_events resource_events = {
};
static int
global_bind(void *_data, struct pw_client *client, uint32_t permissions,
global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions,
uint32_t version, uint32_t id)
{
struct impl *impl = _data;

View file

@ -107,8 +107,8 @@ struct pw_device *pw_client_device_new(struct pw_resource *resource,
{
struct impl *impl;
struct pw_device *device;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_context *context = pw_client_get_context(client);
struct pw_impl_client *client = pw_resource_get_client(resource);
struct pw_context *context = pw_impl_client_get_context(client);
if (properties == NULL)
properties = pw_properties_new(NULL, NULL);

View file

@ -105,7 +105,7 @@ struct server {
};
struct client_data {
struct pw_client *client;
struct pw_impl_client *client;
struct spa_hook client_listener;
struct spa_source *source;
@ -122,7 +122,7 @@ static void
process_messages(struct client_data *data)
{
struct pw_protocol_native_connection *conn = data->connection;
struct pw_client *client = data->client;
struct pw_impl_client *client = data->client;
struct pw_context *context = client->context;
const struct pw_protocol_native_message *msg;
struct pw_resource *resource;
@ -162,7 +162,7 @@ process_messages(struct client_data *data)
spa_debug_pod(0, NULL, (struct spa_pod *)msg->data);
}
resource = pw_client_find_resource(client, msg->id);
resource = pw_impl_client_find_resource(client, msg->id);
if (resource == NULL) {
pw_log_error(NAME" %p: unknown resource %u op:%u",
client->protocol, msg->id, msg->opcode);
@ -204,7 +204,7 @@ invalid_method:
client->protocol, msg->id, msg->opcode);
pw_resource_errorf(resource, -EINVAL, "invalid method id:%u op:%u",
msg->id, msg->opcode);
pw_client_destroy(client);
pw_impl_client_destroy(client);
goto done;
invalid_message:
pw_log_error(NAME" %p: invalid message received id:%u op:%u (%s)",
@ -212,11 +212,11 @@ invalid_message:
pw_resource_errorf(resource, res, "invalid message received id:%u op:%u (%s)",
msg->id, msg->opcode, spa_strerror(res));
spa_debug_pod(0, NULL, (struct spa_pod *)msg->data);
pw_client_destroy(client);
pw_impl_client_destroy(client);
goto done;
error:
pw_log_error(NAME" %p: client error (%s)", client->protocol, spa_strerror(res));
pw_client_destroy(client);
pw_impl_client_destroy(client);
goto done;
}
@ -224,7 +224,7 @@ static void
client_busy_changed(void *data, bool busy)
{
struct client_data *c = data;
struct pw_client *client = c->client;
struct pw_impl_client *client = c->client;
uint32_t mask = c->source->mask;
c->busy = busy;
@ -243,17 +243,17 @@ static void
connection_data(void *data, int fd, uint32_t mask)
{
struct client_data *this = data;
struct pw_client *client = this->client;
struct pw_impl_client *client = this->client;
int res;
if (mask & SPA_IO_HUP) {
pw_log_info(NAME" %p: client %p disconnected", client->protocol, client);
pw_client_destroy(client);
pw_impl_client_destroy(client);
return;
}
if (mask & SPA_IO_ERR) {
pw_log_error(NAME" %p: client %p error", client->protocol, client);
pw_client_destroy(client);
pw_impl_client_destroy(client);
return;
}
if (mask & SPA_IO_OUT) {
@ -266,7 +266,7 @@ connection_data(void *data, int fd, uint32_t mask)
} else if (res != EAGAIN) {
pw_log_error("client %p: could not flush: %s",
client, spa_strerror(res));
pw_client_destroy(client);
pw_impl_client_destroy(client);
return;
}
}
@ -277,7 +277,7 @@ connection_data(void *data, int fd, uint32_t mask)
static void client_free(void *data)
{
struct client_data *this = data;
struct pw_client *client = this->client;
struct pw_impl_client *client = this->client;
spa_list_remove(&client->protocol_link);
@ -289,8 +289,8 @@ static void client_free(void *data)
pw_map_clear(&this->compat_v2.types);
}
static const struct pw_client_events client_events = {
PW_VERSION_CLIENT_EVENTS,
static const struct pw_impl_client_events client_events = {
PW_VERSION_IMPL_CLIENT_EVENTS,
.free = client_free,
.busy_changed = client_busy_changed,
};
@ -298,7 +298,7 @@ static const struct pw_client_events client_events = {
static void on_start(void *data, uint32_t version)
{
struct client_data *this = data;
struct pw_client *client = this->client;
struct pw_impl_client *client = this->client;
struct pw_context *context = client->context;
pw_log_debug("version %d", version);
@ -321,7 +321,7 @@ static const struct pw_protocol_native_connection_events server_conn_events = {
static struct client_data *client_new(struct server *s, int fd)
{
struct client_data *this;
struct pw_client *client;
struct pw_impl_client *client;
struct pw_protocol *protocol = s->this.protocol;
socklen_t len;
struct ucred ucred;
@ -355,14 +355,14 @@ static struct client_data *client_new(struct server *s, int fd)
pw_properties_setf(props, PW_KEY_MODULE_ID, "%d", d->module->global->id);
client = pw_client_new(protocol->context,
client = pw_impl_client_new(protocol->context,
props,
sizeof(struct client_data));
if (client == NULL)
goto exit;
this = pw_client_get_user_data(client);
this = pw_impl_client_get_user_data(client);
client->protocol = protocol;
spa_list_append(&s->this.client_list, &client->protocol_link);
@ -388,9 +388,9 @@ static struct client_data *client_new(struct server *s, int fd)
&server_conn_events,
this);
pw_client_add_listener(client, &this->client_listener, &client_events, this);
pw_impl_client_add_listener(client, &this->client_listener, &client_events, this);
if ((res = pw_client_register(client, NULL)) < 0)
if ((res = pw_impl_client_register(client, NULL)) < 0)
goto cleanup_client;
if (!client->busy)
@ -400,7 +400,7 @@ static struct client_data *client_new(struct server *s, int fd)
return this;
cleanup_client:
pw_client_destroy(client);
pw_impl_client_destroy(client);
errno = -res;
exit:
return NULL;
@ -792,7 +792,7 @@ static int pw_protocol_native_connect_internal(struct pw_protocol_client *client
}
permissions[0].id = SPA_ID_INVALID;
permissions[0].permissions = PW_PERM_RWX;
pw_client_update_permissions(c->client, 1, permissions);
pw_impl_client_update_permissions(c->client, 1, permissions);
res = pw_protocol_client_connect_fd(client, sv[1], true);
done:
@ -868,13 +868,13 @@ error_free:
static void destroy_server(struct pw_protocol_server *server)
{
struct server *s = SPA_CONTAINER_OF(server, struct server, this);
struct pw_client *client, *tmp;
struct pw_impl_client *client, *tmp;
spa_list_remove(&server->link);
spa_hook_remove(&s->hook);
spa_list_for_each_safe(client, tmp, &server->client_list, protocol_link)
pw_client_destroy(client);
pw_impl_client_destroy(client);
if (s->source) {
spa_hook_remove(&s->hook);
@ -893,7 +893,7 @@ static void on_before_hook(void *_data)
{
struct server *server = _data;
struct pw_protocol_server *this = &server->this;
struct pw_client *client, *tmp;
struct pw_impl_client *client, *tmp;
struct client_data *data;
int res;
@ -909,7 +909,7 @@ static void on_before_hook(void *_data)
} else if (res < 0) {
pw_log_warn("client %p: could not flush: %s",
data->client, spa_strerror(res));
pw_client_destroy(client);
pw_impl_client_destroy(client);
}
}
@ -1052,7 +1052,7 @@ static int impl_ext_end_resource(struct pw_resource *resource,
struct spa_pod_builder *builder)
{
struct client_data *data = resource->client->user_data;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
return client->send_seq = pw_protocol_native_connection_end(data->connection, builder);
}
const static struct pw_protocol_native_ext protocol_ext_impl = {

View file

@ -630,7 +630,7 @@ static int core_method_demarshal_create_object(void *object, const struct pw_pro
static int core_method_demarshal_destroy(void *object, const struct pw_protocol_native_message *msg)
{
struct pw_resource *resource = object;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_impl_client *client = pw_resource_get_client(resource);
struct pw_resource *r;
struct spa_pod_parser prs;
uint32_t id;
@ -642,7 +642,7 @@ static int core_method_demarshal_destroy(void *object, const struct pw_protocol_
pw_log_debug("client %p: destroy resource %u", client, id);
if ((r = pw_client_find_resource(client, id)) == NULL)
if ((r = pw_impl_client_find_resource(client, id)) == NULL)
goto no_resource;
return pw_resource_notify(resource, struct pw_core_methods, destroy, 0, r);

View file

@ -37,7 +37,7 @@
#define PW_PROTOCOL_NATIVE_FLAG_REMAP (1<<0)
SPA_EXPORT
uint32_t pw_protocol_native0_find_type(struct pw_client *client, const char *type)
uint32_t pw_protocol_native0_find_type(struct pw_impl_client *client, const char *type)
{
uint32_t i;
for (i = 0; i < SPA_N_ELEMENTS(type_map); i++) {
@ -169,7 +169,7 @@ static int core_demarshal_client_update(void *object, const struct pw_protocol_n
NULL) < 0)
return -EINVAL;
}
pw_client_update_properties(resource->client, &props);
pw_impl_client_update_properties(resource->client, &props);
return 0;
}
@ -195,7 +195,7 @@ static int core_demarshal_permissions(void *object, const struct pw_protocol_nat
return -EINVAL;
}
/* FIXME */
//return pw_resource_notify(resource, struct pw_client_proxy_methods, update_permissions, 0,
//return pw_resource_notify(resource, struct pw_impl_client_proxy_methods, update_permissions, 0,
// n_permissions, permissions);
return 0;
}
@ -243,7 +243,7 @@ static int core_demarshal_get_registry(void *object, const struct pw_protocol_na
}
SPA_EXPORT
uint32_t pw_protocol_native0_type_from_v2(struct pw_client *client, uint32_t type)
uint32_t pw_protocol_native0_type_from_v2(struct pw_impl_client *client, uint32_t type)
{
void *t;
uint32_t index;
@ -260,7 +260,7 @@ uint32_t pw_protocol_native0_type_from_v2(struct pw_client *client, uint32_t typ
}
SPA_EXPORT
uint32_t pw_protocol_native0_type_to_v2(struct pw_client *client,
uint32_t pw_protocol_native0_type_to_v2(struct pw_impl_client *client,
const struct spa_type_info *info, uint32_t type)
{
uint32_t i;
@ -310,7 +310,7 @@ struct spa_pod_prop_body0 {
(iter) <= SPA_MEMBER((body), (_size)-(body)->value.size, __typeof__(*iter)); \
(iter) = SPA_MEMBER((iter), (body)->value.size, __typeof__(*iter)))
static int remap_from_v2(uint32_t type, void *body, uint32_t size, struct pw_client *client,
static int remap_from_v2(uint32_t type, void *body, uint32_t size, struct pw_impl_client *client,
struct spa_pod_builder *builder)
{
int res;
@ -428,7 +428,7 @@ static int remap_from_v2(uint32_t type, void *body, uint32_t size, struct pw_cli
return 0;
}
static int remap_to_v2(struct pw_client *client, const struct spa_type_info *info,
static int remap_to_v2(struct pw_impl_client *client, const struct spa_type_info *info,
uint32_t type, void *body, uint32_t size,
struct spa_pod_builder *builder)
{
@ -548,7 +548,7 @@ static int remap_to_v2(struct pw_client *client, const struct spa_type_info *inf
SPA_EXPORT
struct spa_pod * pw_protocol_native0_pod_from_v2(struct pw_client *client, const struct spa_pod *pod)
struct spa_pod * pw_protocol_native0_pod_from_v2(struct pw_impl_client *client, const struct spa_pod *pod)
{
uint8_t buffer[4096];
struct spa_pod *copy;
@ -571,7 +571,7 @@ struct spa_pod * pw_protocol_native0_pod_from_v2(struct pw_client *client, const
}
SPA_EXPORT
int pw_protocol_native0_pod_to_v2(struct pw_client *client, const struct spa_pod *pod,
int pw_protocol_native0_pod_to_v2(struct pw_impl_client *client, const struct spa_pod *pod,
struct spa_pod_builder *b)
{
int res;
@ -594,7 +594,7 @@ int pw_protocol_native0_pod_to_v2(struct pw_client *client, const struct spa_pod
static int core_demarshal_create_object(void *object, const struct pw_protocol_native_message *msg)
{
struct pw_resource *resource = object;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_impl_client *client = pw_resource_get_client(resource);
struct spa_pod_parser prs;
struct spa_pod_frame f;
uint32_t version, type, new_id, i;
@ -630,7 +630,7 @@ static int core_demarshal_create_object(void *object, const struct pw_protocol_n
static int core_demarshal_destroy(void *object, const struct pw_protocol_native_message *msg)
{
struct pw_resource *resource = object, *r;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_impl_client *client = pw_resource_get_client(resource);
struct spa_pod_parser prs;
uint32_t id;
@ -641,7 +641,7 @@ static int core_demarshal_destroy(void *object, const struct pw_protocol_native_
pw_log_debug("client %p: destroy resource %u", client, id);
if ((r = pw_client_find_resource(client, id)) == NULL)
if ((r = pw_impl_client_find_resource(client, id)) == NULL)
goto no_resource;
return pw_resource_notify(resource, struct pw_core_methods, destroy, 0, r);
@ -655,7 +655,7 @@ no_resource:
static int core_demarshal_update_types_server(void *object, const struct pw_protocol_native_message *msg)
{
struct pw_resource *resource = object;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_impl_client *client = pw_resource_get_client(resource);
struct protocol_compat_v2 *compat_v2 = client->compat_v2;
struct spa_pod_parser prs;
uint32_t first_id, n_types;
@ -689,7 +689,7 @@ static void registry_marshal_global(void *object, uint32_t id, uint32_t permissi
uint32_t type, uint32_t version, const struct spa_dict *props)
{
struct pw_resource *resource = object;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
struct spa_pod_builder *b;
struct spa_pod_frame f;
uint32_t i, n_items, parent_id;
@ -785,7 +785,7 @@ static void module_marshal_info(void *object, const struct pw_module_info *info)
static void factory_marshal_info(void *object, const struct pw_factory_info *info)
{
struct pw_resource *resource = object;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
struct spa_pod_builder *b;
struct spa_pod_frame f;
uint32_t i, n_items, type, version;
@ -866,7 +866,7 @@ static void node_marshal_param(void *object, int seq, uint32_t id, uint32_t inde
static int node_demarshal_enum_params(void *object, const struct pw_protocol_native_message *msg)
{
struct pw_resource *resource = object;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
struct spa_pod_parser prs;
uint32_t id, index, num;
struct spa_pod *filter;
@ -918,7 +918,7 @@ static void port_marshal_param(void *object, int seq, uint32_t id, uint32_t inde
const struct spa_pod *param)
{
struct pw_resource *resource = object;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource, PW_PORT_PROXY_V0_EVENT_PARAM, NULL);
@ -933,7 +933,7 @@ static void port_marshal_param(void *object, int seq, uint32_t id, uint32_t inde
static int port_demarshal_enum_params(void *object, const struct pw_protocol_native_message *msg)
{
struct pw_resource *resource = object;
struct pw_client *client = resource->client;
struct pw_impl_client *client = resource->client;
struct spa_pod_parser prs;
uint32_t id, index, num;
struct spa_pod *filter;

View file

@ -168,8 +168,8 @@ static void *create_object(void *data,
struct factory_data *d = data;
struct pw_factory *factory = d->factory;
struct client_endpoint *this;
struct pw_client *owner = pw_resource_get_client(owner_resource);
struct pw_context *context = pw_client_get_context(owner);
struct pw_impl_client *owner = pw_resource_get_client(owner_resource);
struct pw_context *context = pw_impl_client_get_context(owner);
this = calloc(1, sizeof(struct client_endpoint));
if (this == NULL)

View file

@ -167,8 +167,8 @@ static void *create_object(void *data,
struct factory_data *d = data;
struct pw_factory *factory = d->factory;
struct client_session *this;
struct pw_client *owner = pw_resource_get_client(owner_resource);
struct pw_context *context = pw_client_get_context(owner);
struct pw_impl_client *owner = pw_resource_get_client(owner_resource);
struct pw_context *context = pw_impl_client_get_context(owner);
this = calloc(1, sizeof(struct client_session));
if (this == NULL)

View file

@ -255,7 +255,7 @@ static const struct pw_resource_events resource_events = {
.destroy = endpoint_link_unbind,
};
static int endpoint_link_bind(void *_data, struct pw_client *client,
static int endpoint_link_bind(void *_data, struct pw_impl_client *client,
uint32_t permissions, uint32_t version, uint32_t id)
{
struct endpoint_link *this = _data;

View file

@ -237,7 +237,7 @@ static const struct pw_resource_events resource_events = {
.destroy = endpoint_stream_unbind,
};
static int endpoint_stream_bind(void *_data, struct pw_client *client,
static int endpoint_stream_bind(void *_data, struct pw_impl_client *client,
uint32_t permissions, uint32_t version, uint32_t id)
{
struct endpoint_stream *this = _data;

View file

@ -259,7 +259,7 @@ static const struct pw_resource_events resource_events = {
.destroy = endpoint_unbind,
};
static int endpoint_bind(void *_data, struct pw_client *client,
static int endpoint_bind(void *_data, struct pw_impl_client *client,
uint32_t permissions, uint32_t version, uint32_t id)
{
struct endpoint *this = _data;

View file

@ -229,7 +229,7 @@ static const struct pw_resource_events resource_events = {
.destroy = session_unbind,
};
static int session_bind(void *_data, struct pw_client *client,
static int session_bind(void *_data, struct pw_impl_client *client,
uint32_t permissions, uint32_t version, uint32_t id)
{
struct session *this = _data;

View file

@ -87,7 +87,7 @@ static void *create_object(void *_data,
struct pw_device *device;
const char *factory_name;
struct device_data *nd;
struct pw_client *client;
struct pw_impl_client *client;
int res;
if (properties == NULL)
@ -104,7 +104,7 @@ static void *create_object(void *_data,
if (client) {
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%d",
pw_global_get_id(pw_client_get_global(client)));
pw_global_get_id(pw_impl_client_get_global(client)));
}
device = pw_spa_device_load(context,

View file

@ -106,7 +106,7 @@ static void *create_object(void *_data,
const char *factory_name;
struct node_data *nd;
int res;
struct pw_client *client;
struct pw_impl_client *client;
if (properties == NULL)
goto error_properties;
@ -122,7 +122,7 @@ static void *create_object(void *_data,
if (client) {
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%d",
pw_global_get_id(pw_client_get_global(client)));
pw_global_get_id(pw_impl_client_get_global(client)));
}
node = pw_spa_node_load(context,
@ -150,7 +150,7 @@ static void *create_object(void *_data,
if (res < 0)
goto error_bind;
if ((bound_resource = pw_client_find_resource(client, new_id)) == NULL)
if ((bound_resource = pw_impl_client_find_resource(client, new_id)) == NULL)
goto error_bind;
pw_resource_add_listener(bound_resource, &nd->resource_listener, &resource_events, nd);