00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __OPAL_H323RTP_H
00035 #define __OPAL_H323RTP_H
00036
00037 #ifdef P_USE_PRAGMA
00038 #pragma interface
00039 #endif
00040
00041
00042 #include <rtp/rtp.h>
00043
00044
00045 class H225_RTPSession;
00046
00047 class H245_TransportAddress;
00048 class H245_H2250LogicalChannelParameters;
00049 class H245_H2250LogicalChannelAckParameters;
00050
00051 class H323Connection;
00052 class H323_RTPChannel;
00053
00054
00056
00059 class H323_RTP_Session : public RTP_UserData
00060 {
00061 PCLASSINFO(H323_RTP_Session, RTP_UserData);
00062
00071 virtual void OnTxStatistics(
00072 const RTP_Session & session
00073 ) const;
00074
00081 virtual void OnRxStatistics(
00082 const RTP_Session & session
00083 ) const;
00085
00090 virtual PBoolean OnSendingPDU(
00091 const H323_RTPChannel & channel,
00092 H245_H2250LogicalChannelParameters & param
00093 ) const = 0;
00094
00098 virtual void OnSendingAckPDU(
00099 const H323_RTPChannel & channel,
00100 H245_H2250LogicalChannelAckParameters & param
00101 ) const = 0;
00102
00107 virtual PBoolean OnReceivedPDU(
00108 H323_RTPChannel & channel,
00109 const H245_H2250LogicalChannelParameters & param,
00110 unsigned & errorCode
00111 ) = 0;
00112
00117 virtual PBoolean OnReceivedAckPDU(
00118 H323_RTPChannel & channel,
00119 const H245_H2250LogicalChannelAckParameters & param
00120 ) = 0;
00121
00128 virtual void OnSendRasInfo(
00129 H225_RTPSession & info
00130 ) = 0;
00132
00133
00134 protected:
00139 H323_RTP_Session(
00140 const H323Connection & connection
00141 );
00143
00144 const H323Connection & connection;
00145 };
00146
00147
00150 class H323_RTP_UDP : public H323_RTP_Session
00151 {
00152 PCLASSINFO(H323_RTP_UDP, H323_RTP_Session);
00153
00154 public:
00159 H323_RTP_UDP(
00160 const H323Connection & connection,
00161 RTP_UDP & rtp
00162 );
00164
00169 virtual PBoolean OnSendingPDU(
00170 const H323_RTPChannel & channel,
00171 H245_H2250LogicalChannelParameters & param
00172 ) const;
00173
00177 virtual void OnSendingAckPDU(
00178 const H323_RTPChannel & channel,
00179 H245_H2250LogicalChannelAckParameters & param
00180 ) const;
00181
00188 virtual PBoolean OnReceivedPDU(
00189 H323_RTPChannel & channel,
00190 const H245_H2250LogicalChannelParameters & param,
00191 unsigned & errorCode
00192 );
00193
00200 virtual PBoolean OnReceivedAckPDU(
00201 H323_RTPChannel & channel,
00202 const H245_H2250LogicalChannelAckParameters & param
00203 );
00204
00211 virtual void OnSendRasInfo(
00212 H225_RTPSession & info
00213 );
00215
00216 protected:
00217 virtual PBoolean ExtractTransport(
00218 const H245_TransportAddress & pdu,
00219 PBoolean isDataPort,
00220 unsigned & errorCode
00221 );
00222
00223 RTP_UDP & rtp;
00224 };
00225
00226
00227 #endif // __OPAL_H323RTP_H
00228
00229