diff options
author | Wim Taymans <wtaymans@redhat.com> | 2020-08-05 12:29:19 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2020-08-05 12:29:19 +0200 |
commit | f79c347667999f2c8c23d2bdb4529588d2fe3f28 (patch) | |
tree | a31132c85b388176c704522a64d2ee26fa11efa7 | |
parent | 3abd46b619de2c14c7b9e373a1f7b131ddabcaf0 (diff) |
global: add method to update global keys
-rw-r--r-- | src/pipewire/global.c | 10 | ||||
-rw-r--r-- | src/pipewire/global.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/pipewire/global.c b/src/pipewire/global.c index 2247ce19..43403e91 100644 --- a/src/pipewire/global.c +++ b/src/pipewire/global.c @@ -212,6 +212,16 @@ const struct pw_properties *pw_global_get_properties(struct pw_global *global) } 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) { return global->object; diff --git a/src/pipewire/global.h b/src/pipewire/global.h index 399a8d4c..d0edad7b 100644 --- a/src/pipewire/global.h +++ b/src/pipewire/global.h @@ -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); |