LibraryDeviceEnumerator.hpp
1 #pragma once
2 #include <Device/Protocol/ProtocolFactoryInterface.hpp>
3 
4 #include <score/tools/RecursiveWatch.hpp>
5 
6 #include <score_plugin_protocols_export.h>
7 
8 namespace Protocols
9 {
10 
11 class SCORE_PLUGIN_PROTOCOLS_EXPORT LibraryDeviceEnumerator
13 {
14 public:
15  std::string m_pattern;
16  Device::ProtocolFactory::ConcreteKey m_key;
17  std::function<QVariant(QByteArray)> m_createDeviceSettings;
18  score::RecursiveWatch m_watch;
19 
21  std::string pattern, QStringList extension, Device::ProtocolFactory::ConcreteKey k,
22  std::function<QVariant(QByteArray)> createDev, const score::DocumentContext& ctx);
23 
24  void next(std::string_view path);
25 
26  void enumerate(std::function<void(const QString&, const Device::DeviceSettings&)>
27  onDevice) const override;
28 };
29 }
Definition: ProtocolFactoryInterface.hpp:29
Definition: LibraryDeviceEnumerator.hpp:13
Definition: RecursiveWatch.hpp:16
Definition: DeviceSettings.hpp:20
Definition: DocumentContext.hpp:18