From cedf1a1f9e1e007aaf72757d896ed3455da10f69 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Apr 2007 00:44:32 +0000 Subject: Reworked query/value system to expose data type. git-svn-id: http://svn.drobilla.net/lad/slv2@475 a436a847-0d15-0410-975c-d299462d15a1 --- src/slv2_internal.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/slv2_internal.h') diff --git a/src/slv2_internal.h b/src/slv2_internal.h index a9683c3..180f07d 100644 --- a/src/slv2_internal.h +++ b/src/slv2_internal.h @@ -30,6 +30,7 @@ extern "C" { #include + /** Reference to a port on some plugin. */ struct _Port { @@ -119,6 +120,26 @@ slv2_world_load_path(SLV2World world, const char* search_path); +typedef enum _ValueType { + SLV2_VALUE_URI, + SLV2_VALUE_STRING, + SLV2_VALUE_INT, + SLV2_VALUE_FLOAT +} SLV2ValueType; + +struct _Value { + SLV2ValueType type; + char* str_val; ///< always present + union { + int int_val; + float float_val; + } val; +}; + +SLV2Value slv2_value_new(SLV2ValueType type, const char* val); +void slv2_value_free(SLV2Value val); + + #ifdef __cplusplus } #endif -- cgit v1.2.1