|
reSIProcate/stack
9694
|
Process c= (connection) lines in SDP. More...
#include <SdpContents.hxx>

Public Member Functions | |
| Connection (AddrType addType, const Data &address, unsigned long ttl=0) | |
| constructor | |
| Connection (const Connection &rhs) | |
| Connection & | operator= (const Connection &rhs) |
| void | parse (ParseBuffer &pb) |
| EncodeStream & | encode (EncodeStream &) const |
| AddrType | getAddressType () const |
| returns the connection address type | |
| const Data & | getAddress () const |
| returns the connection address | |
| void | setAddress (const Data &host, AddrType type=IP4) |
| set the address for the connection | |
| unsigned long | ttl () const |
| unsigned long & | ttl () |
Private Member Functions | |
| Connection () | |
Private Attributes | |
| AddrType | mAddrType |
| Data | mAddress |
| unsigned long | mTTL |
Friends | |
| class | Session |
| class | Medium |
Process c= (connection) lines in SDP.
This line specifies the IP address and address type used in the session
Definition at line 336 of file SdpContents.hxx.
| SdpContents::Session::Connection::Connection | ( | const Connection & | rhs | ) |
Definition at line 494 of file SdpContents.cxx.
| SdpContents::Session::Connection::Connection | ( | ) | [private] |
| EncodeStream & SdpContents::Session::Connection::encode | ( | EncodeStream & | s | ) | const |
Definition at line 514 of file SdpContents.cxx.
References CRLF, NetworkType, resip::Symbols::SLASH, and resip::Symbols::SPACE.
{
s << "c=IN "
<< NetworkType[mAddrType] << Symbols::SPACE[0] << mAddress;
if (mTTL)
{
s << Symbols::SLASH[0] << mTTL;
}
s << Symbols::CRLF;
return s;
}
| const Data& resip::SdpContents::Session::Connection::getAddress | ( | ) | const [inline] |
returns the connection address
Definition at line 365 of file SdpContents.hxx.
References mAddress.
Referenced by resip::SdpContents::Session::Medium::getConnections(), and resip::SdpContents::Session::Medium::parse().
{return mAddress;}
| AddrType resip::SdpContents::Session::Connection::getAddressType | ( | ) | const [inline] |
returns the connection address type
Definition at line 359 of file SdpContents.hxx.
References mAddrType.
{return mAddrType;}
| SdpContents::Session::Connection & SdpContents::Session::Connection::operator= | ( | const Connection & | rhs | ) |
| void SdpContents::Session::Connection::parse | ( | ParseBuffer & | pb | ) |
Definition at line 535 of file SdpContents.cxx.
References resip::Symbols::CRLF, resip::ParseBuffer::data(), resip::ParseBuffer::eof(), resip::Symbols::EQUALS, resip::ParseBuffer::integer(), resip::SdpContents::IP4, resip::SdpContents::IP6, NetworkType, resip::ParseBuffer::position(), resip::ParseBuffer::skipChar(), skipEol(), resip::ParseBuffer::skipToChar(), resip::ParseBuffer::skipToOneOf(), resip::Symbols::SLASH, and resip::Symbols::SPACE.
{
pb.skipChar('c');
pb.skipChar(Symbols::EQUALS[0]);
pb.skipChar('I');
pb.skipChar('N');
const char* anchor = pb.skipChar(Symbols::SPACE[0]);
pb.skipToChar(Symbols::SPACE[0]);
Data addrType;
pb.data(addrType, anchor);
if (addrType == NetworkType[IP4])
{
mAddrType = IP4;
}
else if (addrType == NetworkType[IP6])
{
mAddrType = IP6;
}
else
{
mAddrType = static_cast<AddrType>(0);
}
anchor = pb.skipChar();
pb.skipToOneOf(Symbols::SLASH, Symbols::CRLF);
pb.data(mAddress, anchor);
mTTL = 0;
if (mAddrType == IP4 && !pb.eof() && *pb.position() == Symbols::SLASH[0])
{
pb.skipChar();
mTTL = pb.integer();
}
// multicast dealt with above this parser
if (!pb.eof() && *pb.position() != Symbols::SLASH[0])
{
skipEol(pb);
}
}

set the address for the connection
| host | IP address to associate with the connection |
| type | type of addressing |
Definition at line 528 of file SdpContents.cxx.
| unsigned long resip::SdpContents::Session::Connection::ttl | ( | ) | const [inline] |
| unsigned long& resip::SdpContents::Session::Connection::ttl | ( | ) | [inline] |
friend class Medium [friend] |
Definition at line 384 of file SdpContents.hxx.
friend class Session [friend] |
Definition at line 383 of file SdpContents.hxx.
Definition at line 380 of file SdpContents.hxx.
Referenced by getAddress(), resip::SdpContents::Session::isConnection(), and operator=().
Definition at line 379 of file SdpContents.hxx.
Referenced by getAddressType(), and operator=().
unsigned long resip::SdpContents::Session::Connection::mTTL [private] |
Definition at line 381 of file SdpContents.hxx.
Referenced by operator=(), and ttl().
1.7.5.1