diff options
author | David Robillard <d@drobilla.net> | 2007-02-05 22:34:56 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-02-05 22:34:56 +0000 |
commit | 1988a63b41a0e81f348d5df3394d41d3248d442b (patch) | |
tree | 2ec6758a2554f6456ae0f377cc47b4f1260a8b2d /utils/lv2_list.c | |
parent | 1f0922ab4982da825ddfbb792ec9f871b2b88804 (diff) | |
download | lilv-1988a63b41a0e81f348d5df3394d41d3248d442b.tar.gz lilv-1988a63b41a0e81f348d5df3394d41d3248d442b.tar.bz2 lilv-1988a63b41a0e81f348d5df3394d41d3248d442b.zip |
Reorganized tree in preparation for beta release.
Split simple (example) jack host and more useful one (with midi).
Working Jack/LV2 midi in lv2_jack_host.
Added lv2_list.
git-svn-id: http://svn.drobilla.net/lad/slv2@279 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'utils/lv2_list.c')
-rw-r--r-- | utils/lv2_list.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/utils/lv2_list.c b/utils/lv2_list.c new file mode 100644 index 0000000..e1cba6d --- /dev/null +++ b/utils/lv2_list.c @@ -0,0 +1,43 @@ +/* lv2_list - List system installed LV2 plugins. + * Copyright (C) 2007 Dave Robillard <drobilla.net> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include <stdio.h> +#include <slv2/slv2.h> + + +void +list_plugins(SLV2List 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); + printf("%s\n", slv2_plugin_get_uri(p)); + } +} + + +int +main()//int argc, char** argv) +{ + SLV2List plugins = slv2_list_new(); + slv2_list_load_all(plugins); + + list_plugins(plugins); + + return 0; +} + |