From fe294dfcf5b009d7dd5dd18b7a26f71eb619a893 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 24 Jul 2016 19:16:10 -0400 Subject: Add lilv_state_set_metadata() This allows setting useful metadata on a state description accessible to hosts but not plugins, such as pset:bank and rdfs:comment. Based on patch from Hanspeter Portner. --- lilv/lilv.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'lilv') diff --git a/lilv/lilv.h b/lilv/lilv.h index 8418e9a..af3873e 100644 --- a/lilv/lilv.h +++ b/lilv/lilv.h @@ -1382,6 +1382,28 @@ LILV_API void lilv_state_set_label(LilvState* state, const char* label); +/** + Set a metadata property on `state`. + @param state The state to set the metadata for. + @param key The key to store `value` under (URID). + @param value Pointer to the value to be stored. + @param size The size of `value` in bytes. + @param type The type of `value` (URID). + @param flags LV2_State_Flags for `value`. + @return 0 on success. + + This is a generic version of lilv_state_set_label(), which sets metadata + properties visible to hosts, but not plugins. This allows storing useful + information such as comments or preset banks. +*/ +LILV_API int +lilv_state_set_metadata(LilvState* state, + uint32_t key, + const void* value, + size_t size, + uint32_t type, + uint32_t flags); + /** Function to set a port value. @param port_symbol The symbol of the port. -- cgit v1.2.1