#include <RTCPPacket.h>
Public Member Functions | |
| RTCPCompoundPacket (const char *name=NULL) | |
| RTCPCompoundPacket (const RTCPCompoundPacket &rtcpCompoundPacket) | |
| virtual | ~RTCPCompoundPacket () |
| RTCPCompoundPacket & | operator= (const RTCPCompoundPacket &rtcpCompoundPacket) |
| virtual cObject * | dup () const |
| virtual const char * | className () const |
| virtual std::string | info () |
| virtual void | writeContents (std::ostream &os) const |
| virtual void | addRTCPPacket (RTCPPacket *rtcpPacket) |
| virtual cArray * | rtcpPackets () |
Private Attributes | |
| cArray * | _rtcpPackets |
|
|
Default constructor. 00426 : cPacket(name) {
00427 _rtcpPackets = new cArray("RTCPPackets");
00428 // an empty rtcp compound packet has length 0 bytes
00429 setLength(0);
00430 };
|
|
|
Copy constructor. 00433 : cPacket() {
00434 setName(rtcpCompoundPacket.name());
00435 operator=(rtcpCompoundPacket);
00436 };
|
|
|
Destructor. 00439 {
00440 delete _rtcpPackets;
00441 };
|
|
|
Adds an RTCPPacket to this RTCPCompoundPacket. 00479 {
00480 //rtcpPacket->setOwner(_rtcpPackets);
00481 _rtcpPackets->add(rtcpPacket);
00482 // the size of the rtcp compound packet increases
00483 // by the size of the added rtcp packet
00484 addLength(rtcpPacket->length());
00485 };
|
|
|
Return the class name "RTCPCompoundPacket". 00457 {
00458 return "RTCPCompoundPacket";
00459 };
|
|
|
Duplicates the RTCPCompoundPacket by calling the copy constructor. 00452 {
00453 return new RTCPCompoundPacket(*this);
00454 };
|
|
|
Writes a short info about this RTCPCompoundPacket into the given string. 00462 {
00463 std::stringstream out;
00464 out << "RTCPCompoundPacket: number of rtcp packets=" << _rtcpPackets->items();
00465 return out.str();
00466 };
|
|
|
Assignment operator. 00444 {
00445 cPacket::operator=(rtcpCompoundPacket);
00446 setLength(rtcpCompoundPacket.length());
00447 _rtcpPackets = new cArray(*(rtcpCompoundPacket._rtcpPackets));
00448 return *this;
00449 };
|
|
|
Returns a copy of the cArray in which the rtcp packets are stored. 00488 {
00489 return new cArray(*_rtcpPackets);
00490 }
|
|
|
Writes a longer info about this RTCPCompoundPacket into the given stream. 00469 {
00470 os << "RTCPCompoundPacket:" << endl;
00471 for (int i = 0; i < _rtcpPackets->items(); i++) {
00472 if (_rtcpPackets->exist(i)) {
00473 _rtcpPackets->get(i)->writeContents(os);
00474 }
00475 }
00476 };
|
|
|
The cArray in which the rtcp packets are stored. |
1.4.1