PipeWire  1.4.1
conf.h
Go to the documentation of this file.
1 /* PipeWire */
2 /* SPDX-FileCopyrightText: Copyright © 2021 Wim Taymans */
3 /* SPDX-License-Identifier: MIT */
4 
5 #ifndef PIPEWIRE_CONF_H
6 #define PIPEWIRE_CONF_H
7 
8 #include <spa/utils/json-core.h>
9 
10 #include <pipewire/context.h>
11 
21 int pw_conf_load_conf_for_context(struct pw_properties *props, struct pw_properties *conf);
22 int pw_conf_load_conf(const char *prefix, const char *name, struct pw_properties *conf);
23 int pw_conf_load_state(const char *prefix, const char *name, struct pw_properties *conf);
24 int pw_conf_save_state(const char *prefix, const char *name, const struct pw_properties *conf);
25 
26 bool pw_conf_find_match(struct spa_json *arr, const struct spa_dict *props, bool condition);
27 
28 int pw_conf_section_update_props(const struct spa_dict *conf,
29  const char *section, struct pw_properties *props);
30 
31 int pw_conf_section_update_props_rules(const struct spa_dict *conf,
32  const struct spa_dict *context, const char *section,
33  struct pw_properties *props);
34 
35 int pw_conf_section_for_each(const struct spa_dict *conf, const char *section,
36  int (*callback) (void *data, const char *location, const char *section,
37  const char *str, size_t len),
38  void *data);
39 
40 int pw_conf_match_rules(const char *str, size_t len, const char *location,
41  const struct spa_dict *props,
42  int (*callback) (void *data, const char *location, const char *action,
43  const char *str, size_t len),
44  void *data);
45 
46 int pw_conf_section_match_rules(const struct spa_dict *conf, const char *section,
47  const struct spa_dict *props,
48  int (*callback) (void *data, const char *location, const char *action,
49  const char *str, size_t len),
50  void *data);
55 #endif /* PIPEWIRE_CONF_H */
int pw_conf_section_for_each(const struct spa_dict *conf, const char *section, int(*callback)(void *data, const char *location, const char *section, const char *str, size_t len), void *data)
Definition: conf.c:1097
int pw_conf_section_update_props(const struct spa_dict *conf, const char *section, struct pw_properties *props)
Definition: conf.c:1161
bool pw_conf_find_match(struct spa_json *arr, const struct spa_dict *props, bool condition)
Definition: conf.c:633
int pw_conf_load_state(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:538
int pw_conf_save_state(const char *prefix, const char *name, const struct pw_properties *conf)
Definition: conf.c:351
int pw_conf_section_update_props_rules(const struct spa_dict *conf, const struct spa_dict *context, const char *section, struct pw_properties *props)
Definition: conf.c:1135
int pw_conf_load_conf(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:473
int pw_conf_section_match_rules(const struct spa_dict *conf, const char *section, const struct spa_dict *props, int(*callback)(void *data, const char *location, const char *action, const char *str, size_t len), void *data)
Definition: conf.c:1358
int pw_conf_load_conf_for_context(struct pw_properties *props, struct pw_properties *conf)
Definition: conf.c:1192
int pw_conf_match_rules(const char *str, size_t len, const char *location, const struct spa_dict *props, int(*callback)(void *data, const char *location, const char *action, const char *str, size_t len), void *data)
[ { matches = [
Definition: conf.c:1276
spa/utils/json-core.h
pipewire/context.h
Definition: properties.h:39
Definition: dict.h:51
Definition: json-core.h:48