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: 21004 $
00030  * $Author: rjongbloed $
00031  * $Date: 2008-09-16 07:08:56 +0000 (Tue, 16 Sep 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 #include <opal/buildopts.h>
00042 
00043 #include <rtp/rtp.h>
00044 
00045 
00046 class H225_RTPSession;
00047 
00048 class H245_TransportAddress;
00049 class H245_H2250LogicalChannelParameters;
00050 class H245_H2250LogicalChannelAckParameters;
00051 
00052 class H323Connection;
00053 class H323_RTPChannel;
00054 
00055 
00057 
00060 class H323_RTP_Session : public RTP_UserData
00061 {
00062   PCLASSINFO(H323_RTP_Session, RTP_UserData);
00063 
00072     virtual void OnTxStatistics(
00073       const RTP_Session & session   
00074     ) const;
00075 
00082     virtual void OnRxStatistics(
00083       const RTP_Session & session   
00084     ) const;
00086 
00091     virtual PBoolean OnSendingPDU(
00092       const H323_RTPChannel & channel,            
00093       H245_H2250LogicalChannelParameters & param  
00094     ) const = 0;
00095 
00099     virtual void OnSendingAckPDU(
00100       const H323_RTPChannel & channel,              
00101       H245_H2250LogicalChannelAckParameters & param 
00102     ) const = 0;
00103 
00108     virtual PBoolean OnReceivedPDU(
00109       H323_RTPChannel & channel,                  
00110       const H245_H2250LogicalChannelParameters & param, 
00111       unsigned & errorCode                              
00112     ) = 0;
00113 
00118     virtual PBoolean OnReceivedAckPDU(
00119       H323_RTPChannel & channel,                  
00120       const H245_H2250LogicalChannelAckParameters & param 
00121     ) = 0;
00122 
00129     virtual void OnSendRasInfo(
00130       H225_RTPSession & info  
00131     ) = 0;
00133 
00134 
00135   protected:
00140     H323_RTP_Session(
00141       const H323Connection & connection  
00142     );
00144 
00145     const H323Connection & connection; 
00146 };
00147 
00148 
00151 class H323_RTP_UDP : public H323_RTP_Session
00152 {
00153   PCLASSINFO(H323_RTP_UDP, H323_RTP_Session);
00154 
00155   public:
00160     H323_RTP_UDP(
00161       const H323Connection & connection, 
00162       RTP_UDP & rtp                      
00163     );
00165 
00170     virtual PBoolean OnSendingPDU(
00171       const H323_RTPChannel & channel,            
00172       H245_H2250LogicalChannelParameters & param  
00173     ) const;
00174 
00178     virtual void OnSendingAckPDU(
00179       const H323_RTPChannel & channel,              
00180       H245_H2250LogicalChannelAckParameters & param 
00181     ) const;
00182 
00189     virtual PBoolean OnReceivedPDU(
00190       H323_RTPChannel & channel,                  
00191       const H245_H2250LogicalChannelParameters & param, 
00192       unsigned & errorCode                              
00193     );
00194 
00201     virtual PBoolean OnReceivedAckPDU(
00202       H323_RTPChannel & channel,                  
00203       const H245_H2250LogicalChannelAckParameters & param 
00204     );
00205 
00212     virtual void OnSendRasInfo(
00213       H225_RTPSession & info  
00214     );
00216 
00217   protected:
00218     virtual PBoolean ExtractTransport(
00219       const H245_TransportAddress & pdu,
00220       PBoolean isDataPort,
00221       unsigned & errorCode
00222     );
00223 
00224     RTP_UDP & rtp;
00225 };
00226 
00227 
00228 #endif // __OPAL_H323RTP_H
00229 
00230 

Generated on Mon Sep 22 12:24:44 2008 for OPAL by  doxygen 1.5.1