13#ifndef __PLUGINS_LV2_LV2_STATE_H__
14#define __PLUGINS_LV2_LV2_STATE_H__
16#include "zrythm-config.h"
21#include <lv2/state/state.h>
31typedef int (*PresetSink) (
33 const LilvNode * node,
34 const LilvNode * title,
44lv2_state_get_abstract_path (
45 LV2_State_Map_Path_Handle handle,
46 const char * absolute_path);
53lv2_state_get_absolute_path (
54 LV2_State_Map_Path_Handle handle,
55 const char * abstract_path);
62 LV2_State_Free_Path_Handle handle,
72lv2_state_make_path_save (
73 LV2_State_Make_Path_Handle handle,
84WARN_UNUSED_RESULT NONNULL LilvState *
122 const char * filename);
144lv2_state_load_presets (
Lv2Plugin *
plugin, PresetSink sink,
void * data);
int lv2_state_save_preset(Lv2Plugin *plugin, const char *dir, const char *uri, const char *label, const char *filename)
Saves the preset.
bool lv2_state_apply_preset(Lv2Plugin *plugin, const LilvNode *preset, const char *path, GError **error)
Applies the given preset, or the preset in the path if preset is NULL.
WARN_UNUSED_RESULT NONNULL LilvState * lv2_state_save_to_file(Lv2Plugin *pl, bool is_backup)
Saves the plugin state to the filesystem and returns the state.
char * lv2_state_make_path_temp(LV2_State_Make_Path_Handle handle, const char *path)
LV2 State makePath feature for temporary files.
int lv2_state_delete_current_preset(Lv2Plugin *plugin)
Deletes the current preset.
LilvState * lv2_state_save_to_memory(Lv2Plugin *plugin)
Saves the plugin state into a new LilvState that can be applied to any plugin with the same URI (like...
LilvState * lv2_state_save_to_string(Lv2Plugin *pl, bool is_backup)
Saves the plugin state to a string after writing the required files.
LilvState * preset
Current preset.
Plugin * plugin
Base Plugin instance (parent).