42#include "plugins/plugin_protocol.h"
43#include "utils/file_path_list.h"
51#include <QtQmlIntegration/qqmlintegration.h>
53#include "juce_wrapper.h"
55namespace zrythm::plugins
60using ProtocolPluginPathsProvider =
66namespace scanner_private
109 std::atomic<bool> should_stop_{
false };
156 std::shared_ptr<juce::KnownPluginList> known_plugins,
157 std::shared_ptr<juce::AudioPluginFormatManager> format_manager,
158 ProtocolPluginPathsProvider plugin_paths_provider,
159 QObject * parent =
nullptr);
207 void scan_for_plugins ();
209 void set_currently_scanning_plugin (
const QString &plugin);
216 Q_SLOT
void scan_finished ();
219 std::shared_ptr<juce::KnownPluginList> known_plugin_list_;
220 ProtocolPluginPathsProvider plugin_paths_provider_;
221 std::shared_ptr<juce::AudioPluginFormatManager> format_manager_;
223 mutable QMutex currently_scanning_plugin_mutex_;
224 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.