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
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 #ifndef __OPAL_H323RTP_H
00068 #define __OPAL_H323RTP_H
00069
00070 #ifdef P_USE_PRAGMA
00071 #pragma interface
00072 #endif
00073
00074
00075 #include "rtp.h"
00076
00077
00078 class H225_RTPSession;
00079
00080 class H245_TransportAddress;
00081 class H245_H2250LogicalChannelParameters;
00082 class H245_H2250LogicalChannelAckParameters;
00083
00084 class H323Connection;
00085 class H323_RTPChannel;
00086
00087
00088
00090
00093 class H323_RTP_Session : public RTP_UserData
00094 {
00095 PCLASSINFO(H323_RTP_Session, RTP_UserData);
00096
00105 virtual void OnTxStatistics(
00106 const RTP_Session & session
00107 ) const;
00108
00115 virtual void OnRxStatistics(
00116 const RTP_Session & session
00117 ) const;
00119
00124 virtual BOOL OnSendingPDU(
00125 const H323_RTPChannel & channel,
00126 H245_H2250LogicalChannelParameters & param
00127 ) const = 0;
00128
00132 virtual void OnSendingAckPDU(
00133 const H323_RTPChannel & channel,
00134 H245_H2250LogicalChannelAckParameters & param
00135 ) const = 0;
00136
00141 virtual BOOL OnReceivedPDU(
00142 H323_RTPChannel & channel,
00143 const H245_H2250LogicalChannelParameters & param,
00144 unsigned & errorCode
00145 ) = 0;
00146
00151 virtual BOOL OnReceivedAckPDU(
00152 H323_RTPChannel & channel,
00153 const H245_H2250LogicalChannelAckParameters & param
00154 ) = 0;
00155
00162 virtual void OnSendRasInfo(
00163 H225_RTPSession & info
00164 ) = 0;
00166
00167
00168 protected:
00173 H323_RTP_Session(
00174 const H323Connection & connection
00175 );
00177
00178 const H323Connection & connection;
00179 };
00180
00181
00184 class H323_RTP_UDP : public H323_RTP_Session
00185 {
00186 PCLASSINFO(H323_RTP_UDP, H323_RTP_Session);
00187
00188 public:
00193 H323_RTP_UDP(
00194 const H323Connection & connection,
00195 RTP_UDP & rtp,
00196 RTP_QOS * rtpqos = NULL
00197 );
00199
00204 virtual BOOL OnSendingPDU(
00205 const H323_RTPChannel & channel,
00206 H245_H2250LogicalChannelParameters & param
00207 ) const;
00208
00212 virtual void OnSendingAckPDU(
00213 const H323_RTPChannel & channel,
00214 H245_H2250LogicalChannelAckParameters & param
00215 ) const;
00216
00223 virtual BOOL OnReceivedPDU(
00224 H323_RTPChannel & channel,
00225 const H245_H2250LogicalChannelParameters & param,
00226 unsigned & errorCode
00227 );
00228
00235 virtual BOOL OnReceivedAckPDU(
00236 H323_RTPChannel & channel,
00237 const H245_H2250LogicalChannelAckParameters & param
00238 );
00239
00246 virtual void OnSendRasInfo(
00247 H225_RTPSession & info
00248 );
00250
00251 protected:
00252 virtual BOOL ExtractTransport(
00253 const H245_TransportAddress & pdu,
00254 BOOL isDataPort,
00255 unsigned & errorCode
00256 );
00257
00258 RTP_UDP & rtp;
00259 };
00260
00261
00262 #endif // __OPAL_H323RTP_H
00263
00264