Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

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  * $Log: h323t38.h,v $
00027  * Revision 1.14  2002/09/16 01:14:15  robertj
00028  * Added #define so can select if #pragma interface/implementation is used on
00029  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00030  *
00031  * Revision 1.13  2002/09/03 06:19:37  robertj
00032  * Normalised the multi-include header prevention ifdef/define symbol.
00033  *
00034  * Revision 1.12  2002/08/05 10:03:47  robertj
00035  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00036  *
00037  * Revision 1.11  2002/05/15 23:30:01  robertj
00038  * Backed out delete of t38 handler, causes race conditions.
00039  *
00040  * Revision 1.10  2002/05/15 01:30:49  robertj
00041  * Added missing delete of t38 handler, thanks thsuk@digitalsis.com.
00042  * Changed to allow the T.35 information to be adjusted so it will work for
00043  *    various vendors version of the non-standard capability.
00044  *
00045  * Revision 1.9  2002/05/10 05:49:22  robertj
00046  * Added the max bit rate field to the data channel capability class.
00047  * Added session ID to the data logical channel class.
00048  * Added capability for old pre-v3 non-standard T.38.
00049  *
00050  * Revision 1.8  2002/01/09 00:21:36  robertj
00051  * Changes to support outgoing H.245 RequstModeChange.
00052  *
00053  * Revision 1.7  2002/01/01 23:27:50  craigs
00054  * Added CleanupOnTermination functions
00055  * Thanks to Vyacheslav Frolov
00056  *
00057  * Revision 1.6  2001/12/22 01:55:20  robertj
00058  * Removed vast quatities of redundent code that is done by ancestor class.
00059  *
00060  * Revision 1.5  2001/12/14 08:36:36  robertj
00061  * More implementation of T.38, thanks Adam Lazur
00062  *
00063  * Revision 1.4  2001/11/20 03:04:30  robertj
00064  * Added ability to reuse t38 channels with same session ID.
00065  *
00066  * Revision 1.3  2001/11/09 05:39:54  craigs
00067  * Added initial T.38 support thanks to Adam Lazur
00068  *
00069  * Revision 1.2  2001/07/24 02:25:57  robertj
00070  * Added UDP, dual TCP and single TCP modes to T.38 capability.
00071  *
00072  * Revision 1.1  2001/07/17 04:44:29  robertj
00073  * Partial implementation of T.120 and T.38 logical channels.
00074  *
00075  */
00076 
00077 #ifndef __OPAL_H323T38_H
00078 #define __OPAL_H323T38_H
00079 
00080 #ifdef P_USE_PRAGMA
00081 #pragma interface
00082 #endif
00083 
00084 
00085 #include "h323caps.h"
00086 
00087 
00088 class H245_T38FaxProfile;
00089 
00090 class OpalT38Protocol;
00091 
00092 
00094 
00097 class H323_T38Capability : public H323DataCapability
00098 {
00099     PCLASSINFO(H323_T38Capability, H323DataCapability);
00100   public:
00103     enum TransportMode {
00104       e_UDP,
00105       e_DualTCP,
00106       e_SingleTCP,
00107       NumTransportModes
00108     };
00109 
00112     H323_T38Capability(
00113       TransportMode mode
00114     );
00116 
00122     Comparison Compare(const PObject & obj) const;
00123 
00126     virtual PObject * Clone() const;
00128 
00137     virtual unsigned GetSubType() const;
00138 
00141     virtual PString GetFormatName() const;
00143 
00148     virtual H323Channel * CreateChannel(
00149       H323Connection & connection,    
00150       H323Channel::Directions dir,    
00151       unsigned sessionID,             
00152       const H245_H2250LogicalChannelParameters * param
00154     ) const;
00156 
00167     virtual BOOL OnSendingPDU(
00168       H245_DataApplicationCapability & pdu
00169     ) const;
00170 
00179     virtual BOOL OnSendingPDU(
00180       H245_DataMode & pdu  
00181     ) const;
00182 
00189     virtual BOOL OnSendingPDU(
00190       H245_DataProtocolCapability & proto,  
00191       H245_T38FaxProfile & profile          
00192     ) const;
00193 
00201     virtual BOOL OnReceivedPDU(
00202       const H245_DataApplicationCapability & pdu  
00203     );
00205 
00206     TransportMode GetTransportMode() const { return mode; }
00207 
00208   protected:
00209     TransportMode mode;
00210 };
00211 
00212 
00215 class H323_T38NonStandardCapability : public H323NonStandardDataCapability
00216 {
00217     PCLASSINFO(H323_T38NonStandardCapability, H323NonStandardDataCapability);
00218   public:
00223     H323_T38NonStandardCapability(
00224       BYTE country = 181,            
00225       BYTE extension = 0,            
00226       WORD maufacturer = 18          
00227     );
00229 
00234     virtual PObject * Clone() const;
00236 
00241     virtual PString GetFormatName() const;
00243 
00248     virtual H323Channel * CreateChannel(
00249       H323Connection & connection,    
00250       H323Channel::Directions dir,    
00251       unsigned sessionID,             
00252       const H245_H2250LogicalChannelParameters * param
00254     ) const;
00256 };
00257 
00258 
00261 class H323_T38Channel : public H323DataChannel
00262 {
00263     PCLASSINFO(H323_T38Channel, H323DataChannel);
00264   public:
00269     H323_T38Channel(
00270       H323Connection & connection,       
00271       const H323Capability & capability, 
00272       Directions direction,              
00273       unsigned sessionID,                
00274       H323_T38Capability::TransportMode mode
00275     );
00276     ~H323_T38Channel();
00278 
00283     virtual BOOL OnSendingPDU(
00284       H245_OpenLogicalChannel & openPDU  
00285     ) const;
00286 
00294     virtual BOOL OnReceivedPDU(
00295       const H245_OpenLogicalChannel & pdu,    
00296       unsigned & errorCode                    
00297     );
00298 
00301     virtual void CleanUpOnTermination();
00302 
00309     virtual void Receive();
00310 
00317     virtual void Transmit();
00318 
00325     virtual BOOL CreateListener();
00326 
00334     virtual BOOL CreateTransport();
00336 
00337     OpalT38Protocol * GetHandler() const { return t38handler; }
00338 
00339   protected:
00340     BOOL              usesTCP;
00341     OpalT38Protocol * t38handler;
00342 };
00343 
00344 
00345 #endif // __OPAL_H323T38_H
00346 
00347 

Generated on Tue Mar 15 11:17:02 2005 for OpenH323 by  doxygen 1.4.0