reSIProcate/DialogUsageManager  9694
Public Member Functions | Private Attributes
resip::NetworkAssociation Class Reference

#include <NetworkAssociation.hxx>

Collaboration diagram for resip::NetworkAssociation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 NetworkAssociation ()
void setDum (DialogUsageManager *dum)
bool update (const SipMessage &msg, int keepAliveInterval, bool targetSupportsOutbound)
void clear ()
 ~NetworkAssociation ()

Private Attributes

Tuple mTarget
DialogUsageManagermDum
bool mTargetSupportsOutbound
int mKeepAliveInterval

Detailed Description

Definition at line 12 of file NetworkAssociation.hxx.


Constructor & Destructor Documentation

resip::NetworkAssociation::NetworkAssociation ( ) [inline]

Definition at line 15 of file NetworkAssociation.hxx.

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);
   }
}

Member Function Documentation

void NetworkAssociation::clear ( void  )
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;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 22 of file NetworkAssociation.hxx.

Referenced by clear(), setDum(), update(), and ~NetworkAssociation().

Definition at line 24 of file NetworkAssociation.hxx.

Referenced by clear(), and update().

Definition at line 21 of file NetworkAssociation.hxx.

Referenced by clear(), update(), and ~NetworkAssociation().

Definition at line 23 of file NetworkAssociation.hxx.

Referenced by clear(), and update().


The documentation for this class was generated from the following files: