reSIProcate/stack  9694
Defines | Functions | Variables
SdpContents.cxx File Reference
#include "resip/stack/SdpContents.hxx"
#include "resip/stack/Helper.hxx"
#include "rutil/ParseBuffer.hxx"
#include "rutil/DataStream.hxx"
#include "resip/stack/Symbols.hxx"
#include "rutil/Logger.hxx"
#include "rutil/WinLeakCheck.hxx"
Include dependency graph for SdpContents.cxx:

Go to the source code of this file.

Defines

#define RESIPROCATE_SUBSYSTEM   resip::Subsystem::SDP

Functions

void skipEol (ParseBuffer &pb)
void parseEorP (ParseBuffer &pb, Data &eOrp, Data &freeText)
int parseTypedTime (ParseBuffer &pb)

Variables

const char * NetworkType [] = {"???", "IP4", "IP6"}
static const Data rtpmap ("rtpmap")
static const Data fmtp ("fmtp")
static Data nullOrigin ("0.0.0.0")
const char * KeyTypes [] = {"????", "prompt", "clear", "base64", "uri"}
static Codec emptyCodec

Define Documentation

Definition at line 13 of file SdpContents.cxx.


Function Documentation

void parseEorP ( ParseBuffer pb,
Data eOrp,
Data freeText 
)

Definition at line 381 of file SdpContents.cxx.

References resip::ParseBuffer::data(), resip::Symbols::EQUALS, resip::ParseBuffer::position(), resip::Symbols::RA_QUOTE, resip::Symbols::RPAREN, resip::ParseBuffer::skipChar(), resip::ParseBuffer::skipToEndQuote(), and resip::ParseBuffer::skipToOneOf().

Referenced by resip::SdpContents::Session::Email::parse(), and resip::SdpContents::Session::Phone::parse().

{
   // =mjh@isi.edu (Mark Handley)
   // =mjh@isi.edu
   // =Mark Handley <mjh@isi.edu>
   // =<mjh@isi.edu>

   const char* anchor = pb.skipChar(Symbols::EQUALS[0]);

   pb.skipToOneOf("<(\n\r");  // find a left angle bracket "<", a left paren "(", or a CR 
   switch (*pb.position())
   {
      case '\n':                                        // Symbols::CR[0]
      case '\r':                                        // Symbols::LF[0]
         // mjh@isi.edu
         //            ^
         pb.data(eOrp, anchor);
         break;

      case '<':                                 // Symbols::LA_QUOTE[0]
         // Mark Handley <mjh@isi.edu>
         //              ^
         // <mjh@isi.edu>
         // ^
                  
         pb.data(freeText, anchor);
         anchor = pb.skipChar();
         pb.skipToEndQuote(Symbols::RA_QUOTE[0]);
         pb.data(eOrp, anchor);
         pb.skipChar(Symbols::RA_QUOTE[0]);
         break;
                  
      case '(':                                 // Symbols::LPAREN[0]
         // mjh@isi.edu (Mark Handley)
         //             ^
                  
         pb.data(eOrp, anchor);
         anchor = pb.skipChar();
         pb.skipToEndQuote(Symbols::RPAREN[0]);
         pb.data(freeText, anchor);
         pb.skipChar(Symbols::RPAREN[0]);
         break;
      default:
         assert(0);
   }
}

Here is the call graph for this function:

int parseTypedTime ( ParseBuffer pb)

Definition at line 719 of file SdpContents.cxx.

References resip::ParseBuffer::eof(), resip::ParseBuffer::integer(), resip::ParseBuffer::position(), and resip::ParseBuffer::skipChar().

Referenced by resip::SdpContents::Session::Time::Repeat::parse(), and resip::SdpContents::Session::Timezones::parse().

{
   int v = pb.integer();
   if (!pb.eof())
   {
      switch (*pb.position())
      {
         case 's' :
            pb.skipChar();
            break;
         case 'm' :
            v *= 60;
            pb.skipChar();
            break;
         case 'h' :
            v *= 3600;
            pb.skipChar();
       break;
         case 'd' :
            v *= 3600*24;
            pb.skipChar();
      }
   }
   return v;
}

Here is the call graph for this function:

void skipEol ( ParseBuffer pb)

Variable Documentation

Codec emptyCodec [static]
const Data fmtp("fmtp") [static]
const char* KeyTypes[] = {"????", "prompt", "clear", "base64", "uri"}
const char* NetworkType[] = {"???", "IP4", "IP6"}
Data nullOrigin("0.0.0.0") [static]
const Data rtpmap("rtpmap") [static]