From f340d22e82760166d24a037d8466501217b06a3e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 18 Feb 2007 20:08:45 +0000 Subject: API updates (removed SLV2Value (binary compatibility nightmare waiting to happen) and added consistent SLV2Plugins and SLV2Strings). Documentation cleanups. git-svn-id: http://svn.drobilla.net/lad/slv2@314 a436a847-0d15-0410-975c-d299462d15a1 --- utils/lv2_inspect.c | 26 +++++++++++++------------- utils/lv2_list.c | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'utils') diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c index 8dbc6e6..32c07dd 100644 --- a/utils/lv2_inspect.c +++ b/utils/lv2_inspect.c @@ -83,9 +83,9 @@ print_plugin(SLV2Plugin* p) printf("<%s>\n", slv2_plugin_get_uri(p)); printf("\tData URIs:\n"); - SLV2URIList data_uris = slv2_plugin_get_data_uris(p); - for (int i=0; i < slv2_uri_list_size(data_uris); ++i) - printf("\t\t%s\n", slv2_uri_list_get_at(data_uris, i)); + SLV2Strings data_uris = slv2_plugin_get_data_uris(p); + for (int 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)); @@ -99,16 +99,16 @@ print_plugin(SLV2Plugin* p) printf("\tHas latency: no\n"); printf("\tProperties:\n"); - SLV2Value v = slv2_plugin_get_properties(p); - for (size_t i=0; i < v->num_values; ++i) - printf("\t\t%s\n", v->values[i]); - slv2_value_free(v); + SLV2Strings v = slv2_plugin_get_properties(p); + for (int 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"); v = slv2_plugin_get_hints(p); - for (size_t i=0; i < v->num_values; ++i) - printf("\t\t%s\n", v->values[i]); - slv2_value_free(v); + for (int i=0; i < slv2_strings_size(v); ++i) + printf("\t\t%s\n", slv2_strings_get_at(v, i)); + slv2_strings_free(v); uint32_t num_ports = slv2_plugin_get_num_ports(p); for (uint32_t i=0; i < num_ports; ++i) @@ -127,10 +127,10 @@ main(int argc, char** argv) return -1; } - SLV2List plugins = slv2_list_new(); - slv2_list_load_all(plugins); + SLV2Plugins plugins = slv2_plugins_new(); + slv2_plugins_load_all(plugins); - SLV2Plugin* p = slv2_list_get_plugin_by_uri(plugins, argv[1]); + SLV2Plugin* p = slv2_plugins_get_by_uri(plugins, argv[1]); if (!p) { fprintf(stderr, "Plugin not found.\n"); diff --git a/utils/lv2_list.c b/utils/lv2_list.c index 923cba9..71cf34c 100644 --- a/utils/lv2_list.c +++ b/utils/lv2_list.c @@ -21,10 +21,10 @@ void -list_plugins(SLV2List list) +list_plugins(SLV2Plugins list) { - for (size_t i=0; i < slv2_list_get_length(list); ++i) { - const SLV2Plugin* const p = slv2_list_get_plugin_by_index(list, i); + for (size_t i=0; i < slv2_plugins_size(list); ++i) { + const SLV2Plugin* const p = slv2_plugins_get_at(list, i); printf("%s\n", slv2_plugin_get_uri(p)); } } @@ -35,8 +35,8 @@ main()//int argc, char** argv) { slv2_init(); - SLV2List plugins = slv2_list_new(); - slv2_list_load_all(plugins); + SLV2Plugins plugins = slv2_plugins_new(); + slv2_plugins_load_all(plugins); list_plugins(plugins); -- cgit v1.2.1