summaryrefslogtreecommitdiffstats
path: root/lilv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-06 05:05:40 +0000
committerDavid Robillard <d@drobilla.net>2012-03-06 05:05:40 +0000
commite45691df6be3f9a14cab019437ce2f2e8a54427e (patch)
tree3c542658dde9db649bc2d99c984001702a6bc6e7 /lilv
parentfdd97c39ab73bd298e30884e3312c9672f99d79a (diff)
downloadlilv-e45691df6be3f9a14cab019437ce2f2e8a54427e.tar.gz
lilv-e45691df6be3f9a14cab019437ce2f2e8a54427e.tar.bz2
lilv-e45691df6be3f9a14cab019437ce2f2e8a54427e.zip
Use raw type/size/value instead of LilvNode for port values.
Remove use of half-baked node_to_serd() and use sratom for port values as well. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4023 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'lilv')
-rw-r--r--lilv/lilv.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/lilv/lilv.h b/lilv/lilv.h
index ae5c557..5634835 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -1156,10 +1156,18 @@ lilv_state_new_from_file(LilvWorld* world,
/**
Function to get a port value.
- @return A node the caller (lilv) takes ownership of and must free.
+ @param port_symbol The symbol of the port.
+ @param user_data The user_data passed to lilv_state_new_from_instance().
+ @param size (Output) The size of the returned value.
+ @param type (Output) The URID of the type of the returned value.
+ @return A pointer to the port value.
+
+ This function MUST set @p size and @p type appropriately.
*/
-typedef LilvNode* (*LilvGetPortValueFunc)(const char* port_symbol,
- void* user_data);
+typedef const void* (*LilvGetPortValueFunc)(const char* port_symbol,
+ void* user_data,
+ uint32_t* size,
+ uint32_t* type);
/**
Create a new state snapshot from a plugin instance.
@@ -1277,10 +1285,17 @@ lilv_state_set_label(LilvState* state,
/**
Function to set a port value.
-*/
-typedef void (*LilvSetPortValueFunc)(const char* port_symbol,
- const LilvNode* value,
- void* user_data);
+ @param port_symbol The symbol of the port.
+ @param user_data The user_data passed to lilv_state_restore().
+ @param size The size of @p value.
+ @param type The URID of the type of @p value.
+ @param value A pointer to the port value.
+*/
+typedef void (*LilvSetPortValueFunc)(const char* port_symbol,
+ void* user_data,
+ const void* value,
+ uint32_t size,
+ uint32_t type);
/**
Restore a plugin instance from a state snapshot.