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