Ardour  9.0-pre0-582-g084a23a80d
auv2_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_auv2_scan_h_
20 #define _ardour_auv2_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 AUv2Info {
35  : version (0)
36  , n_inputs (0)
37  , n_outputs (0)
38  , n_midi_inputs (0)
39  , n_midi_outputs (0)
40  , max_outputs (0)
41  {}
42 
43  AUv2Info (XMLNode const&);
44  XMLNode& state () const;
45 
46  std::string id;
47  std::string name;
48  std::string creator;
49  std::string category;
50 
51  uint32_t version;
52 
53  int n_inputs;
54  int n_outputs;
55  int n_midi_inputs; // has_midi_in
56  int n_midi_outputs; // == 0
57 
59 
60  std::vector<std::pair<int,int> > io_configs;
61 
62 };
63 
64 class AUv2DescStr {
65 public:
66  AUv2DescStr (std::string const& desc = "");
67 
68  CAComponentDescription desc () const;
69  std::string to_s () const;
70  bool valid () const;
71 
72  std::string type;
73  std::string subt;
74  std::string manu;
75 };
76 
77 LIBARDOUR_API extern std::string
78 auv2_stringify_descriptor (CAComponentDescription const&);
79 
80 LIBARDOUR_API extern std::string
81 auv2_cache_file (CAComponentDescription const&);
82 
83 LIBARDOUR_API extern std::string
84 auv2_valid_cache_file (CAComponentDescription const&, bool verbose = false, bool* is_new = NULL);
85 
86 LIBARDOUR_API extern bool
87 auv2_scan_and_cache (CAComponentDescription&, std::function<void (CAComponentDescription const&, AUv2Info const&)> cb, bool verbose = false);
88 
89 LIBARDOUR_API extern void
90 auv2_list_plugins (std::vector<AUv2DescStr>& rv);
91 
92 } // namespace ARDOUR
93 
94 #endif
AUv2DescStr(std::string const &desc="")
CAComponentDescription desc() const
std::string manu
Definition: auv2_scan.h:74
std::string to_s() const
std::string type
Definition: auv2_scan.h:72
bool valid() const
std::string subt
Definition: auv2_scan.h:73
Definition: xml++.h:114
#define LIBARDOUR_API
bool auv2_scan_and_cache(CAComponentDescription &, std::function< void(CAComponentDescription const &, AUv2Info const &)> cb, bool verbose=false)
std::string auv2_valid_cache_file(CAComponentDescription const &, bool verbose=false, bool *is_new=NULL)
std::string auv2_stringify_descriptor(CAComponentDescription const &)
std::string auv2_cache_file(CAComponentDescription const &)
void auv2_list_plugins(std::vector< AUv2DescStr > &rv)
std::string id
Definition: auv2_scan.h:46
AUv2Info(XMLNode const &)
uint32_t version
Definition: auv2_scan.h:51
XMLNode & state() const
std::string name
Definition: auv2_scan.h:47
std::string category
Definition: auv2_scan.h:49
std::vector< std::pair< int, int > > io_configs
Definition: auv2_scan.h:60
std::string creator
Definition: auv2_scan.h:48