|
reSIProcate/DialogUsageManager
9694
|


Public Member Functions | |
| FixMissingContact (DialogUsageManager &dum, TargetCommand::Target &target) | |
| virtual ProcessingResult | process (Message *msg) |
| FixMissingContact::FixMissingContact | ( | DialogUsageManager & | dum, |
| TargetCommand::Target & | target | ||
| ) | [inline] |
Definition at line 18 of file treg.cxx.
:
DumFeature(dum, target)
{
}
| virtual ProcessingResult FixMissingContact::process | ( | Message * | msg | ) | [inline, virtual] |
Implements resip::DumFeature.
Definition at line 23 of file treg.cxx.
References resip::SipMessage::exists(), resip::DumFeature::FeatureDone, h_StatusLine, resip::SipMessage::header(), resip::SipMessage::isRequest(), resip::SipMessage::isResponse(), and resip::RequestLine::method().
{
SipMessage* sip = dynamic_cast<SipMessage*>(msg);
if (sip)
{
switch (sip->header(h_CSeq).method())
{
case NOTIFY:
if (sip->isRequest() && !sip->exists(h_Contacts) && sip->header(h_Contacts).empty())
{
sip->header(h_Contacts).push_back(sip->header(h_From));
}
break;
case SUBSCRIBE:
if (sip->isResponse() &&
sip->header(h_StatusLine).statusCode() / 200 == 1 &&
!sip->exists(h_Contacts) &&
sip->header(h_Contacts).empty())
{
sip->header(h_Contacts).push_back(sip->header(h_To));
}
break;
default:
break;
}
}
return DumFeature::FeatureDone;
}

1.7.5.1