RTPParticipantInfo.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           RTPParticipantInfo.h  -  description
00003                              -------------------
00004     begin                : Wed Oct 24 2001
00005     copyright            : (C) 2001 by Matthias Oppitz
00006     email                : Matthias.Oppitz@gmx.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00022 #ifndef __INET_RTPPARTICIPANTINFO_H
00023 #define __INET_RTPPARTICIPANTINFO_H
00024 
00025 #include <stdio.h>
00026 #include "INETDefs.h"
00027 #include "IPAddress.h"
00028 #include "RTPPacket.h"
00029 #include "RTCPPacket.h"
00030 #include "reports.h"
00031 #include "sdes.h"
00032 
00043 class INET_API RTPParticipantInfo : public cObject
00044 {
00045 
00046     public:
00047 
00051         RTPParticipantInfo(uint32 ssrc = 0);
00052 
00056         RTPParticipantInfo(const RTPParticipantInfo& participantInfo);
00057 
00061         virtual ~RTPParticipantInfo();
00062 
00066         RTPParticipantInfo& operator=(const RTPParticipantInfo& participantInfo);
00067 
00071         virtual RTPParticipantInfo *dup() const;
00072 
00081         virtual void processRTPPacket(RTPPacket *packet, int id, simtime_t arrivalTime);
00082 
00087         virtual void processSenderReport(SenderReport *report, simtime_t arrivalTime);
00088 
00092         virtual void processReceptionReport(ReceptionReport *report, simtime_t arrivalTime);
00093 
00097         virtual void processSDESChunk(SDESChunk *sdesChunk, simtime_t arrivalTime);
00098 
00103         virtual SDESChunk *getSDESChunk();
00104 
00108         virtual void addSDESItem(SDESItem *sdesItem);
00109 
00115         virtual ReceptionReport *receptionReport(simtime_t now);
00116 
00124         virtual SenderReport *senderReport(simtime_t now);
00125 
00137         virtual void nextInterval(simtime_t now);
00138 
00144         virtual bool toBeDeleted(simtime_t now);
00145 
00151         virtual bool isSender();
00152 
00156         virtual uint32 getSSRC();
00157 
00161         virtual void setSSRC(uint32 ssrc);
00162 
00166         virtual IPAddress getAddress();
00167 
00171         virtual void setAddress(IPAddress address);
00172 
00177         virtual int getRTPPort();
00178 
00183         virtual void setRTPPort(int rtpPort);
00184 
00189         virtual int getRTCPPort();
00190 
00195         virtual void setRTCPPort(int rtpPort);
00196 
00202         static char *ssrcToName(uint32 ssrc);
00203 
00204         virtual void dump() const;
00205 
00206     protected:
00207 
00212         SDESChunk *_sdesChunk;
00213 
00217         IPAddress _address;
00218 
00222         int _rtpPort;
00223 
00227         int _rtcpPort;
00228 
00234         int _silentIntervals;
00235 
00240         virtual void addSDESItem(SDESItem::SDES_ITEM_TYPE type, const char *content);
00241 };
00242 
00243 #endif
00244