mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
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:
parent
8ea78c2e3f
commit
ecc6b27cd7
54 changed files with 1068 additions and 1059 deletions
|
|
@ -43,7 +43,7 @@ static const struct spa_dict_item module_props[] = {
|
|||
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
|
||||
};
|
||||
|
||||
struct pw_proxy *pw_core_proxy_spa_device_export(struct pw_core_proxy *core_proxy,
|
||||
struct pw_proxy *pw_core_spa_device_export(struct pw_core *core,
|
||||
uint32_t type, struct pw_properties *props, void *object,
|
||||
size_t user_data_size);
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ int pipewire__module_init(struct pw_module *module, const char *args)
|
|||
pw_protocol_native_ext_client_device_init(context);
|
||||
|
||||
data->export_spadevice.type = SPA_TYPE_INTERFACE_Device;
|
||||
data->export_spadevice.func = pw_core_proxy_spa_device_export;
|
||||
data->export_spadevice.func = pw_core_spa_device_export;
|
||||
pw_context_register_export_type(context, &data->export_spadevice);
|
||||
|
||||
pw_module_add_listener(module, &data->module_listener, &module_events, data);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static const struct pw_proxy_events proxy_events = {
|
|||
.destroy = device_proxy_destroy,
|
||||
};
|
||||
|
||||
struct pw_proxy *pw_core_proxy_spa_device_export(struct pw_core_proxy *core_proxy,
|
||||
struct pw_proxy *pw_core_spa_device_export(struct pw_core *core,
|
||||
uint32_t type, struct pw_properties *props, void *object,
|
||||
size_t user_data_size)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ struct pw_proxy *pw_core_proxy_spa_device_export(struct pw_core_proxy *core_prox
|
|||
struct pw_proxy *proxy;
|
||||
struct device_data *data;
|
||||
|
||||
proxy = pw_core_proxy_create_object(core_proxy,
|
||||
proxy = pw_core_create_object(core,
|
||||
"client-device",
|
||||
SPA_TYPE_INTERFACE_Device,
|
||||
SPA_VERSION_DEVICE,
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ static const struct spa_dict_item module_props[] = {
|
|||
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
|
||||
};
|
||||
|
||||
struct pw_proxy *pw_core_proxy_node_export(struct pw_core_proxy *core_proxy,
|
||||
struct pw_proxy *pw_core_node_export(struct pw_core *core,
|
||||
uint32_t type, struct pw_properties *props, void *object, size_t user_data_size);
|
||||
struct pw_proxy *pw_core_proxy_spa_node_export(struct pw_core_proxy *core_proxy,
|
||||
struct pw_proxy *pw_core_spa_node_export(struct pw_core *core,
|
||||
uint32_t type, struct pw_properties *props, void *object, size_t user_data_size);
|
||||
|
||||
struct pw_protocol *pw_protocol_native_ext_client_node_init(struct pw_context *context);
|
||||
|
|
@ -178,11 +178,11 @@ int pipewire__module_init(struct pw_module *module, const char *args)
|
|||
pw_protocol_native_ext_client_node0_init(context);
|
||||
|
||||
data->export_node.type = PW_TYPE_INTERFACE_Node;
|
||||
data->export_node.func = pw_core_proxy_node_export;
|
||||
data->export_node.func = pw_core_node_export;
|
||||
pw_context_register_export_type(context, &data->export_node);
|
||||
|
||||
data->export_spanode.type = SPA_TYPE_INTERFACE_Node;
|
||||
data->export_spanode.func = pw_core_proxy_spa_node_export;
|
||||
data->export_spanode.func = pw_core_spa_node_export;
|
||||
pw_context_register_export_type(context, &data->export_spanode);
|
||||
|
||||
pw_module_add_listener(module, &data->module_listener, &module_events, data);
|
||||
|
|
|
|||
|
|
@ -1107,7 +1107,7 @@ static const struct spa_node_callbacks node_callbacks = {
|
|||
.xrun = node_xrun
|
||||
};
|
||||
|
||||
static struct pw_proxy *node_export(struct pw_core_proxy *core_proxy, void *object, bool do_free,
|
||||
static struct pw_proxy *node_export(struct pw_core *core, void *object, bool do_free,
|
||||
size_t user_data_size)
|
||||
{
|
||||
struct pw_node *node = object;
|
||||
|
|
@ -1115,7 +1115,7 @@ static struct pw_proxy *node_export(struct pw_core_proxy *core_proxy, void *obje
|
|||
struct node_data *data;
|
||||
int i;
|
||||
|
||||
client_node = pw_core_proxy_create_object(core_proxy,
|
||||
client_node = pw_core_create_object(core,
|
||||
"client-node",
|
||||
PW_TYPE_INTERFACE_ClientNode,
|
||||
PW_VERSION_CLIENT_NODE,
|
||||
|
|
@ -1125,7 +1125,7 @@ static struct pw_proxy *node_export(struct pw_core_proxy *core_proxy, void *obje
|
|||
return NULL;
|
||||
|
||||
data = pw_proxy_get_user_data(client_node);
|
||||
data->pool = pw_core_proxy_get_mempool(core_proxy);
|
||||
data->pool = pw_core_get_mempool(core);
|
||||
data->node = node;
|
||||
data->do_free = do_free;
|
||||
data->context = pw_node_get_context(node);
|
||||
|
|
@ -1164,7 +1164,7 @@ static struct pw_proxy *node_export(struct pw_core_proxy *core_proxy, void *obje
|
|||
return data->proxy;
|
||||
}
|
||||
|
||||
struct pw_proxy *pw_core_proxy_node_export(struct pw_core_proxy *core_proxy,
|
||||
struct pw_proxy *pw_core_node_export(struct pw_core *core,
|
||||
uint32_t type, struct pw_properties *props, void *object,
|
||||
size_t user_data_size)
|
||||
{
|
||||
|
|
@ -1174,16 +1174,16 @@ struct pw_proxy *pw_core_proxy_node_export(struct pw_core_proxy *core_proxy,
|
|||
pw_node_update_properties(node, &props->dict);
|
||||
pw_properties_free(props);
|
||||
}
|
||||
return node_export(core_proxy, object, false, user_data_size);
|
||||
return node_export(core, object, false, user_data_size);
|
||||
}
|
||||
|
||||
struct pw_proxy *pw_core_proxy_spa_node_export(struct pw_core_proxy *core_proxy,
|
||||
struct pw_proxy *pw_core_spa_node_export(struct pw_core *core,
|
||||
uint32_t type, struct pw_properties *props, void *object,
|
||||
size_t user_data_size)
|
||||
{
|
||||
struct pw_node *node;
|
||||
|
||||
node = pw_node_new(pw_core_proxy_get_context(core_proxy), props, 0);
|
||||
node = pw_node_new(pw_core_get_context(core), props, 0);
|
||||
if (node == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -1191,5 +1191,5 @@ struct pw_proxy *pw_core_proxy_spa_node_export(struct pw_core_proxy *core_proxy,
|
|||
pw_node_register(node, NULL);
|
||||
pw_node_set_active(node, true);
|
||||
|
||||
return node_export(core_proxy, node, true, user_data_size);
|
||||
return node_export(core, node, true, user_data_size);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ static const struct spa_dict_item module_props[] = {
|
|||
void * pw_metadata_new(struct pw_context *context, struct pw_resource *resource,
|
||||
struct pw_properties *properties);
|
||||
|
||||
struct pw_proxy *pw_core_proxy_metadata_export(struct pw_core_proxy *core_proxy,
|
||||
struct pw_proxy *pw_core_metadata_export(struct pw_core *core,
|
||||
uint32_t type, struct pw_properties *props, void *object, size_t user_data_size);
|
||||
|
||||
int pw_protocol_native_ext_metadata_init(struct pw_context *context);
|
||||
|
|
@ -174,7 +174,7 @@ int pipewire__module_init(struct pw_module *module, const char *args)
|
|||
data);
|
||||
|
||||
data->export_metadata.type = PW_TYPE_INTERFACE_Metadata;
|
||||
data->export_metadata.func = pw_core_proxy_metadata_export;
|
||||
data->export_metadata.func = pw_core_metadata_export;
|
||||
pw_context_register_export_type(context, &data->export_metadata);
|
||||
|
||||
pw_module_add_listener(module, &data->module_listener, &module_events, data);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static const struct pw_proxy_events proxy_events = {
|
|||
.destroy = object_proxy_destroy,
|
||||
};
|
||||
|
||||
struct pw_proxy *pw_core_proxy_metadata_export(struct pw_core_proxy *core_proxy,
|
||||
struct pw_proxy *pw_core_metadata_export(struct pw_core *core,
|
||||
uint32_t type, struct pw_properties *props, void *object,
|
||||
size_t user_data_size)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ struct pw_proxy *pw_core_proxy_metadata_export(struct pw_core_proxy *core_proxy,
|
|||
struct pw_proxy *proxy;
|
||||
struct object_data *data;
|
||||
|
||||
proxy = pw_core_proxy_create_object(core_proxy,
|
||||
proxy = pw_core_create_object(core,
|
||||
"metadata",
|
||||
PW_TYPE_INTERFACE_Metadata,
|
||||
PW_VERSION_METADATA,
|
||||
|
|
|
|||
|
|
@ -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 *
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
static int core_method_marshal_add_listener(void *object,
|
||||
struct spa_hook *listener,
|
||||
const struct pw_core_proxy_events *events,
|
||||
const struct pw_core_events *events,
|
||||
void *data)
|
||||
{
|
||||
struct pw_proxy *proxy = object;
|
||||
|
|
@ -49,7 +49,7 @@ static int core_method_marshal_hello(void *object, uint32_t version)
|
|||
struct pw_proxy *proxy = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_PROXY_METHOD_HELLO, NULL);
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_METHOD_HELLO, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(version));
|
||||
|
|
@ -63,7 +63,7 @@ static int core_method_marshal_sync(void *object, uint32_t id, int seq)
|
|||
struct pw_proxy *proxy = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_PROXY_METHOD_SYNC, &msg);
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_METHOD_SYNC, &msg);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id),
|
||||
|
|
@ -77,7 +77,7 @@ static int core_method_marshal_pong(void *object, uint32_t id, int seq)
|
|||
struct pw_proxy *proxy = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_PROXY_METHOD_PONG, NULL);
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_METHOD_PONG, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id),
|
||||
|
|
@ -91,7 +91,7 @@ static int core_method_marshal_error(void *object, uint32_t id, int seq, int res
|
|||
struct pw_proxy *proxy = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_PROXY_METHOD_ERROR, NULL);
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_METHOD_ERROR, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id),
|
||||
|
|
@ -116,7 +116,7 @@ static struct pw_registry_proxy * core_method_marshal_get_registry(void *object,
|
|||
|
||||
new_id = pw_proxy_get_id(res);
|
||||
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_PROXY_METHOD_GET_REGISTRY, NULL);
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_METHOD_GET_REGISTRY, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(version),
|
||||
|
|
@ -208,7 +208,7 @@ core_method_marshal_create_object(void *object,
|
|||
|
||||
new_id = pw_proxy_get_id(res);
|
||||
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_PROXY_METHOD_CREATE_OBJECT, NULL);
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_METHOD_CREATE_OBJECT, NULL);
|
||||
|
||||
spa_pod_builder_push_struct(b, &f);
|
||||
spa_pod_builder_add(b,
|
||||
|
|
@ -232,7 +232,7 @@ core_method_marshal_destroy(void *object, void *p)
|
|||
struct spa_pod_builder *b;
|
||||
uint32_t id = pw_proxy_get_id(p);
|
||||
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_PROXY_METHOD_DESTROY, NULL);
|
||||
b = pw_protocol_native_begin_proxy(proxy, PW_CORE_METHOD_DESTROY, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id));
|
||||
|
|
@ -272,7 +272,7 @@ static int core_event_demarshal_info(void *object, const struct pw_protocol_nati
|
|||
if (parse_dict(&prs, &props) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_core_proxy_events, info, 0, &info);
|
||||
return pw_proxy_notify(proxy, struct pw_core_events, info, 0, &info);
|
||||
}
|
||||
|
||||
static int core_event_demarshal_done(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -287,7 +287,7 @@ static int core_event_demarshal_done(void *object, const struct pw_protocol_nati
|
|||
SPA_POD_Int(&seq)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_core_proxy_events, done, 0, id, seq);
|
||||
return pw_proxy_notify(proxy, struct pw_core_events, done, 0, id, seq);
|
||||
}
|
||||
|
||||
static int core_event_demarshal_ping(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -302,7 +302,7 @@ static int core_event_demarshal_ping(void *object, const struct pw_protocol_nati
|
|||
SPA_POD_Int(&seq)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_core_proxy_events, ping, 0, id, seq);
|
||||
return pw_proxy_notify(proxy, struct pw_core_events, ping, 0, id, seq);
|
||||
}
|
||||
|
||||
static int core_event_demarshal_error(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -321,7 +321,7 @@ static int core_event_demarshal_error(void *object, const struct pw_protocol_nat
|
|||
SPA_POD_String(&error)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_core_proxy_events, error, 0, id, seq, res, error);
|
||||
return pw_proxy_notify(proxy, struct pw_core_events, error, 0, id, seq, res, error);
|
||||
}
|
||||
|
||||
static int core_event_demarshal_remove_id(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -334,7 +334,7 @@ static int core_event_demarshal_remove_id(void *object, const struct pw_protocol
|
|||
if (spa_pod_parser_get_struct(&prs, SPA_POD_Int(&id)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_core_proxy_events, remove_id, 0, id);
|
||||
return pw_proxy_notify(proxy, struct pw_core_events, remove_id, 0, id);
|
||||
}
|
||||
|
||||
static int core_event_demarshal_bound_id(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -349,7 +349,7 @@ static int core_event_demarshal_bound_id(void *object, const struct pw_protocol_
|
|||
SPA_POD_Int(&global_id)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_core_proxy_events, bound_id, 0, id, global_id);
|
||||
return pw_proxy_notify(proxy, struct pw_core_events, bound_id, 0, id, global_id);
|
||||
}
|
||||
|
||||
static int core_event_demarshal_add_mem(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -370,7 +370,7 @@ static int core_event_demarshal_add_mem(void *object, const struct pw_protocol_n
|
|||
|
||||
fd = pw_protocol_native_get_proxy_fd(proxy, idx);
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_core_proxy_events, add_mem, 0, id, type, fd, flags);
|
||||
return pw_proxy_notify(proxy, struct pw_core_events, add_mem, 0, id, type, fd, flags);
|
||||
}
|
||||
|
||||
static int core_event_demarshal_remove_mem(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -384,7 +384,7 @@ static int core_event_demarshal_remove_mem(void *object, const struct pw_protoco
|
|||
SPA_POD_Int(&id)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_core_proxy_events, remove_mem, 0, id);
|
||||
return pw_proxy_notify(proxy, struct pw_core_events, remove_mem, 0, id);
|
||||
}
|
||||
|
||||
static void core_event_marshal_info(void *object, const struct pw_core_info *info)
|
||||
|
|
@ -393,7 +393,7 @@ static void core_event_marshal_info(void *object, const struct pw_core_info *inf
|
|||
struct spa_pod_builder *b;
|
||||
struct spa_pod_frame f;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_EVENT_INFO, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_INFO, NULL);
|
||||
|
||||
spa_pod_builder_push_struct(b, &f);
|
||||
spa_pod_builder_add(b,
|
||||
|
|
@ -416,7 +416,7 @@ static void core_event_marshal_done(void *object, uint32_t id, int seq)
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_EVENT_DONE, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_DONE, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id),
|
||||
|
|
@ -431,7 +431,7 @@ static void core_event_marshal_ping(void *object, uint32_t id, int seq)
|
|||
struct spa_pod_builder *b;
|
||||
struct pw_protocol_native_message *msg;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_EVENT_PING, &msg);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_PING, &msg);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id),
|
||||
|
|
@ -445,7 +445,7 @@ static void core_event_marshal_error(void *object, uint32_t id, int seq, int res
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_EVENT_ERROR, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_ERROR, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id),
|
||||
|
|
@ -461,7 +461,7 @@ static void core_event_marshal_remove_id(void *object, uint32_t id)
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_EVENT_REMOVE_ID, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_REMOVE_ID, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id));
|
||||
|
|
@ -474,7 +474,7 @@ static void core_event_marshal_bound_id(void *object, uint32_t id, uint32_t glob
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_EVENT_BOUND_ID, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_BOUND_ID, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id),
|
||||
|
|
@ -488,7 +488,7 @@ static void core_event_marshal_add_mem(void *object, uint32_t id, uint32_t type,
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_EVENT_ADD_MEM, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_ADD_MEM, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id),
|
||||
|
|
@ -504,7 +504,7 @@ static void core_event_marshal_remove_mem(void *object, uint32_t id)
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_EVENT_REMOVE_MEM, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_REMOVE_MEM, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id));
|
||||
|
|
@ -523,7 +523,7 @@ static int core_method_demarshal_hello(void *object, const struct pw_protocol_na
|
|||
SPA_POD_Int(&version)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, hello, 0, version);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, hello, 0, version);
|
||||
}
|
||||
|
||||
static int core_method_demarshal_sync(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -538,7 +538,7 @@ static int core_method_demarshal_sync(void *object, const struct pw_protocol_nat
|
|||
SPA_POD_Int(&seq)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, sync, 0, id, seq);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, sync, 0, id, seq);
|
||||
}
|
||||
|
||||
static int core_method_demarshal_pong(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -553,7 +553,7 @@ static int core_method_demarshal_pong(void *object, const struct pw_protocol_nat
|
|||
SPA_POD_Int(&seq)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, pong, 0, id, seq);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, pong, 0, id, seq);
|
||||
}
|
||||
|
||||
static int core_method_demarshal_error(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -572,7 +572,7 @@ static int core_method_demarshal_error(void *object, const struct pw_protocol_na
|
|||
SPA_POD_String(&error)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, error, 0, id, seq, res, error);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, error, 0, id, seq, res, error);
|
||||
}
|
||||
|
||||
static int core_method_demarshal_get_registry(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -587,7 +587,7 @@ static int core_method_demarshal_get_registry(void *object, const struct pw_prot
|
|||
SPA_POD_Int(&new_id)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, get_registry, 0, version, new_id);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, get_registry, 0, version, new_id);
|
||||
}
|
||||
|
||||
static int core_method_demarshal_create_object(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -622,7 +622,7 @@ static int core_method_demarshal_create_object(void *object, const struct pw_pro
|
|||
SPA_POD_Int(&new_id), NULL) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, create_object, 0, factory_name,
|
||||
return pw_resource_notify(resource, struct pw_core_methods, create_object, 0, factory_name,
|
||||
type, version,
|
||||
&props, new_id);
|
||||
}
|
||||
|
|
@ -645,7 +645,7 @@ static int core_method_demarshal_destroy(void *object, const struct pw_protocol_
|
|||
if ((r = pw_client_find_resource(client, id)) == NULL)
|
||||
goto no_resource;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, destroy, 0, r);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, destroy, 0, r);
|
||||
|
||||
no_resource:
|
||||
pw_log_error("client %p: unknown resouce %u op:%u", client, id, msg->opcode);
|
||||
|
|
@ -1893,8 +1893,8 @@ static int registry_marshal_destroy(void *object, uint32_t id)
|
|||
return pw_protocol_native_end_proxy(proxy, b);
|
||||
}
|
||||
|
||||
static const struct pw_core_proxy_methods pw_protocol_native_core_method_marshal = {
|
||||
PW_VERSION_CORE_PROXY_METHODS,
|
||||
static const struct pw_core_methods pw_protocol_native_core_method_marshal = {
|
||||
PW_VERSION_CORE_METHODS,
|
||||
.add_listener = &core_method_marshal_add_listener,
|
||||
.hello = &core_method_marshal_hello,
|
||||
.sync = &core_method_marshal_sync,
|
||||
|
|
@ -1905,19 +1905,19 @@ static const struct pw_core_proxy_methods pw_protocol_native_core_method_marshal
|
|||
.destroy = &core_method_marshal_destroy,
|
||||
};
|
||||
|
||||
static const struct pw_protocol_native_demarshal pw_protocol_native_core_method_demarshal[PW_CORE_PROXY_METHOD_NUM] = {
|
||||
[PW_CORE_PROXY_METHOD_ADD_LISTENER] = { NULL, 0, },
|
||||
[PW_CORE_PROXY_METHOD_HELLO] = { &core_method_demarshal_hello, 0, },
|
||||
[PW_CORE_PROXY_METHOD_SYNC] = { &core_method_demarshal_sync, 0, },
|
||||
[PW_CORE_PROXY_METHOD_PONG] = { &core_method_demarshal_pong, 0, },
|
||||
[PW_CORE_PROXY_METHOD_ERROR] = { &core_method_demarshal_error, 0, },
|
||||
[PW_CORE_PROXY_METHOD_GET_REGISTRY] = { &core_method_demarshal_get_registry, 0, },
|
||||
[PW_CORE_PROXY_METHOD_CREATE_OBJECT] = { &core_method_demarshal_create_object, 0, },
|
||||
[PW_CORE_PROXY_METHOD_DESTROY] = { &core_method_demarshal_destroy, 0, }
|
||||
static const struct pw_protocol_native_demarshal pw_protocol_native_core_method_demarshal[PW_CORE_METHOD_NUM] = {
|
||||
[PW_CORE_METHOD_ADD_LISTENER] = { NULL, 0, },
|
||||
[PW_CORE_METHOD_HELLO] = { &core_method_demarshal_hello, 0, },
|
||||
[PW_CORE_METHOD_SYNC] = { &core_method_demarshal_sync, 0, },
|
||||
[PW_CORE_METHOD_PONG] = { &core_method_demarshal_pong, 0, },
|
||||
[PW_CORE_METHOD_ERROR] = { &core_method_demarshal_error, 0, },
|
||||
[PW_CORE_METHOD_GET_REGISTRY] = { &core_method_demarshal_get_registry, 0, },
|
||||
[PW_CORE_METHOD_CREATE_OBJECT] = { &core_method_demarshal_create_object, 0, },
|
||||
[PW_CORE_METHOD_DESTROY] = { &core_method_demarshal_destroy, 0, }
|
||||
};
|
||||
|
||||
static const struct pw_core_proxy_events pw_protocol_native_core_event_marshal = {
|
||||
PW_VERSION_CORE_PROXY_EVENTS,
|
||||
static const struct pw_core_events pw_protocol_native_core_event_marshal = {
|
||||
PW_VERSION_CORE_EVENTS,
|
||||
.info = &core_event_marshal_info,
|
||||
.done = &core_event_marshal_done,
|
||||
.ping = &core_event_marshal_ping,
|
||||
|
|
@ -1929,24 +1929,24 @@ static const struct pw_core_proxy_events pw_protocol_native_core_event_marshal =
|
|||
};
|
||||
|
||||
static const struct pw_protocol_native_demarshal
|
||||
pw_protocol_native_core_event_demarshal[PW_CORE_PROXY_EVENT_NUM] =
|
||||
pw_protocol_native_core_event_demarshal[PW_CORE_EVENT_NUM] =
|
||||
{
|
||||
[PW_CORE_PROXY_EVENT_INFO] = { &core_event_demarshal_info, 0, },
|
||||
[PW_CORE_PROXY_EVENT_DONE] = { &core_event_demarshal_done, 0, },
|
||||
[PW_CORE_PROXY_EVENT_PING] = { &core_event_demarshal_ping, 0, },
|
||||
[PW_CORE_PROXY_EVENT_ERROR] = { &core_event_demarshal_error, 0, },
|
||||
[PW_CORE_PROXY_EVENT_REMOVE_ID] = { &core_event_demarshal_remove_id, 0, },
|
||||
[PW_CORE_PROXY_EVENT_BOUND_ID] = { &core_event_demarshal_bound_id, 0, },
|
||||
[PW_CORE_PROXY_EVENT_ADD_MEM] = { &core_event_demarshal_add_mem, 0, },
|
||||
[PW_CORE_PROXY_EVENT_REMOVE_MEM] = { &core_event_demarshal_remove_mem, 0, },
|
||||
[PW_CORE_EVENT_INFO] = { &core_event_demarshal_info, 0, },
|
||||
[PW_CORE_EVENT_DONE] = { &core_event_demarshal_done, 0, },
|
||||
[PW_CORE_EVENT_PING] = { &core_event_demarshal_ping, 0, },
|
||||
[PW_CORE_EVENT_ERROR] = { &core_event_demarshal_error, 0, },
|
||||
[PW_CORE_EVENT_REMOVE_ID] = { &core_event_demarshal_remove_id, 0, },
|
||||
[PW_CORE_EVENT_BOUND_ID] = { &core_event_demarshal_bound_id, 0, },
|
||||
[PW_CORE_EVENT_ADD_MEM] = { &core_event_demarshal_add_mem, 0, },
|
||||
[PW_CORE_EVENT_REMOVE_MEM] = { &core_event_demarshal_remove_mem, 0, },
|
||||
};
|
||||
|
||||
static const struct pw_protocol_marshal pw_protocol_native_core_marshal = {
|
||||
PW_TYPE_INTERFACE_Core,
|
||||
PW_VERSION_CORE_PROXY,
|
||||
PW_VERSION_CORE,
|
||||
0,
|
||||
PW_CORE_PROXY_METHOD_NUM,
|
||||
PW_CORE_PROXY_EVENT_NUM,
|
||||
PW_CORE_METHOD_NUM,
|
||||
PW_CORE_EVENT_NUM,
|
||||
.client_marshal = &pw_protocol_native_core_method_marshal,
|
||||
.server_demarshal = pw_protocol_native_core_method_demarshal,
|
||||
.server_marshal = &pw_protocol_native_core_event_marshal,
|
||||
|
|
|
|||
|
|
@ -35,36 +35,36 @@ extern "C" {
|
|||
|
||||
#define PW_VERSION_CORE_V0 0
|
||||
|
||||
#define PW_CORE_PROXY_V0_METHOD_HELLO 0
|
||||
#define PW_CORE_PROXY_V0_METHOD_UPDATE_TYPES 1
|
||||
#define PW_CORE_PROXY_V0_METHOD_SYNC 2
|
||||
#define PW_CORE_PROXY_V0_METHOD_GET_REGISTRY 3
|
||||
#define PW_CORE_PROXY_V0_METHOD_CLIENT_UPDATE 4
|
||||
#define PW_CORE_PROXY_V0_METHOD_PERMISSIONS 5
|
||||
#define PW_CORE_PROXY_V0_METHOD_CREATE_OBJECT 6
|
||||
#define PW_CORE_PROXY_V0_METHOD_DESTROY 7
|
||||
#define PW_CORE_PROXY_V0_METHOD_NUM 8
|
||||
#define PW_CORE_V0_METHOD_HELLO 0
|
||||
#define PW_CORE_V0_METHOD_UPDATE_TYPES 1
|
||||
#define PW_CORE_V0_METHOD_SYNC 2
|
||||
#define PW_CORE_V0_METHOD_GET_REGISTRY 3
|
||||
#define PW_CORE_V0_METHOD_CLIENT_UPDATE 4
|
||||
#define PW_CORE_V0_METHOD_PERMISSIONS 5
|
||||
#define PW_CORE_V0_METHOD_CREATE_OBJECT 6
|
||||
#define PW_CORE_V0_METHOD_DESTROY 7
|
||||
#define PW_CORE_V0_METHOD_NUM 8
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* Key to update default permissions of globals without specific
|
||||
* permissions. value is "[r][w][x]" */
|
||||
#define PW_CORE_PROXY_PERMISSIONS_DEFAULT "permissions.default"
|
||||
#define PW_CORE_PERMISSIONS_DEFAULT "permissions.default"
|
||||
|
||||
/**
|
||||
* Key to update specific permissions of a global. If the global
|
||||
* did not have specific permissions, it will first be assigned
|
||||
* the default permissions before it is updated.
|
||||
* Value is "<global-id>:[r][w][x]"*/
|
||||
#define PW_CORE_PROXY_PERMISSIONS_GLOBAL "permissions.global"
|
||||
#define PW_CORE_PERMISSIONS_GLOBAL "permissions.global"
|
||||
|
||||
/**
|
||||
* Key to update specific permissions of all existing globals.
|
||||
* This is equivalent to using \ref PW_CORE_PROXY_PERMISSIONS_GLOBAL
|
||||
* This is equivalent to using \ref PW_CORE_PERMISSIONS_GLOBAL
|
||||
* on each global id individually that did not have specific
|
||||
* permissions.
|
||||
* Value is "[r][w][x]" */
|
||||
#define PW_CORE_PROXY_PERMISSIONS_EXISTING "permissions.existing"
|
||||
#define PW_CORE_PERMISSIONS_EXISTING "permissions.existing"
|
||||
|
||||
#define PW_LINK_OUTPUT_NODE_ID "link.output_node.id"
|
||||
#define PW_LINK_OUTPUT_PORT_ID "link.output_port.id"
|
||||
|
|
@ -73,15 +73,15 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/**
|
||||
* \struct pw_core_proxy_v0_methods
|
||||
* \struct pw_core_v0_methods
|
||||
* \brief Core methods
|
||||
*
|
||||
* The core global object. This is a singleton object used for
|
||||
* creating new objects in the remote PipeWire intance. It is
|
||||
* also used for internal features.
|
||||
*/
|
||||
struct pw_core_proxy_v0_methods {
|
||||
#define PW_VERSION_CORE_PROXY_V0_METHODS 0
|
||||
struct pw_core_v0_methods {
|
||||
#define PW_VERSION_CORE_V0_METHODS 0
|
||||
uint32_t version;
|
||||
/**
|
||||
* Start a conversation with the server. This will send
|
||||
|
|
@ -167,19 +167,19 @@ struct pw_core_proxy_v0_methods {
|
|||
void (*destroy) (void *object, uint32_t id);
|
||||
};
|
||||
|
||||
#define PW_CORE_PROXY_V0_EVENT_UPDATE_TYPES 0
|
||||
#define PW_CORE_PROXY_V0_EVENT_DONE 1
|
||||
#define PW_CORE_PROXY_V0_EVENT_ERROR 2
|
||||
#define PW_CORE_PROXY_V0_EVENT_REMOVE_ID 3
|
||||
#define PW_CORE_PROXY_V0_EVENT_INFO 4
|
||||
#define PW_CORE_PROXY_V0_EVENT_NUM 5
|
||||
#define PW_CORE_V0_EVENT_UPDATE_TYPES 0
|
||||
#define PW_CORE_V0_EVENT_DONE 1
|
||||
#define PW_CORE_V0_EVENT_ERROR 2
|
||||
#define PW_CORE_V0_EVENT_REMOVE_ID 3
|
||||
#define PW_CORE_V0_EVENT_INFO 4
|
||||
#define PW_CORE_V0_EVENT_NUM 5
|
||||
|
||||
/** \struct pw_core_proxy_v0_events
|
||||
/** \struct pw_core_v0_events
|
||||
* \brief Core events
|
||||
* \ingroup pw_core_interface The pw_core interface
|
||||
*/
|
||||
struct pw_core_proxy_v0_events {
|
||||
#define PW_VERSION_CORE_PROXY_V0_EVENTS 0
|
||||
struct pw_core_v0_events {
|
||||
#define PW_VERSION_CORE_V0_EVENTS 0
|
||||
uint32_t version;
|
||||
/**
|
||||
* Update the type map
|
||||
|
|
@ -234,11 +234,11 @@ struct pw_core_proxy_v0_events {
|
|||
void (*info) (void *object, struct pw_core_info *info);
|
||||
};
|
||||
|
||||
#define pw_core_resource_v0_update_types(r,...) pw_resource_notify(r,struct pw_core_proxy_v0_events,update_types,__VA_ARGS__)
|
||||
#define pw_core_resource_v0_done(r,...) pw_resource_notify(r,struct pw_core_proxy_v0_events,done,__VA_ARGS__)
|
||||
#define pw_core_resource_v0_error(r,...) pw_resource_notify(r,struct pw_core_proxy_v0_events,error,__VA_ARGS__)
|
||||
#define pw_core_resource_v0_remove_id(r,...) pw_resource_notify(r,struct pw_core_proxy_v0_events,remove_id,__VA_ARGS__)
|
||||
#define pw_core_resource_v0_info(r,...) pw_resource_notify(r,struct pw_core_proxy_v0_events,info,__VA_ARGS__)
|
||||
#define pw_core_resource_v0_update_types(r,...) pw_resource_notify(r,struct pw_core_v0_events,update_types,__VA_ARGS__)
|
||||
#define pw_core_resource_v0_done(r,...) pw_resource_notify(r,struct pw_core_v0_events,done,__VA_ARGS__)
|
||||
#define pw_core_resource_v0_error(r,...) pw_resource_notify(r,struct pw_core_v0_events,error,__VA_ARGS__)
|
||||
#define pw_core_resource_v0_remove_id(r,...) pw_resource_notify(r,struct pw_core_v0_events,remove_id,__VA_ARGS__)
|
||||
#define pw_core_resource_v0_info(r,...) pw_resource_notify(r,struct pw_core_v0_events,info,__VA_ARGS__)
|
||||
|
||||
|
||||
#define PW_VERSION_REGISTRY_V0 0
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ update_types_server(struct pw_resource *resource)
|
|||
struct spa_pod_frame f;
|
||||
uint32_t i;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_V0_EVENT_UPDATE_TYPES, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_UPDATE_TYPES, NULL);
|
||||
|
||||
spa_pod_builder_push_struct(b, &f);
|
||||
spa_pod_builder_add(b,
|
||||
|
|
@ -78,11 +78,11 @@ static void core_marshal_info(void *object, const struct pw_core_info *info)
|
|||
struct spa_pod_frame f;
|
||||
struct pw_protocol_native_message *msg;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_V0_EVENT_INFO, &msg);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_INFO, &msg);
|
||||
|
||||
if (msg->seq == 0) {
|
||||
update_types_server(resource);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_V0_EVENT_INFO, &msg);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_INFO, &msg);
|
||||
}
|
||||
|
||||
n_items = info->props ? info->props->n_items : 0;
|
||||
|
|
@ -113,7 +113,7 @@ static void core_marshal_done(void *object, uint32_t id, int seq)
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_V0_EVENT_DONE, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_DONE, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b, "i", seq);
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ static void core_marshal_error(void *object, uint32_t id, int seq, int res, cons
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_V0_EVENT_ERROR, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_ERROR, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
"i", id,
|
||||
|
|
@ -140,7 +140,7 @@ static void core_marshal_remove_id(void *object, uint32_t id)
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_V0_EVENT_REMOVE_ID, NULL);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_REMOVE_ID, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b, "i", id);
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ static int core_demarshal_hello(void *object, const struct pw_protocol_native_me
|
|||
"P", &ptr) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, hello, 0, 2);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, hello, 0, 2);
|
||||
}
|
||||
|
||||
static int core_demarshal_sync(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -224,7 +224,7 @@ static int core_demarshal_sync(void *object, const struct pw_protocol_native_mes
|
|||
if (spa_pod_parser_get_struct(&prs, "i", &seq) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, sync, 0, 0, seq);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, sync, 0, 0, seq);
|
||||
}
|
||||
|
||||
static int core_demarshal_get_registry(void *object, const struct pw_protocol_native_message *msg)
|
||||
|
|
@ -239,7 +239,7 @@ static int core_demarshal_get_registry(void *object, const struct pw_protocol_na
|
|||
"i", &new_id) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, get_registry, 0, version, new_id);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, get_registry, 0, version, new_id);
|
||||
}
|
||||
|
||||
SPA_EXPORT
|
||||
|
|
@ -622,7 +622,7 @@ static int core_demarshal_create_object(void *object, const struct pw_protocol_n
|
|||
|
||||
type = pw_protocol_native0_type_from_v2(client, type);
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, create_object, 0, factory_name,
|
||||
return pw_resource_notify(resource, struct pw_core_methods, create_object, 0, factory_name,
|
||||
type, version,
|
||||
&props, new_id);
|
||||
}
|
||||
|
|
@ -644,7 +644,7 @@ static int core_demarshal_destroy(void *object, const struct pw_protocol_native_
|
|||
if ((r = pw_client_find_resource(client, id)) == NULL)
|
||||
goto no_resource;
|
||||
|
||||
return pw_resource_notify(resource, struct pw_core_proxy_methods, destroy, 0, r);
|
||||
return pw_resource_notify(resource, struct pw_core_methods, destroy, 0, r);
|
||||
|
||||
no_resource:
|
||||
pw_log_error("client %p: unknown resouce %u op:%u", client, id, msg->opcode);
|
||||
|
|
@ -1018,19 +1018,19 @@ static void link_marshal_info(void *object, const struct pw_link_info *info)
|
|||
pw_protocol_native_end_resource(resource, b);
|
||||
}
|
||||
|
||||
static const struct pw_protocol_native_demarshal pw_protocol_native_core_method_demarshal[PW_CORE_PROXY_V0_METHOD_NUM] = {
|
||||
[PW_CORE_PROXY_V0_METHOD_HELLO] = { &core_demarshal_hello, 0, },
|
||||
[PW_CORE_PROXY_V0_METHOD_UPDATE_TYPES] = { &core_demarshal_update_types_server, 0, },
|
||||
[PW_CORE_PROXY_V0_METHOD_SYNC] = { &core_demarshal_sync, 0, },
|
||||
[PW_CORE_PROXY_V0_METHOD_GET_REGISTRY] = { &core_demarshal_get_registry, 0, },
|
||||
[PW_CORE_PROXY_V0_METHOD_CLIENT_UPDATE] = { &core_demarshal_client_update, 0, },
|
||||
[PW_CORE_PROXY_V0_METHOD_PERMISSIONS] = { &core_demarshal_permissions, 0, },
|
||||
[PW_CORE_PROXY_V0_METHOD_CREATE_OBJECT] = { &core_demarshal_create_object, 0, PW_PROTOCOL_NATIVE_FLAG_REMAP, },
|
||||
[PW_CORE_PROXY_V0_METHOD_DESTROY] = { &core_demarshal_destroy, 0, }
|
||||
static const struct pw_protocol_native_demarshal pw_protocol_native_core_method_demarshal[PW_CORE_V0_METHOD_NUM] = {
|
||||
[PW_CORE_V0_METHOD_HELLO] = { &core_demarshal_hello, 0, },
|
||||
[PW_CORE_V0_METHOD_UPDATE_TYPES] = { &core_demarshal_update_types_server, 0, },
|
||||
[PW_CORE_V0_METHOD_SYNC] = { &core_demarshal_sync, 0, },
|
||||
[PW_CORE_V0_METHOD_GET_REGISTRY] = { &core_demarshal_get_registry, 0, },
|
||||
[PW_CORE_V0_METHOD_CLIENT_UPDATE] = { &core_demarshal_client_update, 0, },
|
||||
[PW_CORE_V0_METHOD_PERMISSIONS] = { &core_demarshal_permissions, 0, },
|
||||
[PW_CORE_V0_METHOD_CREATE_OBJECT] = { &core_demarshal_create_object, 0, PW_PROTOCOL_NATIVE_FLAG_REMAP, },
|
||||
[PW_CORE_V0_METHOD_DESTROY] = { &core_demarshal_destroy, 0, }
|
||||
};
|
||||
|
||||
static const struct pw_core_proxy_events pw_protocol_native_core_event_marshal = {
|
||||
PW_VERSION_CORE_PROXY_EVENTS,
|
||||
static const struct pw_core_events pw_protocol_native_core_event_marshal = {
|
||||
PW_VERSION_CORE_EVENTS,
|
||||
.info = &core_marshal_info,
|
||||
.done = &core_marshal_done,
|
||||
.error = &core_marshal_error,
|
||||
|
|
@ -1040,8 +1040,8 @@ static const struct pw_core_proxy_events pw_protocol_native_core_event_marshal =
|
|||
static const struct pw_protocol_marshal pw_protocol_native_core_marshal = {
|
||||
PW_TYPE_INTERFACE_Core,
|
||||
PW_VERSION_CORE_V0,
|
||||
PW_CORE_PROXY_V0_METHOD_NUM,
|
||||
PW_CORE_PROXY_EVENT_NUM,
|
||||
PW_CORE_V0_METHOD_NUM,
|
||||
PW_CORE_EVENT_NUM,
|
||||
0,
|
||||
NULL,
|
||||
pw_protocol_native_core_method_demarshal,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue