reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ChannelManager.hxx
Go to the documentation of this file.
1
#ifndef CHANNELMANAGER_HXX
2
#define CHANNELMANAGER_HXX
3
4
#include <map>
5
#include "
RemotePeer.hxx
"
6
7
namespace
reTurn
{
8
9
#define MIN_CHANNEL_NUM 0x4000
10
#define MAX_CHANNEL_NUM 0x7FFF
11
12
class
ChannelManager
13
{
14
public
:
15
explicit
ChannelManager
();
16
~ChannelManager
();
17
18
void
clear
();
19
RemotePeer
*
createChannelBinding
(
const
StunTuple
&
peerTuple
);
20
RemotePeer
*
createChannelBinding
(
const
StunTuple
&
peerTuple
,
unsigned
short
channel);
21
22
RemotePeer
*
findRemotePeerByChannel
(
unsigned
short
channelNumber
);
23
RemotePeer
*
findRemotePeerByPeerAddress
(
const
StunTuple
&
peerAddress
);
24
25
private
:
26
typedef
std::map<unsigned short,RemotePeer*> ChannelRemotePeerMap;
27
typedef
std::map<StunTuple,RemotePeer*> TupleRemotePeerMap;
28
ChannelRemotePeerMap mChannelRemotePeerMap;
29
TupleRemotePeerMap mTupleRemotePeerMap;
30
31
unsigned
short
getNextChannelNumber();
32
unsigned
short
mNextChannelNumber;
33
};
34
35
}
36
37
#endif
38
39
40
/* ====================================================================
41
42
Copyright (c) 2024 SIP Spectrum, Inc http://www.sipspectrum.com
43
Copyright (c) 2007-2008, Plantronics, Inc.
44
All rights reserved.
45
46
Redistribution and use in source and binary forms, with or without
47
modification, are permitted provided that the following conditions are
48
met:
49
50
1. Redistributions of source code must retain the above copyright
51
notice, this list of conditions and the following disclaimer.
52
53
2. Redistributions in binary form must reproduce the above copyright
54
notice, this list of conditions and the following disclaimer in the
55
documentation and/or other materials provided with the distribution.
56
57
3. Neither the name of Plantronics nor the names of its contributors
58
may be used to endorse or promote products derived from this
59
software without specific prior written permission.
60
61
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
62
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
63
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
64
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
65
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
66
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
67
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
68
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
69
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
70
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
71
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
72
73
==================================================================== */
RemotePeer.hxx
reTurn::ChannelManager
Definition
ChannelManager.hxx:13
reTurn::ChannelManager::findRemotePeerByChannel
RemotePeer * findRemotePeerByChannel(unsigned short channelNumber)
Definition
ChannelManager.cxx:78
reTurn::ChannelManager::findRemotePeerByPeerAddress
RemotePeer * findRemotePeerByPeerAddress(const StunTuple &peerAddress)
Definition
ChannelManager.cxx:99
reTurn::ChannelManager::ChannelManager
ChannelManager()
Definition
ChannelManager.cxx:15
reTurn::ChannelManager::createChannelBinding
RemotePeer * createChannelBinding(const StunTuple &peerTuple)
Definition
ChannelManager.cxx:58
reTurn::ChannelManager::clear
void clear()
Definition
ChannelManager.cxx:30
reTurn::ChannelManager::~ChannelManager
~ChannelManager()
Definition
ChannelManager.cxx:25
reTurn::RemotePeer
Definition
RemotePeer.hxx:10
reTurn::StunTuple
Definition
StunTuple.hxx:24
reTurn
Definition
AsyncSocketBase.cxx:16
list
void list()
Definition
userAdmin.cxx:66
reTurn
ChannelManager.hxx
Generated by
1.9.8