Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Julian Bouzas
WirePlumber
Commits
59580e7c
Commit
59580e7c
authored
Dec 30, 2019
by
Julian Bouzas
Browse files
properties: add wp_properties_copy_all API
parent
d3d977cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/wp/properties.c
View file @
59580e7c
...
...
@@ -204,6 +204,21 @@ wp_properties_copy_keys_valist (WpProperties * src, WpProperties * dst,
return
changed
;
}
void
wp_properties_copy_all
(
WpProperties
*
src
,
WpProperties
*
dst
)
{
const
struct
spa_dict
*
dict
;
const
struct
spa_dict_item
*
item
;
g_return_if_fail
(
src
!=
NULL
);
g_return_if_fail
(
dst
!=
NULL
);
dict
=
wp_properties_peek_dict
(
src
);
spa_dict_for_each
(
item
,
dict
)
{
wp_properties_set
(
dst
,
item
->
key
,
item
->
value
);
}
}
const
gchar
*
wp_properties_get
(
WpProperties
*
self
,
const
gchar
*
key
)
{
...
...
lib/wp/properties.h
View file @
59580e7c
...
...
@@ -45,6 +45,7 @@ gint wp_properties_copy_keys (WpProperties * src, WpProperties * dst,
const
gchar
*
key1
,
...)
G_GNUC_NULL_TERMINATED
;
gint
wp_properties_copy_keys_valist
(
WpProperties
*
src
,
WpProperties
*
dst
,
const
gchar
*
key1
,
va_list
args
);
void
wp_properties_copy_all
(
WpProperties
*
src
,
WpProperties
*
dst
);
const
gchar
*
wp_properties_get
(
WpProperties
*
self
,
const
gchar
*
key
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment