/[resiprocate]/main/reTurn/ConnectionManager.cxx
ViewVC logotype

Contents of /main/reTurn/ConnectionManager.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8367 - (show annotations) (download)
Tue Dec 16 18:10:49 2008 UTC (10 years, 10 months ago) by sgodin
File MIME type: text/plain
File size: 2178 byte(s)
-update a bunch of license blocks from Vovida 2.0 to BSD-3 clause that were supposed to have been changed months ago
1 #include <algorithm>
2 #include <boost/bind.hpp>
3
4 #include "ConnectionManager.hxx"
5
6 namespace reTurn {
7
8 void
9 ConnectionManager::start(ConnectionPtr c)
10 {
11 mConnections.insert(c);
12 c->start();
13 }
14
15 void
16 ConnectionManager::stop(ConnectionPtr c)
17 {
18 mConnections.erase(c);
19 c->stop();
20 }
21
22 void
23 ConnectionManager::stopAll()
24 {
25 std::set<ConnectionPtr>::iterator it = mConnections.begin();
26
27 for(; it != mConnections.end(); it++)
28 {
29 (*it)->stop();
30 }
31 mConnections.clear();
32 }
33
34 }
35
36
37 /* ====================================================================
38
39 Copyright (c) 2007-2008, Plantronics, Inc.
40 All rights reserved.
41
42 Redistribution and use in source and binary forms, with or without
43 modification, are permitted provided that the following conditions are
44 met:
45
46 1. Redistributions of source code must retain the above copyright
47 notice, this list of conditions and the following disclaimer.
48
49 2. Redistributions in binary form must reproduce the above copyright
50 notice, this list of conditions and the following disclaimer in the
51 documentation and/or other materials provided with the distribution.
52
53 3. Neither the name of Plantronics nor the names of its contributors
54 may be used to endorse or promote products derived from this
55 software without specific prior written permission.
56
57 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
58 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
59 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
60 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
61 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
62 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
63 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
64 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
65 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
66 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
67 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68
69 ==================================================================== */

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27