RTP.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                        RTP.h  -  description
00003                              -------------------
00004     begin            : Fri Aug 2 2007
00005     copyright        : (C) 2007 by Matthias Oppitz,  Ahmed Ayadi
00006     email            : <Matthias.Oppitz@gmx.de> <ahmed.ayadi@sophia.inria.fr>
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_RTPENDSYSTEMMODULE_H
00023 #define __INET_RTPENDSYSTEMMODULE_H
00024 
00025 #include "INETDefs.h"
00026 #include "IPvXAddress.h"
00027 #include "RTPInterfacePacket.h"
00028 #include "RTPInnerPacket.h"
00029 
00036 class INET_API RTP : public cSimpleModule
00037 {
00038     protected:
00039 
00043         virtual void initialize();
00044 
00048         virtual void handleMessage(cMessage *msg);
00049 
00050     protected:
00051 
00055         virtual void handleMessageFromApp(cMessage *msg);
00056 
00060         virtual void handleMessageFromProfile(cMessage *msg);
00061 
00065         virtual void handleMessageFromRTCP(cMessage *msg);
00066 
00070         virtual void handleMessagefromUDP(cMessage *msg);
00071 
00075         virtual void enterSession(RTPInterfacePacket *rifp);
00076 
00081         virtual void leaveSession(RTPInterfacePacket *rifp);
00082 
00083         virtual void createSenderModule(RTPInterfacePacket *rifp);
00084         virtual void deleteSenderModule(RTPInterfacePacket *rifp);
00085         virtual void senderModuleControl(RTPInterfacePacket *rifp);
00086 
00087 
00091         virtual void profileInitialized(RTPInnerPacket *rinp);
00092 
00093         virtual void senderModuleCreated(RTPInnerPacket *rinp);
00094         virtual void senderModuleDeleted(RTPInnerPacket *rinp);
00095         virtual void senderModuleInitialized(RTPInnerPacket *rinp);
00096         virtual void senderModuleStatus(RTPInnerPacket *rinp);
00097 
00102         virtual void dataOut(RTPInnerPacket *rinp);
00103 
00107         virtual void rtcpInitialized(RTPInnerPacket *rinp);
00108 
00113         virtual void sessionLeft(RTPInnerPacket *rinp);
00114 
00115 
00116     protected:
00120         const char *_commonName;
00121 
00125         const char *_profileName;
00126 
00130         int _bandwidth;
00131 
00135         IPAddress _destinationAddress;
00136 
00140         int _port;
00141 
00145         int _mtu;
00146 
00150         int _rtcpPercentage;
00151 
00155         int _socketFdIn;
00156 
00160         int _socketFdOut;
00161 
00165         bool _leaveSession;
00166 
00170         virtual void createProfile();
00171 
00175         virtual void createSocket();
00176 
00180         virtual void socketRet();
00181 
00185         virtual void connectRet();
00186 
00190         virtual void readRet(cMessage *sifp);
00191 
00195         virtual void initializeProfile();
00196 
00200         virtual void initializeRTCP();
00201 
00208         virtual int resolveMTU();
00209 };
00210 
00211 #endif
00212