Loading...
Searching...
No Matches
LocalDevice.hpp
1#pragma once
2#include <Device/Protocol/DeviceInterface.hpp>
3
4#include <ossia/network/base/device.hpp>
5#include <ossia/network/base/node.hpp>
6
7#include <nano_observer.hpp>
8
9namespace ossia
10{
11namespace net
12{
13class device_base;
14class multiplex_protocol;
15}
16namespace oscquery
17{
18class oscquery_server_protocol;
19}
20}
21
22namespace Protocols
23{
25{
26public:
28 ossia::net::device_base& dev, const score::DocumentContext& ctx,
29 const Device::DeviceSettings& settings);
30
31 ~LocalDevice() override;
32
33 void init();
34
35 ossia::net::device_base* getDevice() const override { return &m_dev; }
36 ossia::oscquery::oscquery_server_protocol* oscqProto() { return m_oscqProto; }
37
38private:
39 void disconnect() override;
40 bool reconnect() override;
41
42 Device::Node refresh() override;
43
44 const score::DocumentContext& m_ctx;
45 ossia::net::device_base& m_dev;
46 ossia::net::multiplex_protocol* m_proto{};
47 ossia::oscquery::oscquery_server_protocol* m_oscqProto{};
48
49 using DeviceInterface::refresh;
50};
51}
Definition DeviceInterface.hpp:66
Definition LocalDevice.hpp:25
Definition DeviceSettings.hpp:20
Definition DocumentContext.hpp:18