access: rework access checks

Remove the access struct. Allow for the access module to override any
method of a resource to do additional checks.
This commit is contained in:
Wim Taymans 2017-06-12 18:20:59 +02:00
parent 2c1245f8ef
commit 611ce2151e
14 changed files with 192 additions and 300 deletions

View file

@ -29,7 +29,11 @@ struct impl {
/** \endcond */
struct pw_resource *pw_resource_new(struct pw_client *client,
uint32_t id, uint32_t type, void *object, pw_destroy_t destroy)
uint32_t id,
uint32_t type,
void *object,
const void *implementation,
pw_destroy_t destroy)
{
struct impl *impl;
struct pw_resource *this;
@ -43,6 +47,7 @@ struct pw_resource *pw_resource_new(struct pw_client *client,
this->client = client;
this->type = type;
this->object = object;
this->implementation = implementation;
this->destroy = destroy;
pw_signal_init(&this->destroy_signal);