reSIProcate/DialogUsageManager  9694
Public Member Functions
FixMissingContact Class Reference
Inheritance diagram for FixMissingContact:
Inheritance graph
[legend]
Collaboration diagram for FixMissingContact:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FixMissingContact (DialogUsageManager &dum, TargetCommand::Target &target)
virtual ProcessingResult process (Message *msg)

Detailed Description

Definition at line 15 of file treg.cxx.


Constructor & Destructor Documentation

FixMissingContact::FixMissingContact ( DialogUsageManager dum,
TargetCommand::Target target 
) [inline]

Definition at line 18 of file treg.cxx.

                                                                              : 
         DumFeature(dum, target)
      {
      }

Member Function Documentation

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;
      }

Here is the call graph for this function:


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