summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/plugin.c b/src/plugin.c
index ea48507..ceac7c8 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -826,65 +826,3 @@ slv2_plugin_get_uis(SLV2Plugin p)
return NULL;
}
}
-
-SLV2_API
-SLV2UI
-slv2_plugin_get_default_ui(SLV2Plugin p,
- SLV2Value widget_type_uri)
-{
-#ifdef HAVE_SUIL
- SLV2Node ui_ui_node = sord_new_uri(p->world->world, NS_UI "ui");
- SLV2Node ui_binary_node = sord_new_uri(p->world->world, NS_UI "binary");
-
- SLV2Matches uis = slv2_plugin_find_statements(
- p,
- p->plugin_uri->val.uri_val,
- ui_ui_node,
- NULL);
-
- SLV2UI native = NULL;
- SLV2UI foreign = NULL;
- FOREACH_MATCH(uis) {
- SLV2Node ui = slv2_match_object(uis);
- SLV2Value type = slv2_plugin_get_unique(p, ui, p->world->rdf_a_node);
- SLV2Value binary = slv2_plugin_get_unique(p, ui, ui_binary_node);
-
- if (sord_node_get_type(ui) != SORD_URI
- || !slv2_value_is_uri(type)
- || !slv2_value_is_uri(binary)) {
- slv2_value_free(binary);
- slv2_value_free(type);
- SLV2_ERROR("Corrupt UI\n");
- continue;
- }
-
- if (!native && slv2_value_equals(type, widget_type_uri)) {
- native = slv2_ui_new(
- p->world,
- slv2_value_new_from_node(p->world, ui),
- type,
- binary);
- break;
- } else if (!foreign && suil_ui_type_supported(
- slv2_value_as_uri(widget_type_uri),
- slv2_value_as_uri(type))) {
- foreign = slv2_ui_new(
- p->world,
- slv2_value_new_from_node(p->world, ui),
- type,
- binary);
- } else {
- slv2_value_free(binary);
- slv2_value_free(type);
- }
- }
- slv2_match_end(uis);
-
- slv2_node_free(p->world, ui_binary_node);
- slv2_node_free(p->world, ui_ui_node);
-
- return (native) ? native : foreign;
-#else
- return NULL;
-#endif
-}