INET Framework for OMNeT++/OMNEST
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

Constructor & Destructor Documentation

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

Default constructor.

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.

                                                                   : RTCPPacket() {
    setName(rtcpSDESPacket.getName());
    operator=(rtcpSDESPacket);
};
RTCPSDESPacket::~RTCPSDESPacket ( ) [virtual]

Destructor.

                                {
    delete _sdesChunks;
};

Member Function Documentation

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

Adds an sdes chunk to this rtcp sdes packet.

See also:
SDESChunk

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.

                                              {
    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.

                                          {
    return new RTCPSDESPacket(*this);
};
cArray * RTCPSDESPacket::getSdesChunks ( ) [virtual]

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

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.

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

Assignment operator.

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.

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


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