Public Member Functions | Protected Attributes

RTCPSDESPacket Class Reference

#include <RTCPPacket.h>

Inheritance diagram for RTCPSDESPacket:
RTCPPacket

List of all members.

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

Detailed Description

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

See also:
SDESChunk

Definition at line 311 of file RTCPPacket.h.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 280 of file RTCPPacket.cc.

Referenced by dup().

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

RTCPSDESPacket::RTCPSDESPacket ( const RTCPSDESPacket rtcpSDESPacket  ) 

Copy constructor.

Definition at line 289 of file RTCPPacket.cc.

                                                                   : RTCPPacket() {
    setName(rtcpSDESPacket.getName());
    operator=(rtcpSDESPacket);
};

RTCPSDESPacket::~RTCPSDESPacket (  )  [virtual]

Destructor.

Definition at line 295 of file RTCPPacket.cc.

                                {
    delete _sdesChunks;
};


Member Function Documentation

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

Adds an sdes chunk to this rtcp sdes packet.

See also:
SDESChunk

Definition at line 333 of file RTCPPacket.cc.

Referenced by RTCP::createPacket().

                                                      {
    _sdesChunks->add(sdesChunk);
    _count++;
    // the size of the rtcp packet increases by the
    // size of the sdes chunk (including ssrc)
    addByteLength(sdesChunk->getLength());
};

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

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

Reimplemented from RTCPPacket.

Definition at line 319 of file RTCPPacket.cc.

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

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

Duplicates the RTCPSDESPacket by calling the copy constructor.

Reimplemented from RTCPPacket.

Definition at line 307 of file RTCPPacket.cc.

                                          {
    return new RTCPSDESPacket(*this);
};

cArray * RTCPSDESPacket::getSdesChunks (  )  [virtual]

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

Definition at line 328 of file RTCPPacket.cc.

Referenced by RTCP::processIncomingRTCPPacket().

                                      {
    return new cArray(*_sdesChunks);
};

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

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

Reimplemented from RTCPPacket.

Definition at line 312 of file RTCPPacket.cc.

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

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

Assignment operator.

Definition at line 300 of file RTCPPacket.cc.

Referenced by RTCPSDESPacket().

                                                                              {
    RTCPPacket::operator=(rtcpSDESPacket);
    _sdesChunks = new cArray(*(rtcpSDESPacket._sdesChunks));
    return *this;
};


Member Data Documentation

cArray* RTCPSDESPacket::_sdesChunks [protected]

In this cArray the sdes chunks are stored.

Definition at line 366 of file RTCPPacket.h.

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


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