From fdd97c39ab73bd298e30884e3312c9672f99d79a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 5 Mar 2012 22:20:10 +0000 Subject: Add missing pkg-config dependencies. Update for latest state extension. Tidy. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4022 a436a847-0d15-0410-975c-d299462d15a1 --- src/state.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/state.c b/src/state.c index 7d0f7f2..a9bd1ec 100644 --- a/src/state.c +++ b/src/state.c @@ -44,8 +44,8 @@ typedef struct { } Property; typedef struct { - char* symbol; - LilvNode* value; + char* symbol; ///< Symbol of port + LilvNode* value; ///< Value of port } PortValue; typedef struct { @@ -54,19 +54,19 @@ typedef struct { } PathMap; struct LilvStateImpl { - LilvNode* plugin_uri; - char* dir; ///< Save directory (if saved) - char* file_dir; - char* copy_dir; - char* link_dir; - char* label; - ZixTree* abs2rel; ///< PathMap sorted by abs - ZixTree* rel2abs; ///< PathMap sorted by rel - Property* props; - PortValue* values; - uint32_t atom_Path; - uint32_t num_props; - uint32_t num_values; + LilvNode* plugin_uri; ///< Plugin URI + char* dir; ///< Save directory (if saved) + char* file_dir; ///< Directory for files created by plugin + char* copy_dir; ///< Directory for snapshots of external files + char* link_dir; ///< Directory for links to external files + char* label; ///< State/Preset label + ZixTree* abs2rel; ///< PathMap sorted by abs + ZixTree* rel2abs; ///< PathMap sorted by rel + Property* props; ///< State properties + PortValue* values; ///< Port values + uint32_t atom_Path; ///< atom:Path URID + uint32_t num_props; ///< Number of state properties + uint32_t num_values; ///< Number of port values }; static int @@ -103,9 +103,7 @@ path_rel_free(void* ptr) } static PortValue* -append_port_value(LilvState* state, - const char* port_symbol, - LilvNode* value) +append_port_value(LilvState* state, const char* port_symbol, LilvNode* value) { if (value) { state->values = (PortValue*)realloc( @@ -131,7 +129,7 @@ lilv_state_rel2abs(const LilvState* state, const char* path) #ifdef HAVE_LV2_STATE -static int +static LV2_State_Status store_callback(void* handle, uint32_t key, const void* value, @@ -1085,8 +1083,7 @@ lilv_state_get_label(const LilvState* state) LILV_API void -lilv_state_set_label(LilvState* state, - const char* label) +lilv_state_set_label(LilvState* state, const char* label) { const size_t len = strlen(label); state->label = realloc(state->label, len + 1); -- cgit v1.2.1