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