Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
control_interface_map.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 Roc Streaming authors
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
*/
8
9
//! @file roc_ctl/control_interface_map.h
10
//! @brief Control interface map.
11
12
#ifndef ROC_CTL_CONTROL_INTERFACE_MAP_H_
13
#define ROC_CTL_CONTROL_INTERFACE_MAP_H_
14
15
#include "
roc_address/interface.h
"
16
#include "
roc_address/protocol.h
"
17
#include "
roc_core/iarena.h
"
18
#include "
roc_core/shared_ptr.h
"
19
#include "
roc_core/singleton.h
"
20
#include "
roc_ctl/basic_control_endpoint.h
"
21
#include "
roc_ctl/control_task_queue.h
"
22
#include "
roc_netio/network_loop.h
"
23
24
namespace
roc
{
25
namespace
ctl {
26
27
//! Control interface map.
28
class
ControlInterfaceMap
:
public
core::NonCopyable
<> {
29
public
:
30
//! Get instance.
31
static
ControlInterfaceMap
&
instance
() {
32
return
core::Singleton<ControlInterfaceMap>::instance
();
33
}
34
35
//! Create control endpoint for given interface and protocol.
36
core::SharedPtr<BasicControlEndpoint>
new_endpoint
(
address::Interface
iface,
37
address::Protocol
proto,
38
ControlTaskQueue
& task_queue,
39
netio::NetworkLoop
& network_loop,
40
core::IArena
& arena);
41
42
private
:
43
friend
class
core::Singleton
<
ControlInterfaceMap
>;
44
45
ControlInterfaceMap
();
46
};
47
48
}
// namespace ctl
49
}
// namespace roc
50
51
#endif
// ROC_CTL_CONTROL_INTERFACE_MAP_H_
basic_control_endpoint.h
Base class for control endpoints.
roc::core::IArena
Memory arena interface.
Definition:
iarena.h:23
roc::core::NonCopyable
Base class for non-copyable objects.
Definition:
noncopyable.h:23
roc::core::SharedPtr
Shared ownership intrusive pointer.
Definition:
shared_ptr.h:32
roc::core::Singleton
Singleton.
Definition:
singleton.h:26
roc::core::Singleton::instance
static T & instance()
Get singleton instance.
Definition:
singleton.h:29
roc::ctl::ControlInterfaceMap
Control interface map.
Definition:
control_interface_map.h:28
roc::ctl::ControlInterfaceMap::new_endpoint
core::SharedPtr< BasicControlEndpoint > new_endpoint(address::Interface iface, address::Protocol proto, ControlTaskQueue &task_queue, netio::NetworkLoop &network_loop, core::IArena &arena)
Create control endpoint for given interface and protocol.
roc::ctl::ControlInterfaceMap::instance
static ControlInterfaceMap & instance()
Get instance.
Definition:
control_interface_map.h:31
roc::ctl::ControlTaskQueue
Control task queue.
Definition:
control_task_queue.h:125
roc::netio::NetworkLoop
Network event loop thread.
Definition:
network_loop.h:52
control_task_queue.h
Control task queue.
iarena.h
Memory arena interface.
interface.h
Interface ID.
roc::address::Interface
Interface
Interface ID.
Definition:
interface.h:19
roc::address::Protocol
Protocol
Protocol ID.
Definition:
protocol.h:19
roc
Root namespace.
network_loop.h
Network event loop thread.
protocol.h
Protocol ID.
shared_ptr.h
Shared ownership intrusive pointer.
singleton.h
Singleton.
roc_ctl
control_interface_map.h
Generated by
1.9.1