aboutsummaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
authorTimo Wischer <twischer@de.adit-jv.com>2018-09-29 13:31:26 +0200
committerDavid Robillard <d@drobilla.net>2018-11-10 11:45:15 +0100
commit8e5353cde5f9b09a9d122c1cc464aeeaa616e630 (patch)
tree6a55153a369199e34a2e308a3a0490e143e681d1 /src/state.c
parent9bf6ccb34caf39a17973570a7ba056b5579f4587 (diff)
downloadjalv-8e5353cde5f9b09a9d122c1cc464aeeaa616e630.tar.gz
jalv-8e5353cde5f9b09a9d122c1cc464aeeaa616e630.tar.bz2
jalv-8e5353cde5f9b09a9d122c1cc464aeeaa616e630.zip
Move features to Jalv struct
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/src/state.c b/src/state.c
index 0f52c86..899e61f 100644
--- a/src/state.c
+++ b/src/state.c
@@ -36,26 +36,6 @@
#define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#"
#define NS_XSD "http://www.w3.org/2001/XMLSchema#"
-extern LV2_Feature map_feature;
-extern LV2_Feature unmap_feature;
-extern LV2_Feature make_path_feature;
-extern LV2_Feature sched_feature;
-extern LV2_Feature state_sched_feature;
-extern LV2_Feature safe_restore_feature;
-extern LV2_Feature log_feature;
-extern LV2_Feature options_feature;
-extern LV2_Feature def_state_feature;
-
-const LV2_Feature* state_features[9] = {
- &map_feature, &unmap_feature,
- &make_path_feature,
- &state_sched_feature,
- &safe_restore_feature,
- &log_feature,
- &options_feature,
- NULL
-};
-
char*
jalv_make_path(LV2_State_Make_Path_Handle handle,
const char* path)
@@ -204,6 +184,17 @@ jalv_apply_state(Jalv* jalv, LilvState* state)
zix_sem_wait(&jalv->paused);
}
+ const LV2_Feature* state_features[9] = {
+ &jalv->features.map_feature,
+ &jalv->features.unmap_feature,
+ &jalv->features.make_path_feature,
+ &jalv->features.state_sched_feature,
+ &jalv->features.safe_restore_feature,
+ &jalv->features.log_feature,
+ &jalv->features.options_feature,
+ NULL
+ };
+
lilv_state_restore(
state, jalv->instance, set_port_value, jalv, 0, state_features);