OPAL
Version 3.10.4
|
00001 /* 00002 * h323rtp.h 00003 * 00004 * H.323 RTP protocol handler 00005 * 00006 * Open H323 Library 00007 * 00008 * Copyright (c) 1998-2001 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Open H323 Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Portions of this code were written with the assisance of funding from 00025 * Vovida Networks, Inc. http://www.vovida.com. 00026 * 00027 * Contributor(s): ______________________________________. 00028 * 00029 * $Revision: 21293 $ 00030 * $Author: rjongbloed $ 00031 * $Date: 2008-10-12 18:24:41 -0500 (Sun, 12 Oct 2008) $ 00032 */ 00033 00034 #ifndef OPAL_H323_H323RTP_H 00035 #define OPAL_H323_H323RTP_H 00036 00037 #ifdef P_USE_PRAGMA 00038 #pragma interface 00039 #endif 00040 00041 #include <opal/buildopts.h> 00042 00043 #if OPAL_H323 00044 00045 #include <rtp/rtp.h> 00046 00047 00048 class H225_RTPSession; 00049 00050 class H245_TransportAddress; 00051 class H245_H2250LogicalChannelParameters; 00052 class H245_H2250LogicalChannelAckParameters; 00053 00054 class H323Connection; 00055 class H323_RTPChannel; 00056 00057 00059 00062 class H323_RTP_Session : public RTP_UserData 00063 { 00064 PCLASSINFO(H323_RTP_Session, RTP_UserData); 00065 00074 virtual void OnTxStatistics( 00075 const RTP_Session & session 00076 ) const; 00077 00084 virtual void OnRxStatistics( 00085 const RTP_Session & session 00086 ) const; 00088 00093 virtual PBoolean OnSendingPDU( 00094 const H323_RTPChannel & channel, 00095 H245_H2250LogicalChannelParameters & param 00096 ) const = 0; 00097 00101 virtual void OnSendingAckPDU( 00102 const H323_RTPChannel & channel, 00103 H245_H2250LogicalChannelAckParameters & param 00104 ) const = 0; 00105 00110 virtual PBoolean OnReceivedPDU( 00111 H323_RTPChannel & channel, 00112 const H245_H2250LogicalChannelParameters & param, 00113 unsigned & errorCode 00114 ) = 0; 00115 00120 virtual PBoolean OnReceivedAckPDU( 00121 H323_RTPChannel & channel, 00122 const H245_H2250LogicalChannelAckParameters & param 00123 ) = 0; 00124 00131 virtual void OnSendRasInfo( 00132 H225_RTPSession & info 00133 ) = 0; 00135 00136 00137 protected: 00142 H323_RTP_Session( 00143 const H323Connection & connection 00144 ); 00146 00147 const H323Connection & connection; 00148 }; 00149 00150 00153 class H323_RTP_UDP : public H323_RTP_Session 00154 { 00155 PCLASSINFO(H323_RTP_UDP, H323_RTP_Session); 00156 00157 public: 00162 H323_RTP_UDP( 00163 const H323Connection & connection, 00164 RTP_UDP & rtp 00165 ); 00167 00172 virtual PBoolean OnSendingPDU( 00173 const H323_RTPChannel & channel, 00174 H245_H2250LogicalChannelParameters & param 00175 ) const; 00176 00180 virtual void OnSendingAckPDU( 00181 const H323_RTPChannel & channel, 00182 H245_H2250LogicalChannelAckParameters & param 00183 ) const; 00184 00191 virtual PBoolean OnReceivedPDU( 00192 H323_RTPChannel & channel, 00193 const H245_H2250LogicalChannelParameters & param, 00194 unsigned & errorCode 00195 ); 00196 00203 virtual PBoolean OnReceivedAckPDU( 00204 H323_RTPChannel & channel, 00205 const H245_H2250LogicalChannelAckParameters & param 00206 ); 00207 00214 virtual void OnSendRasInfo( 00215 H225_RTPSession & info 00216 ); 00218 00219 protected: 00220 virtual PBoolean ExtractTransport( 00221 const H245_TransportAddress & pdu, 00222 PBoolean isDataPort, 00223 unsigned & errorCode 00224 ); 00225 00226 RTP_UDP & rtp; 00227 }; 00228 00229 00230 #endif // OPAL_H323 00231 00232 #endif // OPAL_H323_H323RTP_H 00233 00234