|
reSIProcate/DialogUsageManager
9694
|
#include <NetworkAssociation.hxx>

Public Member Functions | |
| NetworkAssociation () | |
| void | setDum (DialogUsageManager *dum) |
| bool | update (const SipMessage &msg, int keepAliveInterval, bool targetSupportsOutbound) |
| void | clear () |
| ~NetworkAssociation () | |
Private Attributes | |
| Tuple | mTarget |
| DialogUsageManager * | mDum |
| bool | mTargetSupportsOutbound |
| int | mKeepAliveInterval |
Definition at line 12 of file NetworkAssociation.hxx.
| resip::NetworkAssociation::NetworkAssociation | ( | ) | [inline] |
Definition at line 15 of file NetworkAssociation.hxx.
: mDum(0), mTargetSupportsOutbound(false), mKeepAliveInterval(0) {}
| NetworkAssociation::~NetworkAssociation | ( | ) |
Definition at line 46 of file NetworkAssociation.cxx.
References mDum, resip::DialogUsageManager::mKeepAliveManager, and mTarget.
{
if (mDum && mDum->mKeepAliveManager.get())
{
mDum->mKeepAliveManager->remove(mTarget);
}
}
| void NetworkAssociation::clear | ( | void | ) |
Definition at line 35 of file NetworkAssociation.cxx.
References mDum, mKeepAliveInterval, resip::DialogUsageManager::mKeepAliveManager, mTarget, and mTargetSupportsOutbound.
Referenced by resip::ClientRegistration::flowTerminated(), and resip::Dialog::flowTerminated().
{
if (mDum && mDum->mKeepAliveManager.get())
{
mDum->mKeepAliveManager->remove(mTarget);
mTarget = Tuple();
mTargetSupportsOutbound = false;
mKeepAliveInterval = 0;
}
}
| void resip::NetworkAssociation::setDum | ( | DialogUsageManager * | dum | ) | [inline] |
Definition at line 16 of file NetworkAssociation.hxx.
References mDum.
Referenced by resip::ClientRegistration::ClientRegistration(), and resip::Dialog::Dialog().
{ mDum = dum; }
| bool NetworkAssociation::update | ( | const SipMessage & | msg, |
| int | keepAliveInterval, | ||
| bool | targetSupportsOutbound | ||
| ) |
Definition at line 12 of file NetworkAssociation.cxx.
References resip::SipMessage::getSource(), resip::Tuple::getType(), mDum, resip::Tuple::mFlowKey, mKeepAliveInterval, resip::DialogUsageManager::mKeepAliveManager, mTarget, mTargetSupportsOutbound, and resip::Tuple::onlyUseExistingConnection.
Referenced by resip::ClientRegistration::dispatch(), and resip::Dialog::dispatch().
{
if (mDum && mDum->mKeepAliveManager.get())
{
const Tuple& source = msg.getSource();
if(source.getType() != 0 && // if source is populated in message
(!(source == mTarget) || // and (target is different from current
source.mFlowKey != mTarget.mFlowKey || // or flow key is different
mTargetSupportsOutbound != targetSupportsOutbound || // or outbound support flag is different
mKeepAliveInterval != keepAliveInterval)) // or keepaliveinterval is different) -> add to keepalivemanager
{
mDum->mKeepAliveManager->remove(mTarget);
mTarget = source;
mTarget.onlyUseExistingConnection = true; // Ensure that keepalives never open up a new connection
mTargetSupportsOutbound = targetSupportsOutbound;
mDum->mKeepAliveManager->add(mTarget, keepAliveInterval, targetSupportsOutbound);
return true;
}
}
return false;
}

Definition at line 22 of file NetworkAssociation.hxx.
Referenced by clear(), setDum(), update(), and ~NetworkAssociation().
int resip::NetworkAssociation::mKeepAliveInterval [private] |
Definition at line 24 of file NetworkAssociation.hxx.
Tuple resip::NetworkAssociation::mTarget [private] |
Definition at line 21 of file NetworkAssociation.hxx.
Referenced by clear(), update(), and ~NetworkAssociation().
bool resip::NetworkAssociation::mTargetSupportsOutbound [private] |
Definition at line 23 of file NetworkAssociation.hxx.
1.7.5.1