OSCQueryDevice.hpp
1 #pragma once
2 #include <Device/Protocol/DeviceInterface.hpp>
3 
4 #include <ossia/network/base/device.hpp>
5 
6 #include <verdigris>
7 
8 namespace ossia::oscquery_asio
9 {
10 class oscquery_mirror_asio_protocol;
11 }
12 namespace Protocols
13 {
15 {
16  W_OBJECT(OSCQueryDevice)
17 public:
19  const Device::DeviceSettings& settings,
20  const ossia::net::network_context_ptr& ctx);
21 
22  ~OSCQueryDevice();
23 
24  bool reconnect() override;
25  void disconnect() override;
26  void recreate(const Device::Node& n) override;
27  bool connected() const override;
28 
29 public:
30  void sig_command() W_SIGNAL(sig_command);
31  void sig_disconnect() W_SIGNAL(sig_disconnect);
32  void sig_createDevice() W_SIGNAL(sig_createDevice);
33 
34 private:
35  void slot_command();
36  W_SLOT(slot_command);
37  void slot_createDevice();
38  W_SLOT(slot_createDevice);
39 
40  ossia::net::protocol_base* m_mirror{};
41  bool m_connected{};
42  Device::DeviceSettings m_oldSettings;
43  const ossia::net::network_context_ptr& m_ctx;
44 };
45 }
Definition: DeviceInterface.hpp:185
Definition: OSCQueryDevice.hpp:15
Definition: DeviceSettings.hpp:20