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


Public Member Functions | |
| ClientOutOfDialogReq (DialogUsageManager &dum, DialogSet &dialogSet, const SipMessage &req) | |
| ClientOutOfDialogReqHandle | getHandle () |
| bool | matches (const SipMessage &msg) const |
| const SipMessage & | getRequest () const |
| virtual void | end () |
| virtual void | dispatch (const SipMessage &msg) |
| virtual void | dispatch (const DumTimeout &timer) |
| virtual EncodeStream & | dump (EncodeStream &strm) const |
Protected Member Functions | |
| virtual | ~ClientOutOfDialogReq () |
Private Member Functions | |
| ClientOutOfDialogReq (const ClientOutOfDialogReq &) | |
| ClientOutOfDialogReq & | operator= (const ClientOutOfDialogReq &) |
Private Attributes | |
| CSeqCategory | mCSeq |
| SipMessage | mRequest |
Friends | |
| class | DialogSet |
Definition at line 12 of file ClientOutOfDialogReq.hxx.
| 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] |
Definition at line 27 of file ClientOutOfDialogReq.cxx.
References resip::DialogSet::mClientOutOfDialogRequests, and resip::NonDialogUsage::mDialogSet.
{
mDialogSet.mClientOutOfDialogRequests.remove(this);
}
| resip::ClientOutOfDialogReq::ClientOutOfDialogReq | ( | const ClientOutOfDialogReq & | ) | [private] |
| 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() );
}
}

| void ClientOutOfDialogReq::dispatch | ( | const DumTimeout & | timer | ) | [virtual] |
| 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;
}

| 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().
{
return ClientOutOfDialogReqHandle(mDum, getBaseHandle().getId());
}

| const SipMessage & ClientOutOfDialogReq::getRequest | ( | ) | const |
| 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] |
friend class DialogSet [friend] |
Definition at line 31 of file ClientOutOfDialogReq.hxx.
Definition at line 32 of file ClientOutOfDialogReq.hxx.
Definition at line 33 of file ClientOutOfDialogReq.hxx.
Referenced by dump(), getRequest(), and matches().
1.7.5.1