OSCDevice.hpp
1 #pragma once
2 #include <Device/Protocol/DeviceInterface.hpp>
3 
4 #include <ossia/network/zeroconf/zeroconf.hpp>
5 
6 namespace ossia::net
7 {
8 class protocol_base;
9 template <typename T>
10 class can_learn;
12 }
13 
14 namespace Protocols
15 {
16 struct OSCSpecificSettings;
18 {
19 public:
20  OSCDevice(
21  const Device::DeviceSettings& stngs, const ossia::net::network_context_ptr& ctx);
22 
23  void disconnect() override;
24  bool reconnect() override;
25  void recreate(const Device::Node&) final override;
26 
27  bool isLearning() const final override;
28  void setLearning(bool) final override;
29 
30 private:
31  void setup_zeroconf(const OSCSpecificSettings& stgs, const std::string& name);
32  const ossia::net::network_context_ptr& m_ctx;
33  ossia::net::zeroconf_server m_zeroconf{};
34  ossia::net::osc_protocol_base* m_oscproto{};
35 };
36 }
Definition: DeviceInterface.hpp:185
Definition: OSCDevice.hpp:18
Definition: OSCDevice.hpp:10
Definition: DeviceSettings.hpp:20
Definition: OSCSpecificSettings.hpp:12