h323rtp.h

Go to the documentation of this file.
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: 19279 $
00030  * $Author: rjongbloed $
00031  * $Date: 2008-01-17 04:08:34 +0000 (Thu, 17 Jan 2008) $
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 

Generated on Mon Sep 15 11:49:05 2008 for OPAL by  doxygen 1.5.1