From e45691df6be3f9a14cab019437ce2f2e8a54427e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 6 Mar 2012 05:05:40 +0000 Subject: 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 --- lilv/lilv.h | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'lilv') 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. -- cgit v1.2.1