h323t38.h

Go to the documentation of this file.
00001 /*
00002  * h323t38.h
00003  *
00004  * H.323 T.38 logical channel establishment
00005  *
00006  * Open H323 Library
00007  *
00008  * Copyright (c) 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  * Contributor(s): ______________________________________.
00025  *
00026  * $Revision: 21283 $
00027  * $Author: rjongbloed $
00028  * $Date: 2008-10-11 07:10:58 +0000 (Sat, 11 Oct 2008) $
00029  */
00030 
00031 #ifndef OPAL_T38_H323T38_H
00032 #define OPAL_T38_H323T38_H
00033 
00034 #ifdef P_USE_PRAGMA
00035 #pragma interface
00036 #endif
00037 
00038 #include <opal/buildopts.h>
00039 
00040 #include <h323/h323caps.h>
00041 
00042 
00043 class H245_T38FaxProfile;
00044 class OpalT38Protocol;
00045 
00046 
00048 
00051 class H323_T38Capability : public H323DataCapability
00052 {
00053     PCLASSINFO(H323_T38Capability, H323DataCapability);
00054   public:
00057     enum TransportMode {
00058       e_UDP,
00059       e_DualTCP,
00060       e_SingleTCP,
00061       NumTransportModes
00062     };
00063 
00066     H323_T38Capability(
00067       TransportMode mode
00068     );
00070 
00076     Comparison Compare(const PObject & obj) const;
00077 
00080     virtual PObject * Clone() const;
00082 
00091     virtual unsigned GetSubType() const;
00092 
00095     virtual PString GetFormatName() const;
00097 
00102     virtual H323Channel * CreateChannel(
00103       H323Connection & connection,    
00104       H323Channel::Directions dir,    
00105       unsigned sessionID,             
00106       const H245_H2250LogicalChannelParameters * param
00108     ) const;
00110 
00121     virtual PBoolean OnSendingPDU(
00122       H245_DataApplicationCapability & pdu
00123     ) const;
00124 
00133     virtual PBoolean OnSendingPDU(
00134       H245_DataMode & pdu  
00135     ) const;
00136 
00143     virtual PBoolean OnSendingPDU(
00144       H245_DataProtocolCapability & proto,  
00145       H245_T38FaxProfile & profile          
00146     ) const;
00147 
00155     virtual PBoolean OnReceivedPDU(
00156       const H245_DataApplicationCapability & pdu  
00157     );
00159 
00160     TransportMode GetTransportMode() const { return mode; }
00161 
00162   protected:
00163     TransportMode mode;
00164 };
00165 
00166 
00169 class H323_T38NonStandardCapability : public H323NonStandardDataCapability
00170 {
00171     PCLASSINFO(H323_T38NonStandardCapability, H323NonStandardDataCapability);
00172   public:
00177     H323_T38NonStandardCapability(
00178       BYTE country = 181,            
00179       BYTE extension = 0,            
00180       WORD maufacturer = 18          
00181     );
00183 
00188     virtual PObject * Clone() const;
00190 
00195     virtual PString GetFormatName() const;
00197 
00202     virtual H323Channel * CreateChannel(
00203       H323Connection & connection,    
00204       H323Channel::Directions dir,    
00205       unsigned sessionID,             
00206       const H245_H2250LogicalChannelParameters * param
00208     ) const;
00210 };
00211 
00212 
00215 class H323_T38Channel : public H323DataChannel
00216 {
00217     PCLASSINFO(H323_T38Channel, H323DataChannel);
00218   public:
00223     H323_T38Channel(
00224       H323Connection & connection,       
00225       const H323Capability & capability, 
00226       Directions direction,              
00227       unsigned sessionID,                
00228       H323_T38Capability::TransportMode mode
00229     );
00230     ~H323_T38Channel();
00232 
00237     virtual PBoolean OnSendingPDU(
00238       H245_OpenLogicalChannel & openPDU  
00239     ) const;
00240 
00248     virtual PBoolean OnReceivedPDU(
00249       const H245_OpenLogicalChannel & pdu,    
00250       unsigned & errorCode                    
00251     );
00252 
00255     virtual void Close();
00256 
00263     virtual void Receive();
00264 
00271     virtual void Transmit();
00272 
00279     virtual PBoolean CreateListener();
00280 
00288     virtual PBoolean CreateTransport();
00290 
00291     OpalT38Protocol * GetHandler() const { return t38handler; }
00292 
00293   protected:
00294     PBoolean              usesTCP;
00295     OpalT38Protocol * t38handler;
00296 };
00297 
00298 
00299 #endif // OPAL_T38_H323T38_H
00300 
00301 

Generated on Mon Feb 23 02:01:30 2009 for OPAL by  doxygen 1.5.1