global: add method to update global keys

This commit is contained in:
Wim Taymans 2020-08-05 12:29:19 +02:00
parent 3abd46b619
commit f79c347667
2 changed files with 14 additions and 0 deletions

View file

@ -211,6 +211,16 @@ const struct pw_properties *pw_global_get_properties(struct pw_global *global)
return global->properties;
}
SPA_EXPORT
int pw_global_update_keys(struct pw_global *global,
const struct spa_dict *dict, const char *keys[])
{
struct impl *impl = SPA_CONTAINER_OF(global, struct impl, this);
if (impl->registered)
return -EINVAL;
return pw_properties_update_keys(global->properties, dict, keys);
}
SPA_EXPORT
void * pw_global_get_object(struct pw_global *global)
{

View file

@ -113,6 +113,10 @@ uint32_t pw_global_get_version(struct pw_global *global);
/** Get the global properties */
const struct pw_properties *pw_global_get_properties(struct pw_global *global);
/** Update the global properties, must be done when unregistered */
int pw_global_update_keys(struct pw_global *global,
const struct spa_dict *dict, const char *keys[]);
/** Get the object associated with the global. This depends on the type of the
* global */
void *pw_global_get_object(struct pw_global *global);