42#include "plugins/plugin_protocol.h"
43#include "utils/file_path_list.h"
49#include <QtQmlIntegration>
51namespace zrythm::plugins
56using ProtocolPluginPathsProvider =
62namespace scanner_private
105 std::atomic<bool> should_stop_{
false };
152 std::shared_ptr<juce::KnownPluginList> known_plugins,
153 std::shared_ptr<juce::AudioPluginFormatManager> format_manager,
154 ProtocolPluginPathsProvider plugin_paths_provider,
155 QObject * parent =
nullptr);
203 void scan_for_plugins ();
205 void set_currently_scanning_plugin (
const QString &plugin);
212 Q_SLOT
void scan_finished ();
215 std::shared_ptr<juce::KnownPluginList> known_plugin_list_;
216 ProtocolPluginPathsProvider plugin_paths_provider_;
217 std::shared_ptr<juce::AudioPluginFormatManager> format_manager_;
219 mutable QMutex currently_scanning_plugin_mutex_;
220 QString currently_scanning_plugin_;
Scans for plugins and manages the scanning process.
PluginScanManager(std::shared_ptr< juce::KnownPluginList > known_plugins, std::shared_ptr< juce::AudioPluginFormatManager > format_manager, ProtocolPluginPathsProvider plugin_paths_provider, QObject *parent=nullptr)
Constructs a PluginScanManager object.
Q_INVOKABLE void requestStop()
Request the worker thread to stop gracefully.
Q_INVOKABLE void beginScan()
To be called by QML to begin scanning.
Q_SIGNAL void scanningFinished()
Emitted after the scan has finished and after this instance has been moved to the main thread.
QString getCurrentlyScanningPlugin() const
Get the currently scanning plugin (property accessor).
Q_SIGNAL void currentlyScanningPluginChanged(const QString &plugin)
Emitted from the scan thread (not the main thread) when a new (not known) plugin is added to the list...
ProtocolType
Plugin protocol.
A worker thread for the PluginScanManager class.
void requestStop()
Request the worker to stop gracefully.
Q_SIGNAL void finished()
Emitted when the scanning process has finished.
Worker(PluginScanManager &scanner_)
Constructs a new Worker instance.
Q_SLOT void process()
Starts the plugin scanning process.
A unique pointer for QObject objects that also works with QObject-based ownership.