reSIProcate/DialogUsageManager  9694
Public Types | Public Member Functions | Protected Attributes | Private Attributes | Friends
resip::DialogEventInfo Class Reference

#include <DialogEventInfo.hxx>

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

List of all members.

Public Types

enum  Direction { Initiator, Recipient }
enum  State {
  Trying = 0, Proceeding, Early, Confirmed,
  Terminated
}

Public Member Functions

 DialogEventInfo (void)
 DialogEventInfo (const DialogEventInfo &rhs)
DialogEventInfooperator= (const DialogEventInfo &dialogEventInfo)
bool operator== (const DialogEventInfo &rhs) const
bool operator!= (const DialogEventInfo &rhs) const
bool operator< (const DialogEventInfo &rhs) const
const StategetState () const
const DatagetDialogEventId () const
const DatagetCallId () const
const DatagetLocalTag () const
bool hasRemoteTag () const
const DatagetRemoteTag () const
bool hasRefferedBy () const
const NameAddrgetRefferredBy () const
const NameAddrgetLocalIdentity () const
const NameAddrgetRemoteIdentity () const
const UrigetLocalTarget () const
bool hasRouteSet () const
const NameAddrsgetRouteSet () const
bool hasRemoteTarget () const
const UrigetRemoteTarget () const
const ContentsgetLocalOfferAnswer () const
const ContentsgetRemoteOfferAnswer () const
bool hasLocalOfferAnswer () const
bool hasRemoteOfferAnswer () const
UInt64 getDurationSeconds () const
bool hasReplacesId () const
const DialogIdgetReplacesId () const
Direction getDirection () const

Protected Attributes

State mState
Data mDialogEventId
DialogId mDialogId
Direction mDirection
std::auto_ptr< DialogIdmReplacesId
InviteSessionHandle mInviteSession
std::auto_ptr< NameAddrmReferredBy
NameAddrs mRouteSet
NameAddr mLocalIdentity
NameAddr mRemoteIdentity
Uri mLocalTarget
std::auto_ptr< UrimRemoteTarget
UInt64 mCreationTimeSeconds
std::auto_ptr< ContentsmLocalOfferAnswer
std::auto_ptr< ContentsmRemoteOfferAnswer

Private Attributes

bool mReplaced

Friends

class DialogEventStateManager

Detailed Description

Definition at line 15 of file DialogEventInfo.hxx.


Member Enumeration Documentation

Enumerator:
Initiator 
Recipient 

Definition at line 27 of file DialogEventInfo.hxx.

Enumerator:
Trying 
Proceeding 
Early 
Confirmed 
Terminated 

Definition at line 33 of file DialogEventInfo.hxx.


Constructor & Destructor Documentation

resip::DialogEventInfo::DialogEventInfo ( void  )
resip::DialogEventInfo::DialogEventInfo ( const DialogEventInfo rhs)

Definition at line 17 of file DialogEventInfo.cxx.

References mLocalOfferAnswer, mRemoteOfferAnswer, and mReplacesId.

: mState(rhs.mState),
  mDialogEventId(rhs.mDialogEventId),
  mDialogId(rhs.mDialogId),
  mDirection(rhs.mDirection),
  mInviteSession(rhs.mInviteSession),
  mReferredBy(rhs.mReferredBy.get() ? new NameAddr(*rhs.mReferredBy) : 0),
  mRouteSet(rhs.mRouteSet),
  mLocalIdentity(rhs.mLocalIdentity),
  mRemoteIdentity(rhs.mRemoteIdentity),
  mLocalTarget(rhs.mLocalTarget),
  mRemoteTarget(rhs.mRemoteTarget.get() ? new Uri(*rhs.mRemoteTarget) : 0),
  mCreationTimeSeconds(rhs.mCreationTimeSeconds),
  mReplaced(rhs.mReplaced)
{
   if (rhs.mReplacesId.get())
   {
      mReplacesId = std::auto_ptr<DialogId>(new DialogId(rhs.mReplacesId->getCallId(),
                                                         rhs.mReplacesId->getLocalTag(),
                                                         rhs.mReplacesId->getRemoteTag()));
   }
   if (rhs.mLocalOfferAnswer.get())
   {
      mLocalOfferAnswer = std::auto_ptr<Contents>(rhs.mLocalOfferAnswer->clone());
   }
   if (rhs.mRemoteOfferAnswer.get())
   {
      mRemoteOfferAnswer = std::auto_ptr<Contents>(rhs.mRemoteOfferAnswer->clone());
   }
}

Member Function Documentation

const Data & resip::DialogEventInfo::getCallId ( ) const

Definition at line 133 of file DialogEventInfo.cxx.

References resip::DialogId::getCallId(), and mDialogId.

{
   return mDialogId.getCallId();
}

Here is the call graph for this function:

const Data & resip::DialogEventInfo::getDialogEventId ( ) const

Definition at line 127 of file DialogEventInfo.cxx.

References mDialogEventId.

{
   return mDialogEventId;
}
DialogEventInfo::Direction resip::DialogEventInfo::getDirection ( ) const

Definition at line 270 of file DialogEventInfo.cxx.

References mDirection.

{
   return mDirection;
}
UInt64 resip::DialogEventInfo::getDurationSeconds ( ) const

Definition at line 251 of file DialogEventInfo.cxx.

References resip::Timer::getTimeSecs(), and mCreationTimeSeconds.

{
   UInt64 delta = Timer::getTimeSecs() - mCreationTimeSeconds;
   return delta;
}

Here is the call graph for this function:

const NameAddr & resip::DialogEventInfo::getLocalIdentity ( ) const

Definition at line 169 of file DialogEventInfo.cxx.

References mLocalIdentity.

{
   return mLocalIdentity;
}
const Contents & resip::DialogEventInfo::getLocalOfferAnswer ( ) const

Definition at line 211 of file DialogEventInfo.cxx.

References resip::Handle< T >::isValid(), mInviteSession, and mLocalOfferAnswer.

{
   if (mInviteSession.isValid())
   {
      if (mInviteSession->hasLocalOfferAnswer())
      {
         return mInviteSession->getLocalOfferAnswer();
      }
   }
   assert(mLocalOfferAnswer.get() != NULL);
   return *mLocalOfferAnswer;
}

Here is the call graph for this function:

const Data & resip::DialogEventInfo::getLocalTag ( ) const

Definition at line 139 of file DialogEventInfo.cxx.

References resip::DialogId::getLocalTag(), and mDialogId.

{
   return mDialogId.getLocalTag();
}

Here is the call graph for this function:

const Uri & resip::DialogEventInfo::getLocalTarget ( ) const

Definition at line 181 of file DialogEventInfo.cxx.

References mLocalTarget.

{
   return mLocalTarget;   
}
const NameAddr & resip::DialogEventInfo::getRefferredBy ( ) const

Definition at line 163 of file DialogEventInfo.cxx.

References mReferredBy.

{
   return *mReferredBy;
}
const NameAddr & resip::DialogEventInfo::getRemoteIdentity ( ) const

Definition at line 175 of file DialogEventInfo.cxx.

References mRemoteIdentity.

{
   return mRemoteIdentity;
}
const Contents & resip::DialogEventInfo::getRemoteOfferAnswer ( ) const

Definition at line 225 of file DialogEventInfo.cxx.

References resip::Handle< T >::isValid(), mInviteSession, and mRemoteOfferAnswer.

{
   if (mInviteSession.isValid())
   {
      if (mInviteSession->hasRemoteOfferAnswer())
      {
         return mInviteSession->getRemoteOfferAnswer();
      }
   }
   assert(mRemoteOfferAnswer.get() != NULL);
   return *mRemoteOfferAnswer;
}

Here is the call graph for this function:

const Data & resip::DialogEventInfo::getRemoteTag ( ) const

Definition at line 151 of file DialogEventInfo.cxx.

References resip::DialogId::getRemoteTag(), and mDialogId.

{
   return mDialogId.getRemoteTag();
}

Here is the call graph for this function:

const Uri & resip::DialogEventInfo::getRemoteTarget ( ) const

Definition at line 205 of file DialogEventInfo.cxx.

References mRemoteTarget.

{
   return *mRemoteTarget;
}
const DialogId & resip::DialogEventInfo::getReplacesId ( ) const

Definition at line 264 of file DialogEventInfo.cxx.

References mReplacesId.

{
   return *mReplacesId;
}
const NameAddrs & resip::DialogEventInfo::getRouteSet ( ) const

Definition at line 193 of file DialogEventInfo.cxx.

References mRouteSet.

{
   return mRouteSet;
}
const DialogEventInfo::State & resip::DialogEventInfo::getState ( ) const

Definition at line 121 of file DialogEventInfo.cxx.

References mState.

{
   return mState;
}
bool resip::DialogEventInfo::hasLocalOfferAnswer ( ) const

Definition at line 239 of file DialogEventInfo.cxx.

References resip::Handle< T >::isValid(), mInviteSession, and mLocalOfferAnswer.

{
   return (mInviteSession.isValid() ? mInviteSession->hasLocalOfferAnswer() : mLocalOfferAnswer.get() != 0);
}

Here is the call graph for this function:

bool resip::DialogEventInfo::hasRefferedBy ( ) const

Definition at line 157 of file DialogEventInfo.cxx.

References mReferredBy.

{
   return (mReferredBy.get() != NULL);
}
bool resip::DialogEventInfo::hasRemoteOfferAnswer ( ) const

Definition at line 245 of file DialogEventInfo.cxx.

References resip::Handle< T >::isValid(), mInviteSession, and mRemoteOfferAnswer.

{
   return (mInviteSession.isValid() ? mInviteSession->hasRemoteOfferAnswer() : mRemoteOfferAnswer.get() != 0);
}

Here is the call graph for this function:

bool resip::DialogEventInfo::hasRemoteTag ( ) const

Definition at line 145 of file DialogEventInfo.cxx.

References resip::Data::Empty, resip::DialogId::getRemoteTag(), and mDialogId.

{
   return (mDialogId.getRemoteTag() != Data::Empty);
}

Here is the call graph for this function:

bool resip::DialogEventInfo::hasRemoteTarget ( ) const

Definition at line 199 of file DialogEventInfo.cxx.

References mRemoteTarget.

{
   return (mRemoteTarget.get() != NULL);
}
bool resip::DialogEventInfo::hasReplacesId ( ) const

Definition at line 258 of file DialogEventInfo.cxx.

References mReplacesId.

{
   return (mReplacesId.get() != 0);
}
bool resip::DialogEventInfo::hasRouteSet ( ) const

Definition at line 187 of file DialogEventInfo.cxx.

{
   return false;
}
bool resip::DialogEventInfo::operator!= ( const DialogEventInfo rhs) const

Definition at line 109 of file DialogEventInfo.cxx.

References mDialogEventId.

{
   return (mDialogEventId != rhs.mDialogEventId);
}
bool resip::DialogEventInfo::operator< ( const DialogEventInfo rhs) const

Definition at line 115 of file DialogEventInfo.cxx.

References mDialogEventId.

{
   return (mDialogEventId < rhs.mDialogEventId);
}
DialogEventInfo & resip::DialogEventInfo::operator= ( const DialogEventInfo dialogEventInfo)

Definition at line 49 of file DialogEventInfo.cxx.

References mCreationTimeSeconds, mDialogEventId, mDialogId, mDirection, mInviteSession, mLocalIdentity, mLocalOfferAnswer, mLocalTarget, mReferredBy, mRemoteIdentity, mRemoteOfferAnswer, mRemoteTarget, mReplaced, mReplacesId, mRouteSet, and mState.

{
   if (this != &dialogEventInfo)
   {
      mDialogId = dialogEventInfo.mDialogId;
      mState = dialogEventInfo.mState;
      mCreationTimeSeconds = dialogEventInfo.mCreationTimeSeconds;
      mDialogEventId = dialogEventInfo.mDialogEventId;
      mDirection = dialogEventInfo.mDirection;
      mInviteSession = dialogEventInfo.mInviteSession;
      mLocalIdentity = dialogEventInfo.mLocalIdentity;

      mLocalOfferAnswer.reset(0);
      mReferredBy.reset(0);
      mRemoteOfferAnswer.reset(0);
      mRemoteTarget.reset(0);
      mReplacesId.reset(0);

      if(dialogEventInfo.mLocalOfferAnswer.get())
      {
         mLocalOfferAnswer.reset(dialogEventInfo.mLocalOfferAnswer->clone());
      }

      if(dialogEventInfo.mReferredBy.get())
      {
         mReferredBy.reset((NameAddr*)(dialogEventInfo.mReferredBy->clone()));
      }

      if(dialogEventInfo.mRemoteOfferAnswer.get())
      {
         mRemoteOfferAnswer.reset(dialogEventInfo.mRemoteOfferAnswer->clone());
      }

      if(dialogEventInfo.mRemoteTarget.get())
      {
         mRemoteTarget.reset((Uri*)dialogEventInfo.mRemoteTarget->clone());
      }

      if(dialogEventInfo.mReplacesId.get())
      {
         mReplacesId.reset(
                  new DialogId(dialogEventInfo.mReplacesId->getDialogSetId(), 
                  dialogEventInfo.mReplacesId->getRemoteTag()));
      }

      mLocalTarget = dialogEventInfo.mLocalTarget;
      mRemoteIdentity = dialogEventInfo.mRemoteIdentity;
      mRouteSet = dialogEventInfo.mRouteSet;
      mReplaced = dialogEventInfo.mReplaced;
   }
   return *this;
}
bool resip::DialogEventInfo::operator== ( const DialogEventInfo rhs) const

Definition at line 103 of file DialogEventInfo.cxx.

References mDialogEventId.

{
   return (mDialogEventId == rhs.mDialogEventId);
}

Friends And Related Function Documentation

friend class DialogEventStateManager [friend]

Definition at line 77 of file DialogEventInfo.hxx.


Member Data Documentation

std::auto_ptr<NameAddr> resip::DialogEventInfo::mReferredBy [protected]
std::auto_ptr<Uri> resip::DialogEventInfo::mRemoteTarget [protected]
std::auto_ptr<DialogId> resip::DialogEventInfo::mReplacesId [protected]

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