Audacity 3.2.0
LoadLV2.h
Go to the documentation of this file.
1/*!********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file LoadLV2.h
6 @brief Defines the module to handle the LV2 effect protocol
7
8 Audacity(R) is copyright (c) 1999-2008 Audacity Team.
9 License: GPL v2 or later. See License.txt.
10
11*********************************************************************/
12
13#ifndef LV2EFFECTSMODULE_H
14#define LV2EFFECTSMODULE_H
15
16#include <memory>
17
18#include "lilv/lilv.h"
19
20#include "PluginProvider.h"
21
23//
24// LV2EffectsModule
25//
27
28class LV2EffectsModule final : public PluginProvider
29{
30public:
32 virtual ~LV2EffectsModule();
33
34 // ComponentInterface implementation
35
36 PluginPath GetPath() const override;
37 ComponentInterfaceSymbol GetSymbol() const override;
38 VendorSymbol GetVendor() const override;
39 wxString GetVersion() const override;
40 TranslatableString GetDescription() const override;
41
42 // PluginProvider implementation
43
44 bool Initialize() override;
45 void Terminate() override;
47
48 const FileExtensions &GetFileExtensions() override;
49 FilePath InstallPath() override { return {}; }
50
53 unsigned DiscoverPluginsAtPath(
54 const PluginPath & path, TranslatableString &errMsg,
55 const RegistrationCallback &callback)
56 override;
57
58 bool CheckPluginExist(const PluginPath& path) const override;
59
60 std::unique_ptr<ComponentInterface>
61 LoadPlugin(const PluginPath & path) override;
62
63 // LV2EffectModule implementation
64
65 std::unique_ptr<Validator> MakeValidator() const override;
66
67private:
68 static const LilvPlugin *GetPlugin(const PluginPath & path);
69};
70
71#endif
std::vector< PluginPath > PluginPaths
Definition: Identifier.h:215
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
Definition: Identifier.h:214
Generalized interface for discovery of plug-ins for one protocol.
wxString FilePath
Definition: Project.h:21
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
TranslatableString GetDescription() const override
Definition: LoadLV2.cpp:105
bool CheckPluginExist(const PluginPath &path) const override
Performs plugin/module existence check, still plugin may fail to load. Implementation should avoid lo...
Definition: LoadLV2.cpp:273
unsigned DiscoverPluginsAtPath(const PluginPath &path, TranslatableString &errMsg, const RegistrationCallback &callback) override
Definition: LoadLV2.cpp:243
virtual ~LV2EffectsModule()
Definition: LoadLV2.cpp:76
void Terminate() override
Called just prior to deletion to allow releasing any resources.
Definition: LoadLV2.cpp:182
void AutoRegisterPlugins(PluginManagerInterface &pm) override
Called so that a provider of a static set of plug-ins can register them.
Definition: LoadLV2.cpp:202
EffectFamilySymbol GetOptionalFamilySymbol() override
A symbol identifying the family of plug-ins provided by this.
Definition: LoadLV2.cpp:187
PluginPaths FindModulePaths(PluginManagerInterface &pm) override
Definition: LoadLV2.cpp:206
bool Initialize() override
Called immediately after creation. Let provider initialize.
Definition: LoadLV2.cpp:114
wxString GetVersion() const override
Definition: LoadLV2.cpp:99
FilePath InstallPath() override
Where plug-in files should be copied to install them.
Definition: LoadLV2.h:49
PluginPath GetPath() const override
Definition: LoadLV2.cpp:84
std::unique_ptr< Validator > MakeValidator() const override
Definition: LoadLV2.cpp:309
std::unique_ptr< ComponentInterface > LoadPlugin(const PluginPath &path) override
Load the plug-in at a path reported by DiscoverPluginsAtPath.
Definition: LoadLV2.cpp:262
const FileExtensions & GetFileExtensions() override
File types associated with this protocol.
Definition: LoadLV2.cpp:196
VendorSymbol GetVendor() const override
Definition: LoadLV2.cpp:94
ComponentInterfaceSymbol GetSymbol() const override
Definition: LoadLV2.cpp:89
static const LilvPlugin * GetPlugin(const PluginPath &path)
Definition: LoadLV2.cpp:319
std::function< const PluginID &(PluginProvider *, ComponentInterface *) > RegistrationCallback
Further expand a path reported by FindModulePaths.
Holds a msgid for the translation catalog; may also bind format arguments.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.