diff options
author | David Robillard <d@drobilla.net> | 2007-10-03 18:35:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-03 18:35:52 +0000 |
commit | d596bb4bedbf9ff267cfe924bb4d376213efd3ec (patch) | |
tree | eff0daa07315d145dfac19b1e6c17416019c0de8 /src | |
parent | 09bf0ca18301b9ef7a4360be35d2d1921a0d28d8 (diff) | |
download | lilv-d596bb4bedbf9ff267cfe924bb4d376213efd3ec.tar.gz lilv-d596bb4bedbf9ff267cfe924bb4d376213efd3ec.tar.bz2 lilv-d596bb4bedbf9ff267cfe924bb4d376213efd3ec.zip |
Updated LV2 spec.
git-svn-id: http://svn.drobilla.net/lad/slv2@809 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/plugin.c | 24 | ||||
-rw-r--r-- | src/plugininstance.c | 20 | ||||
-rw-r--r-- | src/pluginuiinstance.c | 16 | ||||
-rw-r--r-- | src/port.c | 14 |
4 files changed, 26 insertions, 48 deletions
diff --git a/src/plugin.c b/src/plugin.c index 055d727..20c8c5f 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -498,9 +498,9 @@ slv2_plugin_get_supported_features(SLV2Plugin p) { const char* const query = "SELECT DISTINCT ?feature WHERE {\n" - " { <> lv2:optionalHostFeature ?feature }\n" - " UNION\n" - " { <> lv2:requiredHostFeature ?feature }\n" + " { <> lv2:optionalFeature ?feature }\n" + " UNION\n" + " { <> lv2:requiredFeature ?feature }\n" "}\n"; SLV2Values result = slv2_plugin_simple_query(p, query, 0); @@ -512,28 +512,14 @@ slv2_plugin_get_supported_features(SLV2Plugin p) SLV2Values slv2_plugin_get_optional_features(SLV2Plugin p) { - const char* const query = - "SELECT DISTINCT ?feature WHERE {\n" - " <> lv2:optionalHostFeature ?feature\n" - "}\n"; - - SLV2Values result = slv2_plugin_simple_query(p, query, 0); - - return result; + return slv2_plugin_get_value(p, SLV2_QNAME, "lv2:optionalFeature"); } SLV2Values slv2_plugin_get_required_features(SLV2Plugin p) { - const char* const query = - "SELECT DISTINCT ?feature WHERE {\n" - " <> lv2:requiredHostFeature ?feature\n" - "}\n"; - - SLV2Values result = slv2_plugin_simple_query(p, query, 0); - - return result; + return slv2_plugin_get_value(p, SLV2_QNAME, "lv2:requiredFeature"); } diff --git a/src/plugininstance.c b/src/plugininstance.c index a125e0d..f57de33 100644 --- a/src/plugininstance.c +++ b/src/plugininstance.c @@ -31,16 +31,16 @@ SLV2Instance -slv2_plugin_instantiate(SLV2Plugin plugin, - double sample_rate, - const LV2_Host_Feature** host_features) +slv2_plugin_instantiate(SLV2Plugin plugin, + double sample_rate, + const LV2_Feature** features) { struct _Instance* result = NULL; - bool local_host_features = (host_features == NULL); - if (local_host_features) { - host_features = malloc(sizeof(LV2_Host_Feature)); - host_features[0] = NULL; + bool local_features = (features == NULL); + if (local_features) { + features = malloc(sizeof(LV2_Feature)); + features[0] = NULL; } const char* const lib_uri = slv2_plugin_get_library_uri(plugin); @@ -89,7 +89,7 @@ slv2_plugin_instantiate(SLV2Plugin plugin, // Create SLV2Instance to return result = malloc(sizeof(struct _Instance)); result->lv2_descriptor = ld; - result->lv2_handle = ld->instantiate(ld, sample_rate, (char*)bundle_path, host_features); + result->lv2_handle = ld->instantiate(ld, sample_rate, (char*)bundle_path, features); struct _InstanceImpl* impl = malloc(sizeof(struct _InstanceImpl)); impl->lib_handle = lib; result->pimpl = impl; @@ -114,8 +114,8 @@ slv2_plugin_instantiate(SLV2Plugin plugin, result->lv2_descriptor->connect_port(result->lv2_handle, i, NULL); } - if (local_host_features) - free(host_features); + if (local_features) + free(features); return result; } diff --git a/src/pluginuiinstance.c b/src/pluginuiinstance.c index 31c2252..3fe98e6 100644 --- a/src/pluginuiinstance.c +++ b/src/pluginuiinstance.c @@ -40,14 +40,14 @@ slv2_ui_instantiate(SLV2Plugin plugin, LV2UI_Program_Change_Function program_function, LV2UI_Program_Save_Function save_function, LV2UI_Controller controller, - const LV2_Host_Feature* const* host_features) + const LV2_Feature* const* features) { struct _SLV2UIInstance* result = NULL; - bool local_host_features = (host_features == NULL); - if (local_host_features) { - host_features = malloc(sizeof(LV2_Host_Feature)); - ((LV2_Host_Feature**)host_features)[0] = NULL; + bool local_features = (features == NULL); + if (local_features) { + features = malloc(sizeof(LV2_Feature)); + ((LV2_Feature**)features)[0] = NULL; } const char* const lib_uri = slv2_ui_get_binary_uri(ui); @@ -103,7 +103,7 @@ slv2_ui_instantiate(SLV2Plugin plugin, save_function, controller, &impl->widget, - host_features); + features); impl->lib_handle = lib; result->pimpl = impl; break; @@ -128,8 +128,8 @@ slv2_ui_instantiate(SLV2Plugin plugin, return NULL; } - if (local_host_features) - free((LV2_Host_Feature**)host_features); + if (local_features) + free((LV2_Feature**)features); return result; } @@ -124,9 +124,9 @@ slv2_port_get_data_type(SLV2Plugin p, #if 0 bool -slv2_port_has_hint(SLV2Plugin p, - SLV2Port port, - SLV2Value hint) +slv2_port_has_property(SLV2Plugin p, + SLV2Port port, + SLV2Value hint) { /* FIXME: Add SLV2Value QName stuff to make this not suck to use */ @@ -271,11 +271,3 @@ slv2_port_get_properties(SLV2Plugin p, return slv2_port_get_value(p, port, "lv2:portProperty"); } - -SLV2Values -slv2_port_get_hints(SLV2Plugin p, - SLV2Port port) -{ - return slv2_port_get_value(p, port, "lv2:portHint"); -} - |