PipeWire  0.3.26
conf.h
Go to the documentation of this file.
1 /* PipeWire
2  *
3  * Copyright © 2021 Wim Taymans
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 
25 #include <pipewire/context.h>
26 
27 int pw_conf_load_conf(const char *prefix, const char *name, struct pw_properties *conf);
28 int pw_conf_load_state(const char *prefix, const char *name, struct pw_properties *conf);
29 int pw_conf_save_state(const char *prefix, const char *name, const struct pw_properties *conf);
30 
31 int pw_context_parse_conf_section(struct pw_context *context,
32  struct pw_properties *conf, const char *section);
res
static uint32_t int int res
Definition: core.h:326
pw_log::pw_log_error
#define pw_log_error(...)
Log an error message.
pw_properties::pw_properties_new_string
SPA_EXPORT struct pw_properties * pw_properties_new_string(const char *object)
Make a new properties object from the given str.
Definition: properties.c:196
pw_utils::pw_split_strv
SPA_EXPORT char ** pw_split_strv(const char *str, const char *delimiter, int max_tokens, int *n_tokens)
Split a string based on delimiters.
Definition: utils.c:71
data
Definition: filter.c:74
pw_conf_save_state
SPA_EXPORT int pw_conf_save_state(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:183
NAME
#define NAME
Definition: conf.c:48
impl.h
pw_properties::dict
struct spa_dict dict
dictionary of key/values
Definition: properties.h:46
pw_log::pw_log_info
#define pw_log_info(...)
Log an info message.
pw_context_parse_conf_section
SPA_EXPORT int pw_context_parse_conf_section(struct pw_context *context, struct pw_properties *conf, const char *section)
Definition: conf.c:530
pw_impl_module::pw_context_load_module
SPA_EXPORT struct pw_impl_module * pw_context_load_module(struct pw_context *context, const char *name, const char *args, struct pw_properties *properties)
Load a module.
Definition: impl-module.c:157
pw_log::pw_log_debug
#define pw_log_debug(...)
Log a debug message.
pw_log::pw_log_warn
#define pw_log_warn(...)
Log a warning message.
pw_context_parse_conf_section
int pw_context_parse_conf_section(struct pw_context *context, struct pw_properties *conf, const char *section)
Definition: conf.c:530
buffer
Definition: filter.c:58
pw_impl_factory_create_object
void * pw_impl_factory_create_object(struct pw_impl_factory *factory, struct pw_resource *resource, const char *type, uint32_t version, struct pw_properties *properties, uint32_t new_id)
Definition: impl-factory.c:261
pw_context
the PipeWire context
args
static uint32_t int int const char va_list args
Definition: core.h:327
pw_conf_load_conf
int pw_conf_load_conf(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:265
pw_conf_save_state
int pw_conf_save_state(const char *prefix, const char *name, const struct pw_properties *conf)
pw_properties_update_string
int pw_properties_update_string(struct pw_properties *props, const char *str, size_t size)
Definition: properties.c:149
pw_context::pw_context_find_factory
SPA_EXPORT struct pw_impl_factory * pw_context_find_factory(struct pw_context *context, const char *name)
Find a factory by name.
Definition: impl-factory.c:287
pw_properties::pw_properties_get
SPA_EXPORT const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:501
pw_conf_load_state
int pw_conf_load_state(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:271
pw_context_add_spa_lib
int pw_context_add_spa_lib(struct pw_context *context, const char *factory_regex, const char *lib)
add a spa library for the given factory_name regex
context.h
pw_conf_load_state
SPA_EXPORT int pw_conf_load_state(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:271
pw_utils::pw_free_strv
SPA_EXPORT void pw_free_strv(char **str)
Free a NULL terminated array of strings.
Definition: utils.c:105
pw_impl_factory
PipeWire factory interface.
pw_conf_load_conf
SPA_EXPORT int pw_conf_load_conf(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:265
pw_properties
A collection of key/value pairs.
Definition: properties.h:45