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 RTCPSDESPacketdup () const
virtual std::string info ()
virtual void dump (std::ostream &os) const
virtual cArray * getSdesChunks ()
virtual void addSDESChunk (SDESChunk *sdesChunk)

Protected Attributes

cArray * _sdesChunks

Constructor & Destructor Documentation

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

Default constructor.

Referenced by dup().

00280                                                : RTCPPacket(name) {
00281     _packetType = RTCP_PT_SDES;
00282     _sdesChunks = new cArray("SDESChunks");
00283     // no addByteLength() needed, sdes chunks
00284     // directly follow the standard rtcp
00285     // header
00286 };

RTCPSDESPacket::RTCPSDESPacket ( const RTCPSDESPacket rtcpSDESPacket  ) 

Copy constructor.

00289                                                                    : RTCPPacket() {
00290     setName(rtcpSDESPacket.getName());
00291     operator=(rtcpSDESPacket);
00292 };

RTCPSDESPacket::~RTCPSDESPacket (  )  [virtual]

Destructor.

00295                                 {
00296     delete _sdesChunks;
00297 };


Member Function Documentation

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

Assignment operator.

Referenced by RTCPSDESPacket().

00300                                                                               {
00301     RTCPPacket::operator=(rtcpSDESPacket);
00302     _sdesChunks = new cArray(*(rtcpSDESPacket._sdesChunks));
00303     return *this;
00304 };

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

Duplicates the RTCPSDESPacket by calling the copy constructor.

Reimplemented from RTCPPacket.

00307                                           {
00308     return new RTCPSDESPacket(*this);
00309 };

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

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

Reimplemented from RTCPPacket.

00312                                {
00313     std::stringstream out;
00314     out << "RTCPSDESPacket: number of sdes chunks=" << _sdesChunks->size();
00315     return out.str();
00316 };

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

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

Reimplemented from RTCPPacket.

00319                                               {
00320     os << "RTCPSDESPacket:" << endl;
00321     for (int i = 0; i < _sdesChunks->size(); i++) {
00322         if (_sdesChunks->exist(i))
00323             ;//FIXME (*_sdesChunks)[i]->dump(os);
00324     }
00325 };

cArray * RTCPSDESPacket::getSdesChunks (  )  [virtual]

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

Referenced by RTCP::processIncomingRTCPPacket().

00328                                       {
00329     return new cArray(*_sdesChunks);
00330 };

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

Adds an sdes chunk to this rtcp sdes packet.

See also:
SDESChunk

Referenced by RTCP::createPacket().

00333                                                       {
00334     _sdesChunks->add(sdesChunk);
00335     _count++;
00336     // the size of the rtcp packet increases by the
00337     // size of the sdes chunk (including ssrc)
00338     addByteLength(sdesChunk->getLength());
00339 };


Member Data Documentation

cArray* RTCPSDESPacket::_sdesChunks [protected]

In this cArray the sdes chunks are stored.

Referenced by addSDESChunk(), dump(), getSdesChunks(), info(), operator=(), RTCPSDESPacket(), and ~RTCPSDESPacket().


The documentation for this class was generated from the following files:

Generated on Fri Mar 20 18:51:20 2009 for INET Framework for OMNeT++/OMNEST by  doxygen 1.5.5