Hotspot: no scanning if not required.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
#include "json.hpp"
|
||||
|
||||
namespace pipedal
|
||||
@@ -331,6 +332,26 @@ namespace pipedal
|
||||
virtual void RemoveAllConnections() = 0;
|
||||
};
|
||||
|
||||
|
||||
class AlsaSequencerDeviceMonitor {
|
||||
protected:
|
||||
AlsaSequencerDeviceMonitor() {}
|
||||
public:
|
||||
virtual ~AlsaSequencerDeviceMonitor() {}
|
||||
|
||||
using self = AlsaSequencerDeviceMonitor;
|
||||
using ptr = std::shared_ptr<self>;
|
||||
static ptr Create();
|
||||
enum class MonitorAction {
|
||||
DeviceAdded,
|
||||
DeviceRemoved
|
||||
};
|
||||
using Callback = std::function<void(MonitorAction action, int client, const std::string& clientName)>;
|
||||
virtual void StartMonitoring(Callback &&onChangeCallback) = 0;
|
||||
virtual void StopMonitoring() = 0;
|
||||
|
||||
};
|
||||
|
||||
std::string RawMidiIdToSequencerId(const std::vector<AlsaSequencerPort> &seqDevices, const std::string &rawMidiId);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user