|
reSIProcate/stack
9694
|
#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"
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 |
Definition at line 13 of file SdpContents.cxx.
| 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);
}
}

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

| void skipEol | ( | ParseBuffer & | pb | ) |
Definition at line 36 of file SdpContents.cxx.
References resip::Symbols::CR, resip::ParseBuffer::eof(), resip::Symbols::LF, resip::ParseBuffer::position(), resip::ParseBuffer::skipChar(), resip::Symbols::SPACE, and resip::Symbols::TAB.
Referenced by resip::AttributeHelper::parse(), resip::SdpContents::Session::Origin::parse(), resip::SdpContents::Session::Email::parse(), resip::SdpContents::Session::Phone::parse(), resip::SdpContents::Session::Connection::parse(), resip::SdpContents::Session::Bandwidth::parse(), resip::SdpContents::Session::Time::parse(), resip::SdpContents::Session::Time::Repeat::parse(), resip::SdpContents::Session::Timezones::parse(), resip::SdpContents::Session::Encryption::parse(), resip::SdpContents::Session::Medium::parse(), and resip::SdpContents::Session::parse().
{
while(!pb.eof() && (*pb.position() == Symbols::SPACE[0] ||
*pb.position() == Symbols::TAB[0]))
{
pb.skipChar();
}
if (*pb.position() == Symbols::LF[0])
{
pb.skipChar();
}
else
{
// allow extra 0x0d bytes.
while(*pb.position() == Symbols::CR[0])
{
pb.skipChar();
}
pb.skipChar(Symbols::LF[0]);
}
}

Codec emptyCodec [static] |
Definition at line 1672 of file SdpContents.cxx.
Referenced by resip::SdpContents::Session::Medium::findFirstMatchingCodecs().
| const char* KeyTypes[] = {"????", "prompt", "clear", "base64", "uri"} |
Definition at line 886 of file SdpContents.cxx.
Referenced by resip::SdpContents::Session::Encryption::encode(), and resip::SdpContents::Session::Encryption::parse().
| const char* NetworkType[] = {"???", "IP4", "IP6"} |
Definition at line 28 of file SdpContents.cxx.
Referenced by resip::SdpContents::Session::Origin::encode(), resip::SdpContents::Session::Connection::encode(), resip::SdpContents::Session::Origin::parse(), and resip::SdpContents::Session::Connection::parse().
Data nullOrigin("0.0.0.0") [static] |
Referenced by resip::SdpContents::Session::Medium::addAttribute(), resip::SdpContents::Session::addAttribute(), resip::SdpContents::Session::Medium::clearAttribute(), resip::SdpContents::Session::clearAttribute(), resip::SdpContents::Session::Medium::clearCodecs(), and resip::SdpContents::Session::Medium::codecs().
1.7.5.1