aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv_internal.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-21 02:14:27 +0000
committerDavid Robillard <d@drobilla.net>2011-12-21 02:14:27 +0000
commit06b9ff8c265d7199ad5aebf1c8c7abc90cba934a (patch)
treea4ab15ce6cfd48d46b7fc3fade0b93304b7a0611 /src/jalv_internal.h
parent1d623932c5c465daa18dce2ce54f8e3b676f7a24 (diff)
downloadjalv-06b9ff8c265d7199ad5aebf1c8c7abc90cba934a.tar.gz
jalv-06b9ff8c265d7199ad5aebf1c8c7abc90cba934a.tar.bz2
jalv-06b9ff8c265d7199ad5aebf1c8c7abc90cba934a.zip
Add first-class PluginState object and make state interface more generic.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3893 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/jalv_internal.h')
-rw-r--r--src/jalv_internal.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/jalv_internal.h b/src/jalv_internal.h
index e6630e4..c35cce4 100644
--- a/src/jalv_internal.h
+++ b/src/jalv_internal.h
@@ -63,12 +63,11 @@ struct Port {
bool old_api; /**< True for event, false for atom */
};
-struct Property {
- uint32_t key;
- SerdNode value;
- SerdNode datatype;
-};
+typedef struct PluginStateImpl PluginState;
+const LilvNode*
+plugin_state_get_plugin_uri(const PluginState* state);
+
/**
Control change event, sent through ring buffers for UI updates.
*/
@@ -90,7 +89,6 @@ typedef struct {
LilvWorld* world; /**< Lilv World */
int ui_width; /**< Requested UI width */
int ui_height; /**< Requested UI height */
- struct Property* props; /**< Restored state properties */
LV2_URID_Map map;
LV2_URID_Unmap unmap;
Symap* symap; /**< Symbol (URI) map */
@@ -106,7 +104,6 @@ typedef struct {
struct Port* ports; /**< Port array of size num_ports */
size_t midi_buf_size; /**< Size of MIDI port buffers */
uint32_t num_ports; /**< Size of the two following arrays: */
- uint32_t num_props; /**< Number of properties */
uint32_t longest_sym; /**< Longest port symbol */
jack_nframes_t sample_rate; /**< Sample rate */
jack_nframes_t event_delta_t; /**< Frames since last update sent to UI */
@@ -176,11 +173,11 @@ jalv_save_port_values(Jalv* jalv,
SerdWriter* writer,
const SerdNode* subject);
-void
-jalv_restore(Jalv* jalv, const char* dir);
+PluginState*
+jalv_load_state(Jalv* jalv, const char* dir);
void
-jalv_restore_instance(Jalv* jalv, const char* dir);
+jalv_apply_state(Jalv* jalv, PluginState* state);
static inline char*
jalv_strdup(const char* str)