summaryrefslogtreecommitdiffstats
path: root/lilv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-29 17:30:30 +0000
committerDavid Robillard <d@drobilla.net>2011-04-29 17:30:30 +0000
commit1e7b27c7b322476c437a8524cff4a88245c5efbf (patch)
tree842f8d0e79218859bb2afcb08250a10b9b3509f8 /lilv
parent22f4ed918d99c17cd3bb8890eeaac173060394bf (diff)
downloadlilv-1e7b27c7b322476c437a8524cff4a88245c5efbf.tar.gz
lilv-1e7b27c7b322476c437a8524cff4a88245c5efbf.tar.bz2
lilv-1e7b27c7b322476c437a8524cff4a88245c5efbf.zip
LilvValue => LilvNode.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3234 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'lilv')
-rw-r--r--lilv/lilv.h216
-rw-r--r--lilv/lilvmm.hpp130
2 files changed, 173 insertions, 173 deletions
diff --git a/lilv/lilv.h b/lilv/lilv.h
index 9631efe..0f3e998 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -62,7 +62,7 @@ typedef struct LilvPluginClassImpl LilvPluginClass; /**< Plugin Class. */
typedef struct LilvPortImpl LilvPort; /**< Port. */
typedef struct LilvScalePointImpl LilvScalePoint; /**< Scale Point (Notch). */
typedef struct LilvUIImpl LilvUI; /**< Plugin UI. */
-typedef struct LilvValueImpl LilvValue; /**< Typed Value. */
+typedef struct LilvNodeImpl LilvNode; /**< Typed Value. */
typedef struct LilvWorldImpl LilvWorld; /**< Lilv World. */
typedef struct LilvInstanceImpl LilvInstance; /**< Plugin instance. */
@@ -71,7 +71,7 @@ typedef void LilvPluginClasses; /**< set<PluginClass>. */
typedef void LilvPlugins; /**< set<Plugin>. */
typedef void LilvScalePoints; /**< set<ScalePoint>. */
typedef void LilvUIs; /**< set<UI>. */
-typedef void LilvValues; /**< set<Value>. */
+typedef void LilvNodes; /**< set<Value>. */
/**
@defgroup lilv Lilv
@@ -99,64 +99,64 @@ lilv_uri_to_path(const char* uri);
/**
Create a new URI value.
- Returned value must be freed by caller with lilv_value_free.
+ Returned value must be freed by caller with lilv_node_free.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_new_uri(LilvWorld* world, const char* uri);
/**
Create a new string value (with no language).
- Returned value must be freed by caller with lilv_value_free.
+ Returned value must be freed by caller with lilv_node_free.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_new_string(LilvWorld* world, const char* str);
/**
Create a new integer value.
- Returned value must be freed by caller with lilv_value_free.
+ Returned value must be freed by caller with lilv_node_free.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_new_int(LilvWorld* world, int val);
/**
Create a new floating point value.
- Returned value must be freed by caller with lilv_value_free.
+ Returned value must be freed by caller with lilv_node_free.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_new_float(LilvWorld* world, float val);
/**
Create a new boolean value.
- Returned value must be freed by caller with lilv_value_free.
+ Returned value must be freed by caller with lilv_node_free.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_new_bool(LilvWorld* world, bool val);
/**
- Free an LilvValue.
+ Free an LilvNode.
*/
LILV_API
void
-lilv_value_free(LilvValue* val);
+lilv_node_free(LilvNode* val);
/**
- Duplicate an LilvValue.
+ Duplicate an LilvNode.
*/
LILV_API
-LilvValue*
-lilv_value_duplicate(const LilvValue* val);
+LilvNode*
+lilv_node_duplicate(const LilvNode* val);
/**
Return whether two values are equivalent.
*/
LILV_API
bool
-lilv_value_equals(const LilvValue* value, const LilvValue* other);
+lilv_node_equals(const LilvNode* value, const LilvNode* other);
/**
Return this value as a Turtle/SPARQL token.
@@ -173,39 +173,39 @@ lilv_value_equals(const LilvValue* value, const LilvValue* other);
*/
LILV_API
char*
-lilv_value_get_turtle_token(const LilvValue* value);
+lilv_node_get_turtle_token(const LilvNode* value);
/**
Return whether the value is a URI (resource).
*/
LILV_API
bool
-lilv_value_is_uri(const LilvValue* value);
+lilv_node_is_uri(const LilvNode* value);
/**
Return this value as a URI string, e.g. "http://example.org/foo".
- Valid to call only if lilv_value_is_uri(@a value) returns true.
+ Valid to call only if lilv_node_is_uri(@a value) returns true.
Returned value is owned by @a value and must not be freed by caller.
*/
LILV_API
const char*
-lilv_value_as_uri(const LilvValue* value);
+lilv_node_as_uri(const LilvNode* value);
/**
Return whether the value is a blank node (resource with no URI).
*/
LILV_API
bool
-lilv_value_is_blank(const LilvValue* value);
+lilv_node_is_blank(const LilvNode* value);
/**
Return this value as a blank node identifier, e.g. "genid03".
- Valid to call only if lilv_value_is_blank(@a value) returns true.
+ Valid to call only if lilv_node_is_blank(@a value) returns true.
Returned value is owned by @a value and must not be freed by caller.
*/
LILV_API
const char*
-lilv_value_as_blank(const LilvValue* value);
+lilv_node_as_blank(const LilvNode* value);
/**
Return whether this value is a literal (i.e. not a URI).
@@ -213,7 +213,7 @@ lilv_value_as_blank(const LilvValue* value);
*/
LILV_API
bool
-lilv_value_is_literal(const LilvValue* value);
+lilv_node_is_literal(const LilvNode* value);
/**
Return whether this value is a string literal.
@@ -221,60 +221,60 @@ lilv_value_is_literal(const LilvValue* value);
*/
LILV_API
bool
-lilv_value_is_string(const LilvValue* value);
+lilv_node_is_string(const LilvNode* value);
/**
Return @a value as a string.
*/
LILV_API
const char*
-lilv_value_as_string(const LilvValue* value);
+lilv_node_as_string(const LilvNode* value);
/**
Return whether this value is a decimal literal.
*/
LILV_API
bool
-lilv_value_is_float(const LilvValue* value);
+lilv_node_is_float(const LilvNode* value);
/**
Return @a value as a float.
- Valid to call only if lilv_value_is_float(@a value) or
- lilv_value_is_int(@a value) returns true.
+ Valid to call only if lilv_node_is_float(@a value) or
+ lilv_node_is_int(@a value) returns true.
*/
LILV_API
float
-lilv_value_as_float(const LilvValue* value);
+lilv_node_as_float(const LilvNode* value);
/**
Return whether this value is an integer literal.
*/
LILV_API
bool
-lilv_value_is_int(const LilvValue* value);
+lilv_node_is_int(const LilvNode* value);
/**
Return @a value as an integer.
- Valid to call only if lilv_value_is_int(@a value) returns true.
+ Valid to call only if lilv_node_is_int(@a value) returns true.
*/
LILV_API
int
-lilv_value_as_int(const LilvValue* value);
+lilv_node_as_int(const LilvNode* value);
/**
Return whether this value is a boolean.
*/
LILV_API
bool
-lilv_value_is_bool(const LilvValue* value);
+lilv_node_is_bool(const LilvNode* value);
/**
Return @a value as a bool.
- Valid to call only if lilv_value_is_bool(@a value) returns true.
+ Valid to call only if lilv_node_is_bool(@a value) returns true.
*/
LILV_API
bool
-lilv_value_as_bool(const LilvValue* value);
+lilv_node_as_bool(const LilvNode* value);
/**
@}
@@ -284,7 +284,7 @@ lilv_value_as_bool(const LilvValue* value);
<li>LilvPlugins (function prefix "lilv_plugins_")</li>
<li>LilvPluginClasses (function prefix "lilv_plugin_classes_")</li>
<li>LilvScalePoints (function prefix "lilv_scale_points_")</li>
- <li>LilvValues (function prefix "lilv_values_")</li>
+ <li>LilvNodes (function prefix "lilv_nodes_")</li>
<li>LilvUIs (function prefix "lilv_uis_")</li>
</ul>
@@ -348,7 +348,7 @@ lilv_plugin_classes_is_end(const LilvPluginClasses* collection, LilvIter* i);
LILV_API
const LilvPluginClass*
lilv_plugin_classes_get_by_uri(const LilvPluginClasses* classes,
- const LilvValue* uri);
+ const LilvNode* uri);
/* ScalePoints */
@@ -411,44 +411,44 @@ lilv_uis_is_end(const LilvUIs* collection, LilvIter* i);
LILV_API
const LilvUI*
lilv_uis_get_by_uri(const LilvUIs* uis,
- const LilvValue* uri);
+ const LilvNode* uri);
/* Values */
LILV_API
void
-lilv_values_free(LilvValues* collection);
+lilv_nodes_free(LilvNodes* collection);
LILV_API
unsigned
-lilv_values_size(const LilvValues* collection);
+lilv_nodes_size(const LilvNodes* collection);
LILV_API
LilvIter*
-lilv_values_begin(const LilvValues* collection);
+lilv_nodes_begin(const LilvNodes* collection);
LILV_API
-const LilvValue*
-lilv_values_get(const LilvValues* collection, LilvIter* i);
+const LilvNode*
+lilv_nodes_get(const LilvNodes* collection, LilvIter* i);
LILV_API
LilvIter*
-lilv_values_next(const LilvValues* collection, LilvIter* i);
+lilv_nodes_next(const LilvNodes* collection, LilvIter* i);
LILV_API
bool
-lilv_values_is_end(const LilvValues* collection, LilvIter* i);
+lilv_nodes_is_end(const LilvNodes* collection, LilvIter* i);
LILV_API
-LilvValue*
-lilv_values_get_first(const LilvValues* collection);
+LilvNode*
+lilv_nodes_get_first(const LilvNodes* collection);
/**
Return whether @a values contains @a value.
*/
LILV_API
bool
-lilv_values_contains(const LilvValues* values, const LilvValue* value);
+lilv_nodes_contains(const LilvNodes* values, const LilvNode* value);
/* Plugins */
@@ -481,7 +481,7 @@ lilv_plugins_is_end(const LilvPlugins* collection, LilvIter* i);
LILV_API
const LilvPlugin*
lilv_plugins_get_by_uri(const LilvPlugins* plugins,
- const LilvValue* uri);
+ const LilvNode* uri);
/**
@}
@@ -527,7 +527,7 @@ LILV_API
void
lilv_world_set_option(LilvWorld* world,
const char* uri,
- const LilvValue* value);
+ const LilvNode* value);
/**
Destroy the world, mwahaha.
@@ -569,7 +569,7 @@ lilv_world_load_all(LilvWorld* world);
LILV_API
void
lilv_world_load_bundle(LilvWorld* world,
- LilvValue* bundle_uri);
+ LilvNode* bundle_uri);
/**
Get the parent of all other plugin classes, lv2:Plugin.
@@ -636,7 +636,7 @@ lilv_plugin_verify(const LilvPlugin* plugin);
@return A shared URI value which must not be modified or freed.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_plugin_get_uri(const LilvPlugin* plugin);
/**
@@ -651,7 +651,7 @@ lilv_plugin_get_uri(const LilvPlugin* plugin);
@return a shared string which must not be modified or freed.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_plugin_get_bundle_uri(const LilvPlugin* plugin);
/**
@@ -663,7 +663,7 @@ lilv_plugin_get_bundle_uri(const LilvPlugin* plugin);
which is shared and must not be modified or freed.
*/
LILV_API
-const LilvValues*
+const LilvNodes*
lilv_plugin_get_data_uris(const LilvPlugin* plugin);
/**
@@ -673,7 +673,7 @@ lilv_plugin_get_data_uris(const LilvPlugin* plugin);
@return a shared string which must not be modified or freed.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_plugin_get_library_uri(const LilvPlugin* plugin);
/**
@@ -684,7 +684,7 @@ lilv_plugin_get_library_uri(const LilvPlugin* plugin);
Returned value must be freed by the caller.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_plugin_get_name(const LilvPlugin* plugin);
/**
@@ -703,13 +703,13 @@ lilv_plugin_get_class(const LilvPlugin* plugin);
<code>&lt;plugin-uri&gt; predicate ?object</code>
May return NULL if the property was not found, or if object(s) is not
- sensibly represented as an LilvValues (e.g. blank nodes).
- Return value must be freed by caller with lilv_values_free.
+ sensibly represented as an LilvNodes (e.g. blank nodes).
+ Return value must be freed by caller with lilv_nodes_free.
*/
LILV_API
-LilvValues*
+LilvNodes*
lilv_plugin_get_value(const LilvPlugin* p,
- const LilvValue* predicate);
+ const LilvNode* predicate);
/**
Get a value associated with some subject in a plugin's data files.
@@ -723,14 +723,14 @@ lilv_plugin_get_value(const LilvPlugin* p,
(if information about it is contained in the plugin's data files).
May return NULL if the property was not found, or if object is not
- sensibly represented as an LilvValues (e.g. blank nodes).
- Return value must be freed by caller with lilv_values_free.
+ sensibly represented as an LilvNodes (e.g. blank nodes).
+ Return value must be freed by caller with lilv_nodes_free.
*/
LILV_API
-LilvValues*
+LilvNodes*
lilv_plugin_get_value_for_subject(const LilvPlugin* p,
- const LilvValue* subject_uri,
- const LilvValue* predicate_uri);
+ const LilvNode* subject_uri,
+ const LilvNode* predicate_uri);
/**
Return whether a feature is supported by a plugin.
@@ -740,7 +740,7 @@ lilv_plugin_get_value_for_subject(const LilvPlugin* p,
LILV_API
bool
lilv_plugin_has_feature(const LilvPlugin* p,
- const LilvValue* feature_uri);
+ const LilvNode* feature_uri);
/**
Get the LV2 Features supported (required or optionally) by a plugin.
@@ -750,10 +750,10 @@ lilv_plugin_has_feature(const LilvPlugin* p,
probably shouldn't be used by normal hosts. Using lilv_plugin_get_optional_features
and lilv_plugin_get_required_features separately is best in most cases.
- Returned value must be freed by caller with lilv_values_free.
+ Returned value must be freed by caller with lilv_nodes_free.
*/
LILV_API
-LilvValues*
+LilvNodes*
lilv_plugin_get_supported_features(const LilvPlugin* p);
/**
@@ -765,10 +765,10 @@ lilv_plugin_get_supported_features(const LilvPlugin* p);
(along with data, if necessary, as defined by the feature specification)
or plugin instantiation will fail.
- Return value must be freed by caller with lilv_values_free.
+ Return value must be freed by caller with lilv_nodes_free.
*/
LILV_API
-LilvValues*
+LilvNodes*
lilv_plugin_get_required_features(const LilvPlugin* p);
/**
@@ -777,10 +777,10 @@ lilv_plugin_get_required_features(const LilvPlugin* p);
MUST operate (at least somewhat) if they are instantiated without being
passed optional features.
- Return value must be freed by caller with lilv_values_free.
+ Return value must be freed by caller with lilv_nodes_free.
*/
LILV_API
-LilvValues*
+LilvNodes*
lilv_plugin_get_optional_features(const LilvPlugin* p);
/**
@@ -820,7 +820,7 @@ lilv_plugin_get_port_ranges_float(const LilvPlugin* p,
LILV_API
uint32_t
lilv_plugin_get_num_ports_of_class(const LilvPlugin* p,
- const LilvValue* class_1, ...);
+ const LilvNode* class_1, ...);
/**
Return whether or not the plugin introduces (and reports) latency.
@@ -860,7 +860,7 @@ lilv_plugin_get_port_by_index(const LilvPlugin* plugin,
LILV_API
const LilvPort*
lilv_plugin_get_port_by_symbol(const LilvPlugin* plugin,
- const LilvValue* symbol);
+ const LilvNode* symbol);
/**
Get the full name of the plugin's author.
@@ -868,7 +868,7 @@ lilv_plugin_get_port_by_symbol(const LilvPlugin* plugin,
Returned value must be freed by caller.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_plugin_get_author_name(const LilvPlugin* plugin);
/**
@@ -877,7 +877,7 @@ lilv_plugin_get_author_name(const LilvPlugin* plugin);
Returned value must be freed by caller.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_plugin_get_author_email(const LilvPlugin* plugin);
/**
@@ -886,7 +886,7 @@ lilv_plugin_get_author_email(const LilvPlugin* plugin);
Returned value must be freed by caller.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_plugin_get_author_homepage(const LilvPlugin* plugin);
/**
@@ -909,16 +909,16 @@ lilv_plugin_is_replaced(const LilvPlugin* plugin);
Port analog of lilv_plugin_get_value.
*/
LILV_API
-LilvValues*
+LilvNodes*
lilv_port_get_value(const LilvPlugin* plugin,
const LilvPort* port,
- const LilvValue* predicate);
+ const LilvNode* predicate);
/**
Return the LV2 port properties of a port.
*/
LILV_API
-LilvValues*
+LilvNodes*
lilv_port_get_properties(const LilvPlugin* plugin,
const LilvPort* port);
@@ -929,7 +929,7 @@ LILV_API
bool
lilv_port_has_property(const LilvPlugin* p,
const LilvPort* port,
- const LilvValue* property_uri);
+ const LilvNode* property_uri);
/**
Return whether a port is an event port and supports a certain event type.
@@ -938,7 +938,7 @@ LILV_API
bool
lilv_port_supports_event(const LilvPlugin* p,
const LilvPort* port,
- const LilvValue* event_uri);
+ const LilvNode* event_uri);
/**
Get the symbol of a port.
@@ -946,7 +946,7 @@ lilv_port_supports_event(const LilvPlugin* p,
Returned value is owned by @a port and must not be freed.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_port_get_symbol(const LilvPlugin* plugin,
const LilvPort* port);
@@ -957,7 +957,7 @@ lilv_port_get_symbol(const LilvPlugin* plugin,
the caller.
*/
LILV_API
-LilvValue*
+LilvNode*
lilv_port_get_name(const LilvPlugin* plugin,
const LilvPort* port);
@@ -969,14 +969,14 @@ lilv_port_get_name(const LilvPlugin* plugin,
Returned value is shared and must not be destroyed by caller.
*/
LILV_API
-const LilvValues*
+const LilvNodes*
lilv_port_get_classes(const LilvPlugin* plugin,
const LilvPort* port);
/**
Determine if a port is of a given class (input, output, audio, etc).
For convenience/performance/extensibility reasons, hosts are expected to
- create an LilvValue for each port class they "care about". Well-known type
+ create an LilvNode for each port class they "care about". Well-known type
URI strings are defined (e.g. LILV_PORT_CLASS_INPUT) for convenience, but
this function is designed so that Lilv is usable with any port types
without requiring explicit support in Lilv.
@@ -985,23 +985,23 @@ LILV_API
bool
lilv_port_is_a(const LilvPlugin* plugin,
const LilvPort* port,
- const LilvValue* port_class);
+ const LilvNode* port_class);
/**
Get the default, minimum, and maximum values of a port.
@a def, @a min, and @a max are outputs, pass pointers to uninitialized
- LilvValue* variables. These will be set to point at new values (which must
- be freed by the caller using lilv_value_free), or NULL if the value does not
+ LilvNode* variables. These will be set to point at new values (which must
+ be freed by the caller using lilv_node_free), or NULL if the value does not
exist.
*/
LILV_API
void
lilv_port_get_range(const LilvPlugin* plugin,
const LilvPort* port,
- LilvValue** deflt,
- LilvValue** min,
- LilvValue** max);
+ LilvNode** deflt,
+ LilvNode** min,
+ LilvNode** max);
/**
Get the scale points (enumeration values) of a port.
@@ -1026,7 +1026,7 @@ lilv_port_get_scale_points(const LilvPlugin* plugin,
Returned value is owned by @a point and must not be freed.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_scale_point_get_label(const LilvScalePoint* point);
/**
@@ -1034,7 +1034,7 @@ lilv_scale_point_get_label(const LilvScalePoint* point);
Returned value is owned by @a point and must not be freed.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_scale_point_get_value(const LilvScalePoint* point);
/**
@@ -1049,7 +1049,7 @@ lilv_scale_point_get_value(const LilvScalePoint* point);
Returned value may be NULL, if class has no parent.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_plugin_class_get_parent_uri(const LilvPluginClass* plugin_class);
/**
@@ -1057,7 +1057,7 @@ lilv_plugin_class_get_parent_uri(const LilvPluginClass* plugin_class);
Returned value is owned by @a plugin_class and must not be freed by caller.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_plugin_class_get_uri(const LilvPluginClass* plugin_class);
/**
@@ -1065,7 +1065,7 @@ lilv_plugin_class_get_uri(const LilvPluginClass* plugin_class);
Returned value is owned by @a plugin_class and must not be freed by caller.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_plugin_class_get_label(const LilvPluginClass* plugin_class);
/**
@@ -1252,7 +1252,7 @@ lilv_plugin_get_uis(const LilvPlugin* plugin);
@return a shared value which must not be modified or freed.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_ui_get_uri(const LilvUI* ui);
/**
@@ -1264,7 +1264,7 @@ lilv_ui_get_uri(const LilvUI* ui);
UI type, avoding the need to use this function (and type specific logic).
*/
LILV_API
-const LilvValues*
+const LilvNodes*
lilv_ui_get_classes(const LilvUI* ui);
/**
@@ -1274,7 +1274,7 @@ lilv_ui_get_classes(const LilvUI* ui);
*/
LILV_API
bool
-lilv_ui_is_a(const LilvUI* ui, const LilvValue* class_uri);
+lilv_ui_is_a(const LilvUI* ui, const LilvNode* class_uri);
/**
Function to determine whether a UI type is supported.
@@ -1291,15 +1291,15 @@ typedef unsigned (*LilvUISupportedFunc)(const char* container_type_uri,
@param supported_func User provided supported predicate.
@param container_type The widget type to host the UI within.
@param ui_type (Output) If non-NULL, set to the native type of the UI
- which the caller must free with lilv_value_free.
+ which the caller must free with lilv_node_free.
@return The embedding quality level returned by @c supported_func.
*/
LILV_API
unsigned
lilv_ui_is_supported(const LilvUI* ui,
LilvUISupportedFunc supported_func,
- const LilvValue* container_type,
- const LilvValue** ui_type);
+ const LilvNode* container_type,
+ const LilvNode** ui_type);
/**
Get the URI for a Plugin UI's bundle.
@@ -1307,7 +1307,7 @@ lilv_ui_is_supported(const LilvUI* ui,
@return a shared value which must not be modified or freed.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_ui_get_bundle_uri(const LilvUI* ui);
/**
@@ -1316,7 +1316,7 @@ lilv_ui_get_bundle_uri(const LilvUI* ui);
@return a shared value which must not be modified or freed.
*/
LILV_API
-const LilvValue*
+const LilvNode*
lilv_ui_get_binary_uri(const LilvUI* ui);
/**
diff --git a/lilv/lilvmm.hpp b/lilv/lilvmm.hpp
index b2fe293..9a256b0 100644
--- a/lilv/lilvmm.hpp
+++ b/lilv/lilvmm.hpp
@@ -48,44 +48,44 @@ const char* uri_to_path(const char* uri) { return lilv_uri_to_path(uri); }
#define LILV_WRAP_CONVERSION(CT)
#endif
-struct Value {
- inline Value(const LilvValue* value) : me(lilv_value_duplicate(value)) {}
- inline Value(const Value& copy) : me(lilv_value_duplicate(copy.me)) {}
+struct Node {
+ inline Node(const LilvNode* node) : me(lilv_node_duplicate(node)) {}
+ inline Node(const Node& copy) : me(lilv_node_duplicate(copy.me)) {}
- inline ~Value() { lilv_value_free(me); }
+ inline ~Node() { lilv_node_free(me); }
- inline bool equals(const Value& other) const {
- return lilv_value_equals(me, other.me);
+ inline bool equals(const Node& other) const {
+ return lilv_node_equals(me, other.me);
}
- inline bool operator==(const Value& other) const { return equals(other); }
-
- LILV_WRAP_CONVERSION(LilvValue);
-
- LILV_WRAP0(char*, value, get_turtle_token);
- LILV_WRAP0(bool, value, is_uri);
- LILV_WRAP0(const char*, value, as_uri);
- LILV_WRAP0(bool, value, is_blank);
- LILV_WRAP0(const char*, value, as_blank);
- LILV_WRAP0(bool, value, is_literal);
- LILV_WRAP0(bool, value, is_string);
- LILV_WRAP0(const char*, value, as_string);
- LILV_WRAP0(bool, value, is_float);
- LILV_WRAP0(float, value, as_float);
- LILV_WRAP0(bool, value, is_int);
- LILV_WRAP0(int, value, as_int);
- LILV_WRAP0(bool, value, is_bool);
- LILV_WRAP0(bool, value, as_bool);
-
- LilvValue* me;
+ inline bool operator==(const Node& other) const { return equals(other); }
+
+ LILV_WRAP_CONVERSION(LilvNode);
+
+ LILV_WRAP0(char*, node, get_turtle_token);
+ LILV_WRAP0(bool, node, is_uri);
+ LILV_WRAP0(const char*, node, as_uri);
+ LILV_WRAP0(bool, node, is_blank);
+ LILV_WRAP0(const char*, node, as_blank);
+ LILV_WRAP0(bool, node, is_literal);
+ LILV_WRAP0(bool, node, is_string);
+ LILV_WRAP0(const char*, node, as_string);
+ LILV_WRAP0(bool, node, is_float);
+ LILV_WRAP0(float, node, as_float);
+ LILV_WRAP0(bool, node, is_int);
+ LILV_WRAP0(int, node, as_int);
+ LILV_WRAP0(bool, node, is_bool);
+ LILV_WRAP0(bool, node, as_bool);
+
+ LilvNode* me;
};
struct ScalePoint {
inline ScalePoint(const LilvScalePoint* c_obj) : me(c_obj) {}
LILV_WRAP_CONVERSION(const LilvScalePoint);
- LILV_WRAP0(const LilvValue*, scale_point, get_label);
- LILV_WRAP0(const LilvValue*, scale_point, get_value);
+ LILV_WRAP0(const LilvNode*, scale_point, get_label);
+ LILV_WRAP0(const LilvNode*, scale_point, get_value);
const LilvScalePoint* me;
};
@@ -94,9 +94,9 @@ struct PluginClass {
inline PluginClass(const LilvPluginClass* c_obj) : me(c_obj) {}
LILV_WRAP_CONVERSION(const LilvPluginClass);
- LILV_WRAP0(Value, plugin_class, get_parent_uri);
- LILV_WRAP0(Value, plugin_class, get_uri);
- LILV_WRAP0(Value, plugin_class, get_label);
+ LILV_WRAP0(Node, plugin_class, get_parent_uri);
+ LILV_WRAP0(Node, plugin_class, get_uri);
+ LILV_WRAP0(Node, plugin_class, get_label);
inline LilvPluginClasses* get_children() {
return lilv_plugin_class_get_children(me);
@@ -116,7 +116,7 @@ struct PluginClass {
LILV_WRAP_COLL(PluginClasses, PluginClass, plugin_classes);
LILV_WRAP_COLL(ScalePoints, ScalePoint, scale_points);
-LILV_WRAP_COLL(Values, Value, values);
+LILV_WRAP_COLL(Nodes, Node, nodes);
struct Plugins {
inline Plugins(const LilvPlugins* c_obj) : me(c_obj) {}
@@ -129,26 +129,26 @@ struct World {
inline World() : me(lilv_world_new()) {}
inline ~World() { /*lilv_world_free(me);*/ }
- inline LilvValue* new_uri(const char* uri) {
+ inline LilvNode* new_uri(const char* uri) {
return lilv_new_uri(me, uri);
}
- inline LilvValue* new_string(const char* str) {
+ inline LilvNode* new_string(const char* str) {
return lilv_new_string(me, str);
}
- inline LilvValue* new_int(int val) {
+ inline LilvNode* new_int(int val) {
return lilv_new_int(me, val);
}
- inline LilvValue* new_float(float val) {
+ inline LilvNode* new_float(float val) {
return lilv_new_float(me, val);
}
- inline LilvValue* new_bool(bool val) {
+ inline LilvNode* new_bool(bool val) {
return lilv_new_bool(me, val);
}
- LILV_WRAP2_VOID(world, set_option, const char*, uri, LilvValue*, value);
+ LILV_WRAP2_VOID(world, set_option, const char*, uri, LilvNode*, value);
LILV_WRAP0_VOID(world, free);
LILV_WRAP0_VOID(world, load_all);
- LILV_WRAP1_VOID(world, load_bundle, LilvValue*, bundle_uri);
+ LILV_WRAP1_VOID(world, load_bundle, LilvNode*, bundle_uri);
LILV_WRAP0(const LilvPluginClass*, world, get_plugin_class);
LILV_WRAP0(const LilvPluginClasses*, world, get_plugin_classes);
LILV_WRAP0(Plugins, world, get_all_plugins);
@@ -167,14 +167,14 @@ struct Port {
#define LILV_PORT_WRAP1(RT, name, T1, a1) \
inline RT name (T1 a1) { return lilv_port_ ## name (parent, me, a1); }
- LILV_PORT_WRAP1(LilvValues*, get_value, LilvValue*, predicate);
- LILV_PORT_WRAP0(LilvValues*, get_properties)
- LILV_PORT_WRAP1(bool, has_property, LilvValue*, property_uri);
- LILV_PORT_WRAP1(bool, supports_event, LilvValue*, event_uri);
- LILV_PORT_WRAP0(const LilvValue*, get_symbol);
- LILV_PORT_WRAP0(LilvValue*, get_name);
- LILV_PORT_WRAP0(const LilvValues*, get_classes);
- LILV_PORT_WRAP1(bool, is_a, LilvValue*, port_class);
+ LILV_PORT_WRAP1(LilvNodes*, get_value, LilvNode*, predicate);
+ LILV_PORT_WRAP0(LilvNodes*, get_properties)
+ LILV_PORT_WRAP1(bool, has_property, LilvNode*, property_uri);
+ LILV_PORT_WRAP1(bool, supports_event, LilvNode*, event_uri);
+ LILV_PORT_WRAP0(const LilvNode*, get_symbol);
+ LILV_PORT_WRAP0(LilvNode*, get_name);
+ LILV_PORT_WRAP0(const LilvNodes*, get_classes);
+ LILV_PORT_WRAP1(bool, is_a, LilvNode*, port_class);
LILV_PORT_WRAP0(LilvScalePoints*, get_scale_points);
// TODO: get_range (output parameters)
@@ -188,31 +188,31 @@ struct Plugin {
LILV_WRAP_CONVERSION(const LilvPlugin);
LILV_WRAP0(bool, plugin, verify);
- LILV_WRAP0(Value, plugin, get_uri);
- LILV_WRAP0(Value, plugin, get_bundle_uri);
- LILV_WRAP0(Values, plugin, get_data_uris);
- LILV_WRAP0(Value, plugin, get_library_uri);
- LILV_WRAP0(Value, plugin, get_name);
+ LILV_WRAP0(Node, plugin, get_uri);
+ LILV_WRAP0(Node, plugin, get_bundle_uri);
+ LILV_WRAP0(Nodes, plugin, get_data_uris);
+ LILV_WRAP0(Node, plugin, get_library_uri);
+ LILV_WRAP0(Node, plugin, get_name);
LILV_WRAP0(PluginClass, plugin, get_class);
- LILV_WRAP1(Values, plugin, get_value, Value, pred);
- LILV_WRAP2(Values, plugin, get_value_for_subject, Value, subject,
- Value, predicate);
- LILV_WRAP1(bool, plugin, has_feature, Value, feature_uri);
- LILV_WRAP0(Values, plugin, get_supported_features);
- LILV_WRAP0(Values, plugin, get_required_features);
- LILV_WRAP0(Values, plugin, get_optional_features);
+ LILV_WRAP1(Nodes, plugin, get_value, Node, pred);
+ LILV_WRAP2(Nodes, plugin, get_value_for_subject, Node, subject,
+ Node, predicate);
+ LILV_WRAP1(bool, plugin, has_feature, Node, feature_uri);
+ LILV_WRAP0(Nodes, plugin, get_supported_features);
+ LILV_WRAP0(Nodes, plugin, get_required_features);
+ LILV_WRAP0(Nodes, plugin, get_optional_features);
LILV_WRAP0(unsigned, plugin, get_num_ports);
LILV_WRAP0(bool, plugin, has_latency);
LILV_WRAP0(unsigned, plugin, get_latency_port_index);
- LILV_WRAP0(Value, plugin, get_author_name);
- LILV_WRAP0(Value, plugin, get_author_email);
- LILV_WRAP0(Value, plugin, get_author_homepage);
+ LILV_WRAP0(Node, plugin, get_author_name);
+ LILV_WRAP0(Node, plugin, get_author_email);
+ LILV_WRAP0(Node, plugin, get_author_homepage);
inline Port get_port_by_index(unsigned index) {
return Port(me, lilv_plugin_get_port_by_index(me, index));
}
- inline Port get_port_by_symbol(LilvValue* symbol) {
+ inline Port get_port_by_symbol(LilvNode* symbol) {
return Port(me, lilv_plugin_get_port_by_symbol(me, symbol));
}
@@ -223,8 +223,8 @@ struct Plugin {
me, min_values, max_values, def_values);
}
- inline unsigned get_num_ports_of_class(LilvValue* class_1,
- LilvValue* class_2) {
+ inline unsigned get_num_ports_of_class(LilvNode* class_1,
+ LilvNode* class_2) {
// TODO: varargs
return lilv_plugin_get_num_ports_of_class(me, class_1, class_2, NULL);
}