Commit 59580e7c authored by Julian Bouzas's avatar Julian Bouzas
Browse files

properties: add wp_properties_copy_all API

parent d3d977cb
......@@ -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)
{
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment