summaryrefslogtreecommitdiffstats
path: root/utils/lv2_inspect.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-20 03:57:41 +0000
committerDavid Robillard <d@drobilla.net>2007-04-20 03:57:41 +0000
commitbe95afee123c169b083049c2f441d3860a12fea0 (patch)
tree78c907f1828bbe8a8521a83313e793c01a989903 /utils/lv2_inspect.c
parentc625507d8a3101742c083dd030cbd1e1e295a9a0 (diff)
downloadlilv-be95afee123c169b083049c2f441d3860a12fea0.tar.gz
lilv-be95afee123c169b083049c2f441d3860a12fea0.tar.bz2
lilv-be95afee123c169b083049c2f441d3860a12fea0.zip
Clean up API, hide more methods that should not be exposed to user.
Document performance of most methods. Clean up and clarify documentation. git-svn-id: http://svn.drobilla.net/lad/slv2@460 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'utils/lv2_inspect.c')
-rw-r--r--utils/lv2_inspect.c50
1 files changed, 30 insertions, 20 deletions
diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c
index a6a949d..710b791 100644
--- a/utils/lv2_inspect.c
+++ b/utils/lv2_inspect.c
@@ -20,8 +20,6 @@
#include <stdio.h>
#include <slv2/slv2.h>
-// FIXME: remove
-#include "../src/private_types.h"
void
print_port(SLV2Plugin p, uint32_t index)
@@ -93,41 +91,53 @@ print_plugin(SLV2Plugin p)
{
char* str = NULL;
- printf("<%s>\n", slv2_plugin_get_uri(p));
-
- printf("FIXME: Data URIs\n");
- /*printf("\tData URIs:\n");
- SLV2Strings data_uris = slv2_plugin_get_data_uris(p);
- for (unsigned i=0; i < slv2_strings_size(data_uris); ++i)
- printf("\t\t%s\n", slv2_strings_get_at(data_uris, i));
- */
-
- printf("\n\tLibrary URI: %s\n\n", slv2_plugin_get_library_uri(p));
-
+ printf("<%s>\n\n", slv2_plugin_get_uri(p));
+
str = slv2_plugin_get_name(p);
- printf("\tName: %s\n", str);
+ printf("\tName: %s\n\n", str);
free(str);
if (slv2_plugin_has_latency(p))
- printf("\tHas latency: yes\n");
+ printf("\tHas latency: yes\n\n");
else
- printf("\tHas latency: no\n");
+ printf("\tHas latency: no\n\n");
+
+ printf("\tBinary: %s\n\n", slv2_plugin_get_library_uri(p));
+
+ printf("\tData URIs:\n");
+ SLV2Strings data_uris = slv2_plugin_get_data_uris(p);
+ for (unsigned i=0; i < slv2_strings_size(data_uris); ++i)
+ printf("\t\t%s\n", slv2_strings_get_at(data_uris, i));
+
+ /* Properties */
- printf("\tProperties:\n");
SLV2Strings v = slv2_plugin_get_properties(p);
+
+ if (slv2_strings_size(v) > 0)
+ printf("\n\tProperties:\n");
+
for (unsigned i=0; i < slv2_strings_size(v); ++i)
printf("\t\t%s\n", slv2_strings_get_at(v, i));
slv2_strings_free(v);
- printf("\tHints:\n");
+
+ /* Hints */
+
v = slv2_plugin_get_hints(p);
+
+ if (slv2_strings_size(v) > 0)
+ printf("\n\tHints:\n");
+
for (unsigned i=0; i < slv2_strings_size(v); ++i)
printf("\t\t%s\n", slv2_strings_get_at(v, i));
slv2_strings_free(v);
+
+ /* Ports */
+
uint32_t num_ports = slv2_plugin_get_num_ports(p);
- printf("\n\t# Ports: %d\n", num_ports);
+ //printf("\n\t# Ports: %d\n", num_ports);
for (uint32_t i=0; i < num_ports; ++i)
print_port(p, i);
@@ -157,7 +167,7 @@ main(int argc, char** argv)
return -1;
}
- slv2_plugins_free(plugins);
+ slv2_plugins_free(world, plugins);
slv2_world_free(world);
return (p != NULL ? 0 : -1);