00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00024 #ifndef __RTPINTERFACEPACKET_H__
00025 #define __RTPINTERFACEPACKET_H__
00026
00027 #include "omnetpp.h"
00028
00029 #include "in_addr.h"
00030 #include "in_port.h"
00031
00032 #include "types.h"
00033
00034 #include "RTPSenderControlMessage.h"
00035 #include "RTPSenderStatusMessage.h"
00036
00037
00038
00045 class RTPInterfacePacket : public cPacket {
00046
00047 public:
00048
00053 enum RTP_IFP_TYPE {
00054 RTP_IFP_UNDEF,
00055 RTP_IFP_ENTER_SESSION,
00056 RTP_IFP_SESSION_ENTERED,
00057 RTP_IFP_CREATE_SENDER_MODULE,
00058 RTP_IFP_SENDER_MODULE_CREATED,
00059 RTP_IFP_DELETE_SENDER_MODULE,
00060 RTP_IFP_SENDER_MODULE_DELETED,
00061 RTP_IFP_SENDER_CONTROL,
00062 RTP_IFP_SENDER_STATUS,
00063 RTP_IFP_LEAVE_SESSION,
00064 RTP_IFP_SESSION_LEFT
00065 };
00066
00070 RTPInterfacePacket(const char *name = NULL);
00071
00075 RTPInterfacePacket(const RTPInterfacePacket& rifp);
00076
00080 virtual ~RTPInterfacePacket();
00081
00085 RTPInterfacePacket& operator=(const RTPInterfacePacket& rifp);
00086
00090 virtual cObject *dup() const;
00091
00095 virtual const char *className() const;
00096
00100 virtual void info(char *buf);
00101
00105 virtual void writeContents(ostream& os);
00106
00111 virtual void enterSession(const char *commonName, const char *profileName, int bandwidth, IN_Addr destinationAddress, IN_Port port);
00112
00117 virtual void sessionEntered(u_int32 ssrc);
00118
00119
00120 virtual void createSenderModule(u_int32 ssrc, int payloadType, const char *fileName);
00121 virtual void senderModuleCreated(u_int32 ssrc);
00122 virtual void deleteSenderModule(u_int32 ssrc);
00123 virtual void senderModuleDeleted(u_int32 ssrc);
00124 virtual void senderModuleControl(u_int32 ssrc, RTPSenderControlMessage *msg);
00125 virtual void senderModuleStatus(u_int32 ssrc, RTPSenderStatusMessage *msg);
00126
00131
00132
00137
00138
00144
00145
00150
00151
00156
00157
00162 virtual void leaveSession();
00163
00169 virtual void sessionLeft();
00170
00174 virtual RTP_IFP_TYPE type();
00175
00179 virtual const char *commonName();
00180
00184 virtual const char *profileName();
00185
00189 virtual int bandwidth();
00190
00194 virtual IN_Addr destinationAddress();
00195
00199 virtual IN_Port port();
00200
00204 virtual u_int32 ssrc();
00205
00209 virtual int payloadType();
00210
00214 virtual const char *fileName();
00215
00216 private:
00217
00221 RTP_IFP_TYPE _type;
00222
00226 const char *_commonName;
00227
00231 const char *_profileName;
00232
00236 int _bandwidth;
00237
00241 IN_Addr _destinationAddress;
00242
00246 IN_Port _port;
00247
00251 u_int32 _ssrc;
00252
00256 int _payloadType;
00257
00261 const char *_fileName;
00262 };
00263
00264 #endif