From 1988a63b41a0e81f348d5df3394d41d3248d442b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 5 Feb 2007 22:34:56 +0000 Subject: 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 --- utils/lv2_list.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 utils/lv2_list.c (limited to 'utils/lv2_list.c') 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 + * + * 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 +#include + + +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; +} + -- cgit v1.2.1