pw_client_node_proxy -> pw_client_node

This commit is contained in:
Wim Taymans 2019-12-11 16:13:46 +01:00
parent c23006fcdb
commit 743450a19f
11 changed files with 233 additions and 233 deletions

View file

@ -131,7 +131,7 @@ struct node {
};
struct impl {
struct pw_client_node0 this;
struct pw_impl_client_node0 this;
bool client_reuse;
@ -1010,8 +1010,8 @@ static void client_node0_event(void *data, struct spa_event *event)
spa_node_emit_event(&this->hooks, event);
}
static struct pw_client_node0_proxy_methods client_node0_methods = {
PW_VERSION_CLIENT_NODE0_PROXY_METHODS,
static struct pw_client_node0_methods client_node0_methods = {
PW_VERSION_CLIENT_NODE0_METHODS,
.done = client_node0_done,
.update = client_node0_update,
.port_update = client_node0_port_update,
@ -1139,7 +1139,7 @@ static int do_remove_source(struct spa_loop *loop,
static void client_node0_resource_destroy(void *data)
{
struct impl *impl = data;
struct pw_client_node0 *this = &impl->this;
struct pw_impl_client_node0 *this = &impl->this;
struct node *node = &impl->node;
pw_log_debug("client-node %p: destroy", impl);
@ -1163,7 +1163,7 @@ static void client_node0_resource_destroy(void *data)
static void node_initialized(void *data)
{
struct impl *impl = data;
struct pw_client_node0 *this = &impl->this;
struct pw_impl_client_node0 *this = &impl->this;
struct pw_impl_node *node = this->node;
struct spa_system *data_system = impl->node.data_system;
@ -1247,13 +1247,13 @@ static void convert_properties(struct pw_properties *properties)
*
* Create a new \ref pw_impl_node.
*
* \memberof pw_client_node
* \memberof pw_impl_client_node
*/
struct pw_client_node0 *pw_client_node0_new(struct pw_resource *resource,
struct pw_impl_client_node0 *pw_impl_client_node0_new(struct pw_resource *resource,
struct pw_properties *properties)
{
struct impl *impl;
struct pw_client_node0 *this;
struct pw_impl_client_node0 *this;
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;
@ -1334,9 +1334,9 @@ error_exit_free:
/** Destroy a client node
* \param node the client node to destroy
* \memberof pw_client_node
* \memberof pw_impl_client_node
*/
void pw_client_node0_destroy(struct pw_client_node0 *node)
void pw_impl_client_node0_destroy(struct pw_impl_client_node0 *node)
{
pw_resource_destroy(node->resource);
}

View file

@ -28,22 +28,22 @@
extern "C" {
#endif
/** \class pw_client_node0
/** \class pw_impl_client_node0
*
* PipeWire client node interface
*/
struct pw_client_node0 {
struct pw_impl_client_node0 {
struct pw_impl_node *node;
struct pw_resource *resource;
};
struct pw_client_node0 *
pw_client_node0_new(struct pw_resource *resource,
struct pw_impl_client_node0 *
pw_impl_client_node0_new(struct pw_resource *resource,
struct pw_properties *properties);
void
pw_client_node0_destroy(struct pw_client_node0 *node);
pw_impl_client_node0_destroy(struct pw_impl_client_node0 *node);
#ifdef __cplusplus
}

View file

@ -156,17 +156,17 @@ struct pw_client_node0_buffer {
struct spa_buffer *buffer; /**< buffer describing metadata and buffer memory */
};
#define PW_CLIENT_NODE0_PROXY_METHOD_DONE 0
#define PW_CLIENT_NODE0_PROXY_METHOD_UPDATE 1
#define PW_CLIENT_NODE0_PROXY_METHOD_PORT_UPDATE 2
#define PW_CLIENT_NODE0_PROXY_METHOD_SET_ACTIVE 3
#define PW_CLIENT_NODE0_PROXY_METHOD_EVENT 4
#define PW_CLIENT_NODE0_PROXY_METHOD_DESTROY 5
#define PW_CLIENT_NODE0_PROXY_METHOD_NUM 6
#define PW_CLIENT_NODE0_METHOD_DONE 0
#define PW_CLIENT_NODE0_METHOD_UPDATE 1
#define PW_CLIENT_NODE0_METHOD_PORT_UPDATE 2
#define PW_CLIENT_NODE0_METHOD_SET_ACTIVE 3
#define PW_CLIENT_NODE0_METHOD_EVENT 4
#define PW_CLIENT_NODE0_METHOD_DESTROY 5
#define PW_CLIENT_NODE0_METHOD_NUM 6
/** \ref pw_client_node methods */
struct pw_client_node0_proxy_methods {
#define PW_VERSION_CLIENT_NODE0_PROXY_METHODS 0
struct pw_client_node0_methods {
#define PW_VERSION_CLIENT_NODE0_METHODS 0
uint32_t version;
/** Complete an async operation */
@ -227,22 +227,22 @@ struct pw_client_node0_proxy_methods {
void (*destroy) (void *object);
};
#define PW_CLIENT_NODE0_PROXY_EVENT_ADD_MEM 0
#define PW_CLIENT_NODE0_PROXY_EVENT_TRANSPORT 1
#define PW_CLIENT_NODE0_PROXY_EVENT_SET_PARAM 2
#define PW_CLIENT_NODE0_PROXY_EVENT_EVENT 3
#define PW_CLIENT_NODE0_PROXY_EVENT_COMMAND 4
#define PW_CLIENT_NODE0_PROXY_EVENT_ADD_PORT 5
#define PW_CLIENT_NODE0_PROXY_EVENT_REMOVE_PORT 6
#define PW_CLIENT_NODE0_PROXY_EVENT_PORT_SET_PARAM 7
#define PW_CLIENT_NODE0_PROXY_EVENT_PORT_USE_BUFFERS 8
#define PW_CLIENT_NODE0_PROXY_EVENT_PORT_COMMAND 9
#define PW_CLIENT_NODE0_PROXY_EVENT_PORT_SET_IO 10
#define PW_CLIENT_NODE0_PROXY_EVENT_NUM 11
#define PW_CLIENT_NODE0_EVENT_ADD_MEM 0
#define PW_CLIENT_NODE0_EVENT_TRANSPORT 1
#define PW_CLIENT_NODE0_EVENT_SET_PARAM 2
#define PW_CLIENT_NODE0_EVENT_EVENT 3
#define PW_CLIENT_NODE0_EVENT_COMMAND 4
#define PW_CLIENT_NODE0_EVENT_ADD_PORT 5
#define PW_CLIENT_NODE0_EVENT_REMOVE_PORT 6
#define PW_CLIENT_NODE0_EVENT_PORT_SET_PARAM 7
#define PW_CLIENT_NODE0_EVENT_PORT_USE_BUFFERS 8
#define PW_CLIENT_NODE0_EVENT_PORT_COMMAND 9
#define PW_CLIENT_NODE0_EVENT_PORT_SET_IO 10
#define PW_CLIENT_NODE0_EVENT_NUM 11
/** \ref pw_client_node events */
struct pw_client_node0_proxy_events {
#define PW_VERSION_CLIENT_NODE0_PROXY_EVENTS 0
struct pw_client_node0_events {
#define PW_VERSION_CLIENT_NODE0_EVENTS 0
uint32_t version;
/**
* Memory was added to a node
@ -386,7 +386,7 @@ struct pw_client_node0_proxy_events {
uint32_t offset,
uint32_t size);
};
#define pw_client_node0_resource(r,m,v,...) pw_resource_call(r, struct pw_client_node0_proxy_events, m, v, ##__VA_ARGS__)
#define pw_client_node0_resource(r,m,v,...) pw_resource_call(r, struct pw_client_node0_events, m, v, ##__VA_ARGS__)
#define pw_client_node0_resource_add_mem(r,...) pw_client_node0_resource(r,add_mem,0,__VA_ARGS__)
#define pw_client_node0_resource_transport(r,...) pw_client_node0_resource(r,transport,0,__VA_ARGS__)

View file

@ -60,7 +60,7 @@ client_node_marshal_add_mem(void *object,
return;
}
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_ADD_MEM, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_ADD_MEM, NULL);
spa_pod_builder_add_struct(b,
"i", mem_id,
@ -80,7 +80,7 @@ static void client_node_marshal_transport(void *object, uint32_t node_id, int re
pw_client_node0_transport_get_info(transport, &info);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_TRANSPORT, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_TRANSPORT, NULL);
spa_pod_builder_add_struct(b,
"i", node_id,
@ -100,7 +100,7 @@ client_node_marshal_set_param(void *object, uint32_t seq, uint32_t id, uint32_t
struct pw_resource *resource = object;
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_SET_PARAM, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_SET_PARAM, NULL);
spa_pod_builder_add_struct(b,
"i", seq,
@ -116,7 +116,7 @@ static void client_node_marshal_event_event(void *object, const struct spa_event
struct pw_resource *resource = object;
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_EVENT, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_EVENT, NULL);
spa_pod_builder_add_struct(b, "P", event);
@ -131,7 +131,7 @@ client_node_marshal_command(void *object, uint32_t seq, const struct spa_command
struct spa_pod_builder *b;
struct spa_pod_frame f;
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_COMMAND, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_COMMAND, NULL);
spa_pod_builder_push_struct(b, &f);
spa_pod_builder_add(b, "i", seq, NULL);
@ -148,7 +148,7 @@ client_node_marshal_add_port(void *object,
struct pw_resource *resource = object;
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_ADD_PORT, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_ADD_PORT, NULL);
spa_pod_builder_add_struct(b,
"i", seq,
@ -165,7 +165,7 @@ client_node_marshal_remove_port(void *object,
struct pw_resource *resource = object;
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_REMOVE_PORT, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_REMOVE_PORT, NULL);
spa_pod_builder_add_struct(b,
"i", seq,
@ -190,7 +190,7 @@ client_node_marshal_port_set_param(void *object,
struct spa_pod_frame f;
const char *typename;
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_PORT_SET_PARAM, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_PORT_SET_PARAM, NULL);
switch (id) {
case SPA_PARAM_Props:
@ -229,7 +229,7 @@ client_node_marshal_port_use_buffers(void *object,
struct spa_pod_frame f;
uint32_t i, j;
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_PORT_USE_BUFFERS, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_PORT_USE_BUFFERS, NULL);
spa_pod_builder_push_struct(b, &f);
spa_pod_builder_add(b,
@ -281,7 +281,7 @@ client_node_marshal_port_command(void *object,
struct spa_pod_builder *b;
struct spa_pod_frame f;
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_PORT_COMMAND, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_PORT_COMMAND, NULL);
spa_pod_builder_push_struct(b, &f);
spa_pod_builder_add(b,
@ -306,7 +306,7 @@ client_node_marshal_port_set_io(void *object,
struct pw_resource *resource = object;
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_PROXY_EVENT_PORT_SET_IO, NULL);
b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_PORT_SET_IO, NULL);
spa_pod_builder_add_struct(b,
"i", seq,
@ -333,7 +333,7 @@ static int client_node_demarshal_done(void *object, const struct pw_protocol_nat
"i", &res) < 0)
return -EINVAL;
return pw_resource_notify(resource, struct pw_client_node0_proxy_methods, done, 0, seq, res);
return pw_resource_notify(resource, struct pw_client_node0_methods, done, 0, seq, res);
}
static int client_node_demarshal_update(void *object, const struct pw_protocol_native_message *msg)
@ -359,7 +359,7 @@ static int client_node_demarshal_update(void *object, const struct pw_protocol_n
if (spa_pod_parser_get(&prs, "O", &params[i], NULL) < 0)
return -EINVAL;
return pw_resource_notify(resource, struct pw_client_node0_proxy_methods, update, 0, change_mask,
return pw_resource_notify(resource, struct pw_client_node0_methods, update, 0, change_mask,
max_input_ports,
max_output_ports,
n_params,
@ -414,7 +414,7 @@ static int client_node_demarshal_port_update(void *object, const struct pw_proto
}
}
return pw_resource_notify(resource, struct pw_client_node0_proxy_methods, port_update, 0, direction,
return pw_resource_notify(resource, struct pw_client_node0_methods, port_update, 0, direction,
port_id,
change_mask,
n_params,
@ -432,7 +432,7 @@ static int client_node_demarshal_set_active(void *object, const struct pw_protoc
"b", &active) < 0)
return -EINVAL;
return pw_resource_notify(resource, struct pw_client_node0_proxy_methods, set_active, 0, active);
return pw_resource_notify(resource, struct pw_client_node0_methods, set_active, 0, active);
}
static int client_node_demarshal_event_method(void *object, const struct pw_protocol_native_message *msg)
@ -446,7 +446,7 @@ static int client_node_demarshal_event_method(void *object, const struct pw_prot
"O", &event) < 0)
return -EINVAL;
return pw_resource_notify(resource, struct pw_client_node0_proxy_methods, event, 0, event);
return pw_resource_notify(resource, struct pw_client_node0_methods, event, 0, event);
}
static int client_node_demarshal_destroy(void *object, const struct pw_protocol_native_message *msg)
@ -459,7 +459,7 @@ static int client_node_demarshal_destroy(void *object, const struct pw_protocol_
if (spa_pod_parser_get_struct(&prs, NULL) < 0)
return -EINVAL;
res = pw_resource_notify(resource, struct pw_client_node0_proxy_methods, destroy, 0);
res = pw_resource_notify(resource, struct pw_client_node0_methods, destroy, 0);
pw_resource_destroy(resource);
return res;
}
@ -473,8 +473,8 @@ static const struct pw_protocol_native_demarshal pw_protocol_native_client_node_
{ &client_node_demarshal_destroy, 0, 0 },
};
static const struct pw_client_node0_proxy_events pw_protocol_native_client_node_event_marshal = {
PW_VERSION_CLIENT_NODE0_PROXY_EVENTS,
static const struct pw_client_node0_events pw_protocol_native_client_node_event_marshal = {
PW_VERSION_CLIENT_NODE0_EVENTS,
&client_node_marshal_add_mem,
&client_node_marshal_transport,
&client_node_marshal_set_param,
@ -491,8 +491,8 @@ static const struct pw_client_node0_proxy_events pw_protocol_native_client_node_
static const struct pw_protocol_marshal pw_protocol_native_client_node_marshal = {
PW_TYPE_INTERFACE_ClientNode,
PW_VERSION_CLIENT_NODE0,
PW_CLIENT_NODE0_PROXY_METHOD_NUM,
PW_CLIENT_NODE0_PROXY_EVENT_NUM,
PW_CLIENT_NODE0_METHOD_NUM,
PW_CLIENT_NODE0_EVENT_NUM,
0,
NULL,
.server_demarshal = &pw_protocol_native_client_node_method_demarshal,