RTCPSDESPacket Class Reference

#include <RTCPPacket.h>

Inheritance diagram for RTCPSDESPacket:

RTCPPacket List of all members.

Detailed Description

An object of this class holds 0 to 31 source description chunks for participants of the rtp session.
See also:
SDESChunk


Public Member Functions

 RTCPSDESPacket (const char *name=NULL)
 RTCPSDESPacket (const RTCPSDESPacket &rtcpSDESPacket)
virtual ~RTCPSDESPacket ()
RTCPSDESPacketoperator= (const RTCPSDESPacket &rtcpSDESPacket)
virtual cObject * dup () const
virtual const char * className () const
virtual std::string info ()
virtual void writeContents (std::ostream &os) const
virtual cArray * sdesChunks ()
virtual void addSDESChunk (SDESChunk *sdesChunk)

Private Attributes

cArray * _sdesChunks


Constructor & Destructor Documentation

RTCPSDESPacket::RTCPSDESPacket ( const char *  name = NULL  ) 

Default constructor.

00298                                                : RTCPPacket(name) {
00299     _packetType = RTCP_PT_SDES;
00300     _sdesChunks = new cArray("SDESChunks");
00301     // no addLength() needed, sdes chunks
00302     // directly follow the standard rtcp
00303     // header
00304 };

RTCPSDESPacket::RTCPSDESPacket ( const RTCPSDESPacket rtcpSDESPacket  ) 

Copy constructor.

00307                                                                    : RTCPPacket() {
00308     setName(rtcpSDESPacket.name());
00309     operator=(rtcpSDESPacket);
00310 };

RTCPSDESPacket::~RTCPSDESPacket (  )  [virtual]

Destructor.

00313                                 {
00314     delete _sdesChunks;
00315 };


Member Function Documentation

void RTCPSDESPacket::addSDESChunk ( SDESChunk sdesChunk  )  [virtual]

Adds an sdes chunk to this rtcp sdes packet.

See also:
SDESChunk
00356                                                       {
00357     _sdesChunks->add(sdesChunk);
00358     _count++;
00359     // the size of the rtcp packet increases by the
00360     // size of the sdes chunk (including ssrc)
00361     addLength(sdesChunk->length());
00362 };

const char * RTCPSDESPacket::className (  )  const [virtual]

Return the class name "RTCPSDESPacket".

Reimplemented from RTCPPacket.

00330                                             {
00331     return "RTCPSDESPacket";
00332 };

cObject * RTCPSDESPacket::dup (  )  const [virtual]

Duplicates the RTCPSDESPacket by calling the copy constructor.

Reimplemented from RTCPPacket.

00325                                    {
00326     return new RTCPSDESPacket(*this);
00327 };

std::string RTCPSDESPacket::info (  )  [virtual]

Writes a short info about this RTCPSDESPacket into the given string.

Reimplemented from RTCPPacket.

00335                                {
00336     std::stringstream out;
00337     out << "RTCPSDESPacket: number of sdes chunks=" << _sdesChunks->items();
00338     return out.str();
00339 };

RTCPSDESPacket & RTCPSDESPacket::operator= ( const RTCPSDESPacket rtcpSDESPacket  ) 

Assignment operator.

00318                                                                               {
00319     RTCPPacket::operator=(rtcpSDESPacket);
00320     _sdesChunks = new cArray(*(rtcpSDESPacket._sdesChunks));
00321     return *this;
00322 };

cArray * RTCPSDESPacket::sdesChunks (  )  [virtual]

Returns a copy of the cArray where the sdes chunks are stored.

00351                                    {
00352     return new cArray(*_sdesChunks);
00353 };

void RTCPSDESPacket::writeContents ( std::ostream &  os  )  const [virtual]

Writes a longer report about this RTCPSDESPacket into the given stream.

Reimplemented from RTCPPacket.

00342                                                        {
00343     os << "RTCPSDESPacket:" << endl;
00344     for (int i = 0; i < _sdesChunks->items(); i++) {
00345         if (_sdesChunks->exist(i))
00346             (*_sdesChunks)[i]->writeContents(os);
00347     }
00348 };


Member Data Documentation

cArray* RTCPSDESPacket::_sdesChunks [private]

In this cArray the sdes chunks are stored.


The documentation for this class was generated from the following files:
Generated on Wed Apr 4 13:20:23 2007 for INET Framework for OMNeT++/OMNEST by  doxygen 1.4.7