/[resiprocate]/main/reTurn/TurnAllocationManager.hxx
ViewVC logotype

Contents of /main/reTurn/TurnAllocationManager.hxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11159 - (show annotations) (download)
Fri Apr 25 14:03:32 2014 UTC (5 years, 6 months ago) by sgodin
File size: 2639 byte(s)
-modified asio and boost include file ordering to avoid multiply defined symbol errors on linking
 -in preparation for upgrade of asio drop and support for latest boost 
 -include asio/ssh.hpp everywhere asio.hpp is included
 -include boost headers before others, to ensure we are not redefining stdint definitions in some includes
  and not others

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 private:
32 typedef std::map<TurnAllocationKey, TurnAllocation*> TurnAllocationMap; // .slg. consider using hash table
33 TurnAllocationMap mTurnAllocationMap;
34 };
35
36 }
37
38 #endif
39
40
41 /* ====================================================================
42
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 ==================================================================== */
74

Properties

Name Value
svn:eol-style native

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27