summaryrefslogtreecommitdiffstats
path: root/lilv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-24 19:16:10 -0400
committerDavid Robillard <d@drobilla.net>2016-07-24 19:17:07 -0400
commitfe294dfcf5b009d7dd5dd18b7a26f71eb619a893 (patch)
treefcacac7b16b39a92d4f908d2b36fbe963d100e43 /lilv
parentd92e316db4d5e28a05400d834e9f43c592f764fb (diff)
downloadlilv-fe294dfcf5b009d7dd5dd18b7a26f71eb619a893.tar.gz
lilv-fe294dfcf5b009d7dd5dd18b7a26f71eb619a893.tar.bz2
lilv-fe294dfcf5b009d7dd5dd18b7a26f71eb619a893.zip
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.
Diffstat (limited to 'lilv')
-rw-r--r--lilv/lilv.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/lilv/lilv.h b/lilv/lilv.h
index 8418e9a..af3873e 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -1383,6 +1383,28 @@ 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.
@param user_data The user_data passed to lilv_state_restore().