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

#include <DialogId.hxx>

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

List of all members.

Public Member Functions

 DialogId (const SipMessage &msg)
 DialogId (const Data &callId, const Data &localTag, const Data &remoteTag)
 DialogId (const DialogSetId &id, const Data &remoteTag)
bool operator== (const DialogId &rhs) const
bool operator!= (const DialogId &rhs) const
bool operator< (const DialogId &rhs) const
const DialogSetIdgetDialogSetId () const
const DatagetCallId () const
const DatagetLocalTag () const
const DatagetRemoteTag () const
size_t hash () const

Private Attributes

DialogSetId mDialogSetId
Data mRemoteTag

Friends

EncodeStreamoperator<< (EncodeStream &, const DialogId &id)

Detailed Description

Definition at line 10 of file DialogId.hxx.


Constructor & Destructor Documentation

DialogId::DialogId ( const SipMessage msg)

Definition at line 9 of file DialogId.cxx.

References DebugLog, resip::SipMessage::header(), resip::SipMessage::isExternal(), resip::SipMessage::isRequest(), resip::SipMessage::isResponse(), and mRemoteTag.

                                        : 
   mDialogSetId(msg),
   mRemoteTag(Data::Empty)
{
   //find remote tag, which may not exist
   if (msg.isExternal())
   {
      if(msg.isResponse())
      {        
         if (msg.header(h_To).exists(p_tag))
         {
            mRemoteTag = msg.header(h_To).param(p_tag);
         }
      }
      else
      {
         if (msg.header(h_From).exists(p_tag))
         {
            mRemoteTag = msg.header(h_From).param(p_tag);
         }
      }
   }
   else
   {
      if(msg.isRequest())
      {
         //?dcm? -- is this just for 2543?  At this point, we will have to have
         //established a dialog(or else we would just have a dialogset)
         if (msg.header(h_To).exists(p_tag))
         {
            mRemoteTag = msg.header(h_To).param(p_tag);
         }
      }
      else
      {
         if (msg.header(h_From).exists(p_tag))
         {
            mRemoteTag = msg.header(h_From).param(p_tag);
         }
      }
   }
   DebugLog ( << "DialogId::DialogId: " << *this);   
}

Here is the call graph for this function:

DialogId::DialogId ( const Data callId,
const Data localTag,
const Data remoteTag 
)

Definition at line 53 of file DialogId.cxx.

                                                                                  : 
   mDialogSetId(callId, localTag),
   mRemoteTag(remoteTag)
{
}
DialogId::DialogId ( const DialogSetId id,
const Data remoteTag 
)

Definition at line 59 of file DialogId.cxx.

References DebugLog.

                                                               :
   mDialogSetId(id),
   mRemoteTag(remoteTag)
{
   DebugLog ( << "DialogId::DialogId: " << *this);   
}

Member Function Documentation

const Data & DialogId::getCallId ( ) const
const DialogSetId & DialogId::getDialogSetId ( ) const
const Data & DialogId::getLocalTag ( ) const

Definition at line 105 of file DialogId.cxx.

References getDialogSetId(), and resip::DialogSetId::getLocalTag().

Referenced by resip::DialogSet::findDialog(), resip::DialogEventInfo::getLocalTag(), and resip::Dialog::makeResponse().

{
   return getDialogSetId().getLocalTag(); 
}

Here is the call graph for this function:

const Data & DialogId::getRemoteTag ( ) const
size_t DialogId::hash ( ) const

Definition at line 124 of file DialogId.cxx.

References resip::Data::hash(), resip::DialogSetId::hash(), mDialogSetId, and mRemoteTag.

{
   return mDialogSetId.hash() ^ mRemoteTag.hash();
}

Here is the call graph for this function:

bool DialogId::operator!= ( const DialogId rhs) const

Definition at line 73 of file DialogId.cxx.

References mDialogSetId, and mRemoteTag.

{
   return mDialogSetId != rhs.mDialogSetId || mRemoteTag != rhs.mRemoteTag;
}
bool DialogId::operator< ( const DialogId rhs) const

Definition at line 79 of file DialogId.cxx.

References mDialogSetId, and mRemoteTag.

{
   if (mDialogSetId < rhs.mDialogSetId)
   {
      return true;
   }
   if (mDialogSetId > rhs.mDialogSetId)
   {
      return false;
   }
   return mRemoteTag < rhs.mRemoteTag;
}
bool DialogId::operator== ( const DialogId rhs) const

Definition at line 67 of file DialogId.cxx.

References mDialogSetId, and mRemoteTag.

{
   return mDialogSetId == rhs.mDialogSetId && mRemoteTag == rhs.mRemoteTag;
}

Friends And Related Function Documentation

EncodeStream& operator<< ( EncodeStream ,
const DialogId id 
) [friend]

Member Data Documentation

Definition at line 31 of file DialogId.hxx.

Referenced by getDialogSetId(), hash(), operator!=(), operator<(), and operator==().

Definition at line 32 of file DialogId.hxx.

Referenced by DialogId(), getRemoteTag(), hash(), operator!=(), operator<(), and operator==().


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