Improve version handling

Add version numbers to protocol interfaces and implementation.
Allow allocating user_data in proxy and resource
Use separate methods to set implementation.
Add protocol object to keep track of available protocols and
interfaces. Add possibility to dynamically register interfaces.
This commit is contained in:
Wim Taymans 2017-06-15 17:54:55 +02:00
parent c3b73ba47d
commit ae708c14e7
29 changed files with 572 additions and 225 deletions

View file

@ -1169,13 +1169,17 @@ struct pw_client_node *pw_client_node_new(struct pw_client *client,
this->resource = pw_resource_new(client,
id,
client->core->type.client_node,
this,
&client_node_methods,
(pw_destroy_t) client_node_resource_destroy);
client->core->type.client_node, 0);
if (this->resource == NULL)
goto error_no_resource;
pw_resource_set_implementation(this->resource,
this,
PW_VERSION_CLIENT_NODE,
&client_node_methods,
(pw_destroy_t) client_node_resource_destroy);
impl->proxy.resource = this->resource;
pw_signal_add(&this->node->free_signal, &impl->node_free, on_node_free);