diff --git a/lib/wp/properties.c b/lib/wp/properties.c index 9cf374c7..6581f7a6 100644 --- a/lib/wp/properties.c +++ b/lib/wp/properties.c @@ -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 diff --git a/lib/wp/properties.h b/lib/wp/properties.h index 04eae8ab..e29808c8 100644 --- a/lib/wp/properties.h +++ b/lib/wp/properties.h @@ -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