mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
improve interfaces
Make an interface structure to hold methods and events. Move interface setup to protocol
This commit is contained in:
parent
905743dac6
commit
7ad02f553a
13 changed files with 341 additions and 255 deletions
|
|
@ -66,7 +66,7 @@ no_id:
|
|||
"unknown object id %u", id);
|
||||
}
|
||||
|
||||
static PinosRegistryInterface registry_interface = {
|
||||
static PinosRegistryMethods registry_methods = {
|
||||
®istry_bind
|
||||
};
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ core_get_registry (void *object,
|
|||
if (registry_resource == NULL)
|
||||
goto no_mem;
|
||||
|
||||
registry_resource->interface = ®istry_interface;
|
||||
registry_resource->implementation = ®istry_methods;
|
||||
|
||||
spa_list_insert (this->registry_resource_list.prev, ®istry_resource->link);
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ no_mem:
|
|||
return;
|
||||
}
|
||||
|
||||
static PinosCoreInterface core_interface = {
|
||||
static PinosCoreMethods core_methods = {
|
||||
&core_client_update,
|
||||
&core_sync,
|
||||
&core_get_registry,
|
||||
|
|
@ -235,7 +235,7 @@ core_bind_func (PinosGlobal *global,
|
|||
if (resource == NULL)
|
||||
goto no_mem;
|
||||
|
||||
resource->interface = &core_interface;
|
||||
resource->implementation = &core_methods;
|
||||
|
||||
spa_list_insert (this->resource_list.prev, &resource->link);
|
||||
client->core_resource = resource;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue