summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--lilv/lilv.h9
-rw-r--r--src/lilv_internal.h1
-rw-r--r--src/plugin.c7
-rw-r--r--src/world.c2
-rw-r--r--utils/lv2info.c16
-rw-r--r--wscript2
7 files changed, 37 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 66ff0a3..9724bd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
lilv (UNRELEASED) unstable; urgency=low
+ * Add lilv_plugin_get_extension_data
* Use path variables in pkgconfig files
* Install man page to DATADIR (e.g. PREFIX/share/man, not PREFIX/man)
* Make Lilv::uri_to_path static inline (fix linking errors)
diff --git a/lilv/lilv.h b/lilv/lilv.h
index 3d15b24..d5e0c8f 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -786,6 +786,15 @@ LilvNodes*
lilv_plugin_get_optional_features(const LilvPlugin* p);
/**
+ Get the extension data implemented by a plugin.
+ This can be used to find which URIs lilv_instance_get_extension_data()
+ will return a value for without instantiating the plugin.
+*/
+LILV_API
+LilvNodes*
+lilv_plugin_get_extension_data(const LilvPlugin* p);
+
+/**
Get the number of ports on this plugin.
*/
LILV_API
diff --git a/src/lilv_internal.h b/src/lilv_internal.h
index 0d4310f..21f612a 100644
--- a/src/lilv_internal.h
+++ b/src/lilv_internal.h
@@ -142,6 +142,7 @@ struct LilvWorldImpl {
SordNode* xsd_double_node;
SordNode* xsd_integer_node;
LilvNode* doap_name_val;
+ LilvNode* lv2_extensionData_val;
LilvNode* lv2_name_val;
LilvNode* lv2_optionalFeature_val;
LilvNode* lv2_requiredFeature_val;
diff --git a/src/plugin.c b/src/plugin.c
index a5ca1a7..9fba6f4 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -645,6 +645,13 @@ lilv_plugin_get_required_features(const LilvPlugin* p)
}
LILV_API
+LilvNodes*
+lilv_plugin_get_extension_data(const LilvPlugin* p)
+{
+ return lilv_plugin_get_value(p, p->world->lv2_extensionData_val);
+}
+
+LILV_API
const LilvPort*
lilv_plugin_get_port_by_index(const LilvPlugin* p,
uint32_t index)
diff --git a/src/world.c b/src/world.c
index 9d74c6b..0bad4c4 100644
--- a/src/world.c
+++ b/src/world.c
@@ -77,6 +77,7 @@ lilv_world_new(void)
world->xsd_integer_node = NEW_URI(LILV_NS_XSD "integer");
world->doap_name_val = NEW_URI_VAL(LILV_NS_DOAP "name");
+ world->lv2_extensionData_val = NEW_URI_VAL(LILV_NS_LV2 "extensionData");
world->lv2_name_val = NEW_URI_VAL(LILV_NS_LV2 "name");
world->lv2_optionalFeature_val = NEW_URI_VAL(LILV_NS_LV2 "optionalFeature");
world->lv2_requiredFeature_val = NEW_URI_VAL(LILV_NS_LV2 "requiredFeature");
@@ -131,6 +132,7 @@ lilv_world_free(LilvWorld* world)
sord_node_free(world->world, world->xsd_double_node);
sord_node_free(world->world, world->xsd_integer_node);
lilv_node_free(world->doap_name_val);
+ lilv_node_free(world->lv2_extensionData_val);
lilv_node_free(world->lv2_name_val);
lilv_node_free(world->lv2_optionalFeature_val);
lilv_node_free(world->lv2_requiredFeature_val);
diff --git a/utils/lv2info.c b/utils/lv2info.c
index 747e71c..d55b9cd 100644
--- a/utils/lv2info.c
+++ b/utils/lv2info.c
@@ -266,6 +266,22 @@ print_plugin(LilvWorld* world,
printf("\n");
lilv_nodes_free(features);
+ /* Extension Data */
+ LilvNodes* data = lilv_plugin_get_extension_data(p);
+ if (data)
+ printf("\tExtension Data: ");
+ first = true;
+ LILV_FOREACH(nodes, i, data) {
+ if (!first) {
+ printf("\n\t ");
+ }
+ printf("%s", lilv_node_as_uri(lilv_nodes_get(data, i)));
+ first = false;
+ }
+ if (features)
+ printf("\n");
+ lilv_nodes_free(data);
+
/* Presets */
LilvNodes* presets = lilv_plugin_get_value(p, preset_pred);
diff --git a/wscript b/wscript
index 47c140a..59735d9 100644
--- a/wscript
+++ b/wscript
@@ -8,7 +8,7 @@ import waflib.Options as Options
import waflib.Logs as Logs
# Version of this package (even if built as a child)
-LILV_VERSION = '0.5.0'
+LILV_VERSION = '0.6.0'
LILV_MAJOR_VERSION = '0'
# Library version (UNIX style major, minor, micro)