|
reSIProcate/stack
9694
|
processes o= lines in SDP More...
#include <SdpContents.hxx>

Public Member Functions | |
| Origin (const Data &user, const UInt64 &sessionId, const UInt64 &version, AddrType addr, const Data &address) | |
| constructor for origin line | |
| Origin (const Origin &rhs) | |
| Origin & | operator= (const Origin &rhs) |
| void | parse (ParseBuffer &pb) |
| EncodeStream & | encode (EncodeStream &) const |
| const UInt64 & | getSessionId () const |
| returns the session ID | |
| UInt64 & | getSessionId () |
| returns the session ID | |
| const UInt64 & | getVersion () const |
| returns the session version | |
| UInt64 & | getVersion () |
| returns the session version | |
| const Data & | user () const |
| returns the user string for the session | |
| Data & | user () |
| returns the user string for the session | |
| AddrType | getAddressType () const |
| returns the session address type | |
| const Data & | getAddress () const |
| returns the session address type | |
| void | setAddress (const Data &host, AddrType type=IP4) |
| set the address for the session | |
Private Member Functions | |
| Origin () | |
Private Attributes | |
| Data | mUser |
| UInt64 | mSessionId |
| UInt64 | mVersion |
| AddrType | mAddrType |
| Data | mAddress |
Friends | |
| class | Session |
processes o= lines in SDP
Definition at line 170 of file SdpContents.hxx.
| SdpContents::Session::Origin::Origin | ( | const Data & | user, |
| const UInt64 & | sessionId, | ||
| const UInt64 & | version, | ||
| AddrType | addr, | ||
| const Data & | address | ||
| ) |
constructor for origin line
| user | session user |
| sessionId | session ID |
| version | session version |
| addr | session address type (IP4 or IP6) |
| address | IP address of the session |
Definition at line 253 of file SdpContents.cxx.
| SdpContents::Session::Origin::Origin | ( | const Origin & | rhs | ) |
Definition at line 229 of file SdpContents.cxx.
: mUser(rhs.mUser), mSessionId(rhs.mSessionId), mVersion(rhs.mVersion), mAddrType(rhs.mAddrType), mAddress(rhs.mAddress) { }
| SdpContents::Session::Origin::Origin | ( | ) | [private] |
Definition at line 221 of file SdpContents.cxx.
: mUser(), mSessionId(0), mVersion(0), mAddrType(IP4), mAddress(nullOrigin) {}
| EncodeStream & SdpContents::Session::Origin::encode | ( | EncodeStream & | s | ) | const |
Definition at line 266 of file SdpContents.cxx.
References CRLF, resip::SdpContents::Session::mVersion, NetworkType, and resip::Symbols::SPACE.
{
s << "o="
<< mUser << Symbols::SPACE[0]
<< mSessionId << Symbols::SPACE[0]
<< mVersion << Symbols::SPACE[0]
<< "IN "
<< NetworkType[mAddrType] << Symbols::SPACE[0]
<< mAddress << Symbols::CRLF;
return s;
}
| const Data& resip::SdpContents::Session::Origin::getAddress | ( | ) | const [inline] |
returns the session address type
Definition at line 228 of file SdpContents.hxx.
References mAddress.
{return mAddress;}
| AddrType resip::SdpContents::Session::Origin::getAddressType | ( | ) | const [inline] |
returns the session address type
Definition at line 223 of file SdpContents.hxx.
References mAddrType.
{return mAddrType;}
| const UInt64& resip::SdpContents::Session::Origin::getSessionId | ( | ) | const [inline] |
returns the session ID
Definition at line 196 of file SdpContents.hxx.
References mSessionId.
{return mSessionId;}
| UInt64& resip::SdpContents::Session::Origin::getSessionId | ( | ) | [inline] |
returns the session ID
Definition at line 200 of file SdpContents.hxx.
References mSessionId.
{ return mSessionId; }
| const UInt64& resip::SdpContents::Session::Origin::getVersion | ( | ) | const [inline] |
returns the session version
Definition at line 205 of file SdpContents.hxx.
References mVersion.
{return mVersion;}
| UInt64& resip::SdpContents::Session::Origin::getVersion | ( | ) | [inline] |
returns the session version
Definition at line 209 of file SdpContents.hxx.
References mVersion.
{ return mVersion; }
| SdpContents::Session::Origin & SdpContents::Session::Origin::operator= | ( | const Origin & | rhs | ) |
Definition at line 239 of file SdpContents.cxx.
References mAddress, mAddrType, mSessionId, mUser, mVersion, and resip::SdpContents::Session::mVersion.
{
if (this != &rhs)
{
mUser = rhs.mUser;
mSessionId = rhs.mSessionId;
mVersion = rhs.mVersion;
mAddrType = rhs.mAddrType;
mAddress = rhs.mAddress;
}
return *this;
}
| void SdpContents::Session::Origin::parse | ( | ParseBuffer & | pb | ) |
Definition at line 286 of file SdpContents.cxx.
References resip::Symbols::CRLF, resip::ParseBuffer::data(), resip::Symbols::EQUALS, resip::SdpContents::IP4, resip::SdpContents::IP6, resip::SdpContents::Session::mVersion, NetworkType, resip::ParseBuffer::skipChar(), skipEol(), resip::ParseBuffer::skipToChar(), resip::ParseBuffer::skipToOneOf(), resip::Symbols::SPACE, resip::ParseBuffer::uInt64(), and WarningLog.
{
pb.skipChar('o');
const char* anchor = pb.skipChar(Symbols::EQUALS[0]);
pb.skipToChar(Symbols::SPACE[0]);
pb.data(mUser, anchor);
anchor = pb.skipChar(Symbols::SPACE[0]);
try
{
mSessionId = pb.uInt64();
}
catch(ParseException& e)
{
WarningLog(<< "Exception parsing origin sessionid: " << e);
}
pb.skipToChar(Symbols::SPACE[0]);
anchor = pb.skipChar(Symbols::SPACE[0]);
try
{
mVersion = pb.uInt64();
}
catch(ParseException& e)
{
WarningLog(<< "Exception parsing origin version: " << e);
}
pb.skipToChar(Symbols::SPACE[0]);
pb.skipChar(Symbols::SPACE[0]);
pb.skipChar('I');
pb.skipChar('N');
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(Symbols::SPACE[0]);
pb.skipToOneOf(Symbols::CRLF);
pb.data(mAddress, anchor);
skipEol(pb);
}

set the address for the session
| host | IP address to associate with the session |
| type | type of addressing |
Definition at line 279 of file SdpContents.cxx.
| const Data& resip::SdpContents::Session::Origin::user | ( | ) | const [inline] |
returns the user string for the session
Definition at line 213 of file SdpContents.hxx.
References mUser.
{return mUser;}
| Data& resip::SdpContents::Session::Origin::user | ( | ) | [inline] |
returns the user string for the session
Definition at line 217 of file SdpContents.hxx.
References mUser.
{return mUser;}
friend class Session [friend] |
Definition at line 246 of file SdpContents.hxx.
Definition at line 244 of file SdpContents.hxx.
Referenced by getAddress(), and operator=().
Definition at line 243 of file SdpContents.hxx.
Referenced by getAddressType(), and operator=().
Definition at line 241 of file SdpContents.hxx.
Referenced by getSessionId(), and operator=().
Definition at line 240 of file SdpContents.hxx.
Referenced by operator=(), and user().
Definition at line 242 of file SdpContents.hxx.
Referenced by getVersion(), and operator=().
1.7.5.1