mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
clean up proxy and resource api
Remove override for resources, it can't work in general. Rename method to add_object_listener to add a listener for events/methods from the remote object. Rename some methods to _call to call the interface and _notify to notify the listeners. Remove unused client event to be notified of resource implementations.
This commit is contained in:
parent
b1ea91fa1d
commit
e9ecc47696
25 changed files with 196 additions and 249 deletions
|
|
@ -95,7 +95,7 @@ struct proxy_data {
|
|||
info_func_t info_func;
|
||||
pw_destroy_t destroy;
|
||||
struct spa_hook proxy_listener;
|
||||
struct spa_hook proxy_proxy_listener;
|
||||
struct spa_hook object_listener;
|
||||
};
|
||||
|
||||
struct command {
|
||||
|
|
@ -944,7 +944,7 @@ static bool bind_global(struct remote_data *rd, struct global *global, char **er
|
|||
pd->proxy = proxy;
|
||||
pd->info_func = info_func;
|
||||
pd->destroy = destroy;
|
||||
pw_proxy_add_proxy_listener(proxy, &pd->proxy_proxy_listener, events, pd);
|
||||
pw_proxy_add_object_listener(proxy, &pd->object_listener, events, pd);
|
||||
pw_proxy_add_listener(proxy, &pd->proxy_listener, &proxy_events, pd);
|
||||
|
||||
global->proxy = proxy;
|
||||
|
|
@ -1039,7 +1039,7 @@ static bool do_create_node(struct data *data, const char *cmd, char *args, char
|
|||
pd->rd = rd;
|
||||
pd->proxy = proxy;
|
||||
pd->destroy = (pw_destroy_t) pw_node_info_free;
|
||||
pw_proxy_add_proxy_listener(proxy, &pd->proxy_proxy_listener, &node_events, pd);
|
||||
pw_proxy_add_object_listener(proxy, &pd->object_listener, &node_events, pd);
|
||||
pw_proxy_add_listener(proxy, &pd->proxy_listener, &proxy_events, pd);
|
||||
|
||||
id = pw_map_insert_new(&data->vars, proxy);
|
||||
|
|
@ -1108,7 +1108,7 @@ static bool do_create_link(struct data *data, const char *cmd, char *args, char
|
|||
pd->rd = rd;
|
||||
pd->proxy = proxy;
|
||||
pd->destroy = (pw_destroy_t) pw_link_info_free;
|
||||
pw_proxy_add_proxy_listener(proxy, &pd->proxy_proxy_listener, &link_events, pd);
|
||||
pw_proxy_add_object_listener(proxy, &pd->object_listener, &link_events, pd);
|
||||
pw_proxy_add_listener(proxy, &pd->proxy_listener, &proxy_events, pd);
|
||||
|
||||
id = pw_map_insert_new(&data->vars, proxy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue