1
#include "tfm/tfdum/TfdTcpTransport.hxx"
2
#include "tfm/tfdum/TfdTestSipEndPoint.hxx"
3
#include "rutil/Logger.hxx"
7
#define RESIPROCATE_SUBSYSTEM resip::Subsystem::TEST
9
TfdTestSipEndPoint::TfdTestSipEndPoint(const resip::Uri& from,
10
const resip::Uri& contact,
11
const resip::Uri& outboundProxy,
12
const resip::Data& interfaceObj,
13
resip::Security* security)
14
: TestSipEndPoint(from, contact, outboundProxy, false, interfaceObj, security)
16
setTransport(new TfdTcpTransport(mIncoming, mContact.uri().port(), V4, interfaceObj));
19
TfdTestSipEndPoint::TfdTestSipEndPoint(const resip::Uri& contact,
20
const resip::Uri& outboundProxy,
21
const resip::Data& interfaceObj,
22
resip::Security* security)
23
: TestSipEndPoint(contact, outboundProxy, false, interfaceObj, security)
25
setTransport(new TfdTcpTransport(mIncoming, mContact.uri().port(), V4, interfaceObj));
29
TfdTestSipEndPoint::~TfdTestSipEndPoint()
34
TfdTestSipEndPoint::removeConnections()
36
DebugLog(<< "TfdTestSipEndPoint::removeConnections");
37
assert(dynamic_cast<TfdTcpTransport*>(mTransport));
38
dynamic_cast<TfdTcpTransport*>(mTransport)->removeConnections();
41
TfdTestSipEndPoint::TerminateConnection::TerminateConnection(TfdTestSipEndPoint* from)
47
TfdTestSipEndPoint::TerminateConnection::operator()()
53
TfdTestSipEndPoint::TerminateConnection::operator()(boost::shared_ptr<Event> event)
59
TfdTestSipEndPoint::TerminateConnection::go()
61
mEndPoint.removeConnections();
65
TfdTestSipEndPoint::TerminateConnection::toString() const
67
return mEndPoint.getName() + ".terminateConnection()";
70
TfdTestSipEndPoint::Action*
71
TfdTestSipEndPoint::terminateConnection()
73
return new TerminateConnection(this);
78
// Copyright 2005 Purplecomm, Inc.
80
Copyright (c) 2005, PurpleComm, Inc.
83
Redistribution and use in source and binary forms, with or without modification,
84
are permitted provided that the following conditions are met:
86
* Redistributions of source code must retain the above copyright notice, this
87
list of conditions and the following disclaimer.
88
* Redistributions in binary form must reproduce the above copyright notice,
89
this list of conditions and the following disclaimer in the documentation
90
and/or other materials provided with the distribution.
91
* Neither the name of PurpleComm, Inc. nor the names of its contributors may
92
be used to endorse or promote products derived from this software without
93
specific prior written permission.
95
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
96
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
97
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
98
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
99
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
100
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
101
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
102
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
103
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
104
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.