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