metadata: remove wp_metadata_iterator_item_extract() API

Similar to WpPropertiesItem, this implements a new WpMetadataItem type that is
returned when iterating metadata
This commit is contained in:
Julian Bouzas
2024-02-23 13:41:46 -05:00
parent bebfc07d84
commit a23248847a
9 changed files with 308 additions and 79 deletions

View File

@@ -152,9 +152,11 @@ on_metadata_added (WpObjectManager *om, WpObject *obj, WpDefaultNodesApi * self)
g_auto (GValue) val = G_VALUE_INIT;
for (; wp_iterator_next (it, &val); g_value_unset (&val)) {
guint32 subject;
const gchar *key, *type, *value;
wp_metadata_iterator_item_extract (&val, &subject, &key, &type, &value);
WpMetadataItem *mi = g_value_get_boxed (&val);
guint32 subject = wp_metadata_item_get_subject (mi);
const gchar *key = wp_metadata_item_get_key (mi);
const gchar *type = wp_metadata_item_get_value_type (mi);
const gchar *value = wp_metadata_item_get_value (mi);
on_metadata_changed (WP_METADATA (obj), subject, key, type, value, self);
}