[][src]Function lilv_sys::lilv_state_restore

pub unsafe extern "C" fn lilv_state_restore(
    state: *const LilvState,
    instance: *mut LilvInstance,
    set_value: LilvSetPortValueFunc,
    user_data: *mut c_void,
    flags: u32,
    features: *const *const LV2Feature
)

Restore a plugin instance from a state snapshot. @param state The state to restore, which must apply to the correct plugin. @param instance An instance of the plugin state applies to, or NULL. @param set_value A function to set a port value (may be NULL). @param user_data User data to pass to set_value. @param flags Bitwise OR of LV2_State_Flags values. @param features Features to pass LV2_State_Interface.restore().

This will set all the properties of instance, if given, to the values stored in state. If set_value is provided, it will be called (with the given user_data) to restore each port value, otherwise the host must restore the port values itself (using lilv_state_get_port_value()) in order to completely restore state.

If the state has properties and instance is given, this function is in the "instantiation" threading class, i.e. it MUST NOT be called simultaneously with any function on the same plugin instance. If the state has no properties, only port values are set via set_value.

See state.h from the LV2 State extension for details on the flags and features parameters.