LV2_State_Store_Function

A host-provided function to store a property. @param handle Must be the handle passed to LV2_State_Interface.save(). @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, otherwise a non-zero error code.

The host passes a callback of this type to LV2_State_Interface.save(). This callback is called repeatedly by the plugin to store all the properties that describe its current state.

DO NOT INVENT NONSENSE URI SCHEMES FOR THE KEY. Best is to use keys from existing vocabularies. If nothing appropriate is available, use http URIs that point to somewhere you can host documents so documentation can be made resolvable (e.g. a child of the plugin or project URI). If this is not possible, invent a URN scheme, e.g. urn:myproj:whatever. The plugin MUST NOT pass an invalid URI key.

The host MAY fail to store a property for whatever reason, but SHOULD store any property that is LV2_STATE_IS_POD and LV2_STATE_IS_PORTABLE. Implementations SHOULD use the types from the LV2 Atom extension (http://lv2plug.in/ns/ext/atom) wherever possible. The plugin SHOULD attempt to fall-back and avoid the error if possible.

Note that size MUST be > 0, and value MUST point to a valid region of memory size bytes long (this is required to make restore unambiguous).

The plugin MUST NOT attempt to use this function outside of the LV2_State_Interface.restore() context.

version(LV2)
extern (C)
alias LV2_State_Store_Function = LV2_State_Status function
(,
uint32_t key
,
const void* value
,
size_t size
,
uint32_t type
,
uint32_t flags
)

Meta