INET Framework for OMNeT++/OMNEST
|
#include <sdes.h>
Public Member Functions | |
SDESChunk (const char *name=NULL, uint32 ssrc=0) | |
SDESChunk (const SDESChunk &sdesChunk) | |
virtual | ~SDESChunk () |
SDESChunk & | operator= (const SDESChunk &sdesChunk) |
virtual SDESChunk * | dup () const |
virtual std::string | info () |
virtual void | dump (std::ostream &os) |
virtual void | addSDESItem (SDESItem *item) |
virtual uint32 | getSSRC () |
virtual void | setSSRC (uint32 ssrc) |
virtual int | getLength () |
Protected Attributes | |
uint32 | _ssrc |
int | _length |
SDESChunk::SDESChunk | ( | const char * | name = NULL , |
uint32 | ssrc = 0 |
||
) |
SDESChunk::SDESChunk | ( | const SDESChunk & | sdesChunk | ) |
Copy constructor.
: cArray(sdesChunk) { setName(sdesChunk.getName()); operator=(sdesChunk); };
SDESChunk::~SDESChunk | ( | ) | [virtual] |
Destructor.
{ };
void SDESChunk::addSDESItem | ( | SDESItem * | item | ) | [virtual] |
Adds an SDESItem to this SDESChunk. If there is already an SDESItem of the same type in this SDESChunk it is replaced by the new one.
Referenced by RTPParticipantInfo::addSDESItem().
{ for (int i = 0; i < size(); i++) { if (exist(i)) { SDESItem *compareItem = (SDESItem *)(get(i)); if (compareItem->getType() == sdesItem->getType()) { remove(compareItem); _length = _length - compareItem->getLength(); delete compareItem; }; } }; //sdesItem->setOwner(this); add(sdesItem); _length = _length + (sdesItem->getLength()); };
void SDESChunk::dump | ( | std::ostream & | os | ) | [virtual] |
SDESChunk * SDESChunk::dup | ( | ) | const [virtual] |
int SDESChunk::getLength | ( | ) | [virtual] |
Returns the length in bytes of this SDESChunk.
Referenced by RTCPSDESPacket::addSDESChunk().
{ return _length; };
uint32 SDESChunk::getSSRC | ( | ) | [virtual] |
Returns the ssrc identifier this SDESChunk is for.
Referenced by RTPParticipantInfo::getSSRC(), and RTCP::processIncomingRTCPPacket().
{ return _ssrc; };
std::string SDESChunk::info | ( | ) | [virtual] |
Operator equal.
Referenced by SDESChunk().
{ cArray::operator=(sdesChunk); _ssrc = sdesChunk._ssrc; _length = sdesChunk._length; return *this; };
void SDESChunk::setSSRC | ( | uint32 | ssrc | ) | [virtual] |
Sets the ssrc identifier this SDESChunk is for.
Referenced by RTPParticipantInfo::setSSRC().
{ _ssrc = ssrc; };
int SDESChunk::_length [protected] |
The length in bytes of this SDESChunk.
Referenced by addSDESItem(), getLength(), operator=(), and SDESChunk().
uint32 SDESChunk::_ssrc [protected] |
The ssrc identifier this SDESChunk is for.
Referenced by dump(), getSSRC(), info(), operator=(), SDESChunk(), and setSSRC().