score
Home
Classes
Namespaces
Files
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
9
namespace
ossia
10
{
11
namespace
net
12
{
13
class
device_base;
14
class
multiplex_protocol;
15
}
16
namespace
oscquery
17
{
18
class
oscquery_server_protocol;
19
}
20
}
21
22
namespace
Protocols
23
{
24
class
LocalDevice
final :
public
Device::DeviceInterface
25
{
26
public
:
27
LocalDevice
(
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
38
private
:
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
}
Device::DeviceInterface
Definition:
DeviceInterface.hpp:66
Protocols::LocalDevice
Definition:
LocalDevice.hpp:25
TreeNode< DeviceExplorerNode >
Device::DeviceSettings
Definition:
DeviceSettings.hpp:20
score::DocumentContext
Definition:
DocumentContext.hpp:18