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

#include <ClientOutOfDialogReq.hxx>

Inheritance diagram for resip::ClientOutOfDialogReq:
Inheritance graph
[legend]
Collaboration diagram for resip::ClientOutOfDialogReq:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ClientOutOfDialogReq (DialogUsageManager &dum, DialogSet &dialogSet, const SipMessage &req)
ClientOutOfDialogReqHandle getHandle ()
bool matches (const SipMessage &msg) const
const SipMessagegetRequest () const
virtual void end ()
virtual void dispatch (const SipMessage &msg)
virtual void dispatch (const DumTimeout &timer)
virtual EncodeStreamdump (EncodeStream &strm) const

Protected Member Functions

virtual ~ClientOutOfDialogReq ()

Private Member Functions

 ClientOutOfDialogReq (const ClientOutOfDialogReq &)
ClientOutOfDialogReqoperator= (const ClientOutOfDialogReq &)

Private Attributes

CSeqCategory mCSeq
SipMessage mRequest

Friends

class DialogSet

Detailed Description

Definition at line 12 of file ClientOutOfDialogReq.hxx.


Constructor & Destructor Documentation

ClientOutOfDialogReq::ClientOutOfDialogReq ( DialogUsageManager dum,
DialogSet dialogSet,
const SipMessage req 
)

Definition at line 19 of file ClientOutOfDialogReq.cxx.

   : NonDialogUsage(dum, dialogSet), 
     mRequest(req)
{
}
ClientOutOfDialogReq::~ClientOutOfDialogReq ( ) [protected, virtual]
resip::ClientOutOfDialogReq::ClientOutOfDialogReq ( const ClientOutOfDialogReq ) [private]

Member Function Documentation

void ClientOutOfDialogReq::dispatch ( const SipMessage msg) [virtual]

Implements resip::BaseUsage.

Definition at line 39 of file ClientOutOfDialogReq.cxx.

References resip::Message::brief(), DebugLog, getHandle(), getMethodName(), resip::DialogUsageManager::getOutOfDialogHandler(), h_StatusLine, resip::SipMessage::header(), resip::SipMessage::isResponse(), resip::BaseUsage::mDum, resip::RequestLine::method(), resip::OutOfDialogHandler::onFailure(), and resip::OutOfDialogHandler::onSuccess().

Referenced by resip::DialogSet::dispatch().

{
        assert(msg.isResponse());
    
    if (msg.header(h_StatusLine).statusCode() >= 200)
    {
       OutOfDialogHandler *handler = mDum.getOutOfDialogHandler(msg.header(h_CSeq).method());
       if(handler != NULL)
       {
          
          if(msg.header(h_StatusLine).statusCode() >= 200 && msg.header(h_StatusLine).statusCode() < 300)
          {
             // Pass Response to Handler
             DebugLog ( << "ClientOutOfDialogReq::dispatch - handler found for " 
                        << getMethodName(msg.header(h_CSeq).method()) 
                        << " method success response.");   
             handler->onSuccess(getHandle(), msg);  
          }
          else
          {
             // Pass Response to Handler
             DebugLog ( << "ClientOutOfDialogReq::dispatch - handler found for " 
                      << getMethodName(msg.header(h_CSeq).method()) 
                        << " method failure response.");   
             handler->onFailure(getHandle(), msg);  
          }
       }
       else
       {
          DebugLog ( << "ClientOutOfDialogReq::dispatch - handler not found for " 
                     << getMethodName(msg.header(h_CSeq).method()) 
                     << " method response.");   
       }

       delete this;
    }
    else
    {
       // Wait for final response
       DebugLog ( << "ClientOutOfDialogReq::dispatch - encountered provisional response" << msg.brief() );
    }    
}

Here is the call graph for this function:

void ClientOutOfDialogReq::dispatch ( const DumTimeout timer) [virtual]

Implements resip::BaseUsage.

Definition at line 89 of file ClientOutOfDialogReq.cxx.

{
}
EncodeStream & ClientOutOfDialogReq::dump ( EncodeStream strm) const [virtual]

Implements resip::BaseUsage.

Definition at line 100 of file ClientOutOfDialogReq.cxx.

References getMethodName(), h_RequestLine, resip::SipMessage::header(), resip::RequestLine::method(), and mRequest.

{
   strm << "ClientOutOfDialogReq " << getMethodName(mRequest.header(h_RequestLine).method()) 
        << " cseq=" << mRequest.header(h_CSeq).sequence();
   return strm;
}

Here is the call graph for this function:

void ClientOutOfDialogReq::end ( ) [virtual]

Implements resip::BaseUsage.

Definition at line 33 of file ClientOutOfDialogReq.cxx.

{
   delete this;
}
ClientOutOfDialogReqHandle ClientOutOfDialogReq::getHandle ( )

Definition at line 14 of file ClientOutOfDialogReq.cxx.

References resip::BaseUsage::getBaseHandle(), and resip::BaseUsage::mDum.

Referenced by dispatch().

Here is the call graph for this function:

const SipMessage & ClientOutOfDialogReq::getRequest ( ) const

Definition at line 83 of file ClientOutOfDialogReq.cxx.

References mRequest.

{
   return mRequest;
}
bool ClientOutOfDialogReq::matches ( const SipMessage msg) const

Definition at line 94 of file ClientOutOfDialogReq.cxx.

References mRequest.

{
   return (DialogSetId(mRequest) == DialogSetId(msg));
}
ClientOutOfDialogReq& resip::ClientOutOfDialogReq::operator= ( const ClientOutOfDialogReq ) [private]

Friends And Related Function Documentation

friend class DialogSet [friend]

Definition at line 31 of file ClientOutOfDialogReq.hxx.


Member Data Documentation

Definition at line 32 of file ClientOutOfDialogReq.hxx.

Definition at line 33 of file ClientOutOfDialogReq.hxx.

Referenced by dump(), getRequest(), and matches().


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