PipeWire  0.3.33
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);
pw_properties_get
int int const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:487
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:645
spa_json_container_len
int spa_json_container_len(struct spa_json *iter, const char *value, int len)
Definition: json.h:198
spa_json_enter_object
int spa_json_enter_object(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:212
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
Definition: context.c:1303
name
const char * name
Definition: media-session.c:2379
string.h
data
user data to add to an object
Definition: filter.c:75
pw_context_load_module
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:158
spa_streq
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
spa_aprintf
#define spa_aprintf(_fmt,...)
Definition: defs.h:323
SPA_EXPORT
#define SPA_EXPORT
Definition: defs.h:208
pw_conf_load_state
int pw_conf_load_state(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:362
NAME
#define NAME
Definition: conf.c:49
pw_free_strv
void pw_free_strv(char **str)
Free a NULL terminated array of strings.
Definition: utils.c:98
impl.h
pw_properties::dict
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
spa_json_is_container
int spa_json_is_container(const char *val, int len)
Definition: json.h:193
pw_properties_serialize_dict
int pw_properties_serialize_dict(FILE *f, const struct spa_dict *dict, uint32_t flags)
Definition: properties.c:567
pw_split_strv
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:66
spa_json_init
void spa_json_init(struct spa_json *iter, const char *data, size_t size)
Definition: json.h:59
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:645
buffer
Definition: filter.c:59
spa_json_parse_string
int spa_json_parse_string(const char *val, int len, char *result)
Definition: json.h:314
spa_json_get_string
int spa_json_get_string(struct spa_json *iter, char *res, int maxlen)
Definition: json.h:358
result.h
pw_conf_load_conf
int pw_conf_load_conf(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:344
pw_conf_save_state
int pw_conf_save_state(const char *prefix, const char *name, const struct pw_properties *conf)
pw_properties_new_string
struct pw_properties * pw_properties_new_string(const char *args)
Make a new properties object from the given str.
Definition: properties.c:197
pw_log_debug
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
spa_json_next
int spa_json_next(struct spa_json *iter, const char **value)
Get the next token.
Definition: json.h:72
pw_conf_load_conf
int pw_conf_load_conf(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:344
SPA_ID_INVALID
#define SPA_ID_INVALID
Definition: defs.h:182
pw_context_find_factory
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_update_string
int pw_properties_update_string(struct pw_properties *props, const char *str, size_t size)
Update the properties from the given string, overwriting any existing keys with the new values from s...
Definition: properties.c:154
pw_conf_load_state
int pw_conf_load_state(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:362
pw_log_warn
#define pw_log_warn(...)
Definition: src/pipewire/log.h:87
json.h
context.h
spa_json_enter_array
int spa_json_enter_array(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:222
pw_log_info
#define pw_log_info(...)
Definition: src/pipewire/log.h:88
pw_check_option
bool pw_check_option(const char *option, const char *value)
Definition: pipewire.c:693
PW_PROPERTIES_FLAG_NL
#define PW_PROPERTIES_FLAG_NL
Definition: properties.h:103
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
spa_json
Definition: json.h:49
pw_conf_save_state
int pw_conf_save_state(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:279
pw_properties
Definition: properties.h:49
pw_log_error
#define pw_log_error(...)
Definition: src/pipewire/log.h:86