mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
permissions: pass pw_permission struct around
Use a pw_permission struct to express permissions of object. Improve client permissions, add/remove globals when permissions are changed.
This commit is contained in:
parent
f994b7eb70
commit
eb0a561f8c
13 changed files with 282 additions and 320 deletions
|
|
@ -700,7 +700,7 @@ handle_client(struct impl *impl, uint32_t id, uint32_t parent_id,
|
|||
{
|
||||
struct pw_proxy *p;
|
||||
struct client *client;
|
||||
struct spa_dict_item items[2];
|
||||
struct pw_permission perms[2];
|
||||
const char *str;
|
||||
|
||||
p = pw_registry_proxy_bind(impl->registry_proxy,
|
||||
|
|
@ -727,10 +727,9 @@ handle_client(struct impl *impl, uint32_t id, uint32_t parent_id,
|
|||
return 0;
|
||||
|
||||
if (strcmp(str, "restricted") == 0) {
|
||||
items[0].key = PW_CORE_PROXY_PERMISSIONS_DEFAULT;
|
||||
items[0].value = "rwx";
|
||||
perms[0] = PW_PERMISSION_INIT(-1, PW_PERM_RWX);
|
||||
pw_client_proxy_update_permissions((struct pw_client_proxy*)p,
|
||||
&SPA_DICT_INIT(items, 1));
|
||||
1, perms);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue