properties: add wp_properties_sort()

Depends on pipewire!555 to avoid breaking stuff
This commit is contained in:
George Kiagiadakis 2021-03-26 19:06:06 +02:00
parent 95bb22efe2
commit eeccb24017
2 changed files with 15 additions and 0 deletions

View file

@ -848,6 +848,16 @@ wp_properties_iterator_item_get_value (const GValue * item)
return dict_item->value;
}
void
wp_properties_sort (WpProperties * self)
{
g_return_if_fail (self != NULL);
g_return_if_fail (!(self->flags & FLAG_IS_DICT));
g_return_if_fail (!(self->flags & FLAG_NO_OWNERSHIP));
return spa_dict_qsort (&self->props->dict);
}
/**
* wp_properties_peek_dict:
* @self: a properties object

View file

@ -144,6 +144,11 @@ const gchar * wp_properties_iterator_item_get_key (const GValue * item);
WP_API
const gchar * wp_properties_iterator_item_get_value (const GValue * item);
/* sort */
WP_API
void wp_properties_sort (WpProperties * self);
/* convert */
WP_API