From d1f21a939a669dffd752c52b5ca06610ec4b01a9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 16 Feb 2021 13:22:42 +0100 Subject: [PATCH] context: make method to get config section Applications will likely need a section of the config, not the whole thing. --- src/pipewire/context.c | 4 ++-- src/pipewire/context.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 45c76d434..cd05bf7eb 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -470,9 +470,9 @@ const struct pw_properties *pw_context_get_properties(struct pw_context *context } SPA_EXPORT -const struct pw_properties *pw_context_get_config(struct pw_context *context) +const char *pw_context_get_conf_section(struct pw_context *context, const char *section) { - return context->conf; + return pw_properties_get(context->conf, section); } /** Update context properties diff --git a/src/pipewire/context.h b/src/pipewire/context.h index bbc0505bb..2add8056c 100644 --- a/src/pipewire/context.h +++ b/src/pipewire/context.h @@ -129,12 +129,12 @@ void pw_context_add_listener(struct pw_context *context, /** Get the context properties */ const struct pw_properties *pw_context_get_properties(struct pw_context *context); -/** Get the config for this context. Since 0.3.22 */ -const struct pw_properties *pw_context_get_config(struct pw_context *context); - /** Update the context properties */ int pw_context_update_properties(struct pw_context *context, const struct spa_dict *dict); +/** Get a config section for this context. Since 0.3.22 */ +const char *pw_context_get_conf_section(struct pw_context *context, const char *section); + /** Get the context support objects */ const struct spa_support *pw_context_get_support(struct pw_context *context, uint32_t *n_support);