20 #ifndef __PIPEWIRE_PROPERTIES_H__ 21 #define __PIPEWIRE_PROPERTIES_H__ 63 const char *key,
const char *format, ...) SPA_PRINTF_FUNC(3, 4);
70 static inline
bool pw_properties_parse_bool(const
char *value) {
71 return (strcmp(value,
"true") == 0 || atoi(value) == 1);
74 static inline int pw_properties_parse_int(
const char *value) {
75 return strtol(value, NULL, 0);
78 static inline int64_t pw_properties_parse_int64(
const char *value) {
79 return strtoll(value, NULL, 0);
82 static inline uint64_t pw_properties_parse_uint64(
const char *value) {
83 return strtoull(value, NULL, 0);
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:191
A collection of key/value pairs.
Definition: properties.h:38
struct pw_properties * pw_properties_merge(const struct pw_properties *oldprops, struct pw_properties *newprops)
Merge properties into one.
Definition: properties.c:158
void pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...)
Set a property value by format.
Definition: properties.c:258
struct pw_properties * pw_properties_copy(const struct pw_properties *properties)
Copy a properties object.
Definition: properties.c:131
struct spa_dict dict
Definition: properties.h:39
const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:280
void pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:241
struct pw_properties * pw_properties_new_dict(const struct spa_dict *dict)
Make a new properties object from the given dictionary.
Definition: properties.c:104
const char * pw_properties_iterate(const struct pw_properties *properties, void **state)
Iterate property values.
Definition: properties.c:304
struct pw_properties * pw_properties_new(const char *key,...)
Make a new properties object.
Definition: properties.c:74