client: add check_access signal

Fire the check access signal right after creating a client to make it
possible to set permissions.
This commit is contained in:
Wim Taymans 2018-10-29 08:44:56 +00:00
parent dfde479b20
commit 1c450ce2c1
3 changed files with 6 additions and 2 deletions

View file

@ -186,8 +186,7 @@ static void client_update_permissions(void *object, const struct spa_dict *props
}
}
}
if (impl->permissions_default != 0)
pw_client_set_busy(client, false);
pw_client_set_busy(client, false);
}
static const struct pw_client_proxy_methods client_methods = {
@ -316,6 +315,8 @@ struct pw_client *pw_client_new(struct pw_core *core,
this->info.props = &this->properties->dict;
pw_core_events_check_access(core, this);
return this;
}

View file

@ -94,6 +94,8 @@ struct pw_core_events {
void (*free) (void *data);
/** The core info changed, use \ref pw_core_get_info() to get the updated info */
void (*info_changed) (void *data, struct pw_core_info *info);
/** a new client object is added */
void (*check_access) (void *data, struct pw_client *client);
/** a new global object was added */
void (*global_added) (void *data, struct pw_global *global);
/** a global object was removed */

View file

@ -148,6 +148,7 @@ struct pw_global {
#define pw_core_events_destroy(c) pw_core_events_emit(c, destroy, 0)
#define pw_core_events_free(c) pw_core_events_emit(c, free, 0)
#define pw_core_events_info_changed(c,i) pw_core_events_emit(c, info_changed, 0, i)
#define pw_core_events_check_access(c,cl) pw_core_events_emit(c, check_access, 0, cl)
#define pw_core_events_global_added(c,g) pw_core_events_emit(c, global_added, 0, g)
#define pw_core_events_global_removed(c,g) pw_core_events_emit(c, global_removed, 0, g)