Ardour  9.0-pre0-582-g084a23a80d
vst2_scan.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef _ardour_vst2_scan_h_
20 #define _ardour_vst2_scan_h_
21 
22 #include <memory>
23 #include <string>
24 #include <vector>
25 
26 #include "pbd/xml++.h"
27 
29 #include "ardour/types.h"
30 
31 namespace ARDOUR {
32 
33 struct VST2Info {
35  : id (0)
36  , n_inputs (0)
37  , n_outputs (0)
38  , n_midi_inputs (0)
39  , n_midi_outputs (0)
40  , is_instrument (false)
41  , can_process_replace (false)
42  , has_editor (false)
43  {}
44 
45  VST2Info (XMLNode const&);
46  XMLNode& state () const;
47 
48  int32_t id;
49  std::string name;
50  std::string creator; // vendor;
51  std::string category;
52  std::string version;
53 
54  int n_inputs;
55  int n_outputs;
58 
61  bool has_editor;
62 };
63 
64 LIBARDOUR_API extern std::string
66 
67 LIBARDOUR_API extern std::string
68 vst2_id_to_str (int32_t);
69 
70 LIBARDOUR_API extern std::string
71 vst2_cache_file (std::string const& path);
72 
73 LIBARDOUR_API extern std::string
74 vst2_valid_cache_file (std::string const& path, bool verbose = false, bool* is_new = NULL);
75 
76 LIBARDOUR_API extern bool
77 vst2_scan_and_cache (std::string const& path, ARDOUR::PluginType, std::function<void (std::string const&, PluginType, VST2Info const&)> cb, bool verbose = false);
78 
79 } // namespace ARDOUR
80 
81 #endif
Definition: xml++.h:114
#define LIBARDOUR_API
std::string vst2_id_to_str(int32_t)
bool vst2_scan_and_cache(std::string const &path, ARDOUR::PluginType, std::function< void(std::string const &, PluginType, VST2Info const &)> cb, bool verbose=false)
std::string vst2_arch()
std::string vst2_cache_file(std::string const &path)
std::string vst2_valid_cache_file(std::string const &path, bool verbose=false, bool *is_new=NULL)
std::string version
Definition: vst2_scan.h:52
bool is_instrument
Definition: vst2_scan.h:59
std::string name
Definition: vst2_scan.h:49
std::string category
Definition: vst2_scan.h:51
bool can_process_replace
Definition: vst2_scan.h:60
XMLNode & state() const
std::string creator
Definition: vst2_scan.h:50
VST2Info(XMLNode const &)