D:/Storage/CVS_Head/h323plus/include/h323t38.h

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.1  2007/08/06 20:50:49  shorne
00028  * First commit of h323plus
00029  *
00030  * Revision 1.15  2005/11/30 13:05:01  csoutheren
00031  * Changed tags for Doxygen
00032  *
00033  * Revision 1.14  2002/09/16 01:14:15  robertj
00034  * Added #define so can select if #pragma interface/implementation is used on
00035  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00036  *
00037  * Revision 1.13  2002/09/03 06:19:37  robertj
00038  * Normalised the multi-include header prevention ifdef/define symbol.
00039  *
00040  * Revision 1.12  2002/08/05 10:03:47  robertj
00041  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00042  *
00043  * Revision 1.11  2002/05/15 23:30:01  robertj
00044  * Backed out delete of t38 handler, causes race conditions.
00045  *
00046  * Revision 1.10  2002/05/15 01:30:49  robertj
00047  * Added missing delete of t38 handler, thanks thsuk@digitalsis.com.
00048  * Changed to allow the T.35 information to be adjusted so it will work for
00049  *    various vendors version of the non-standard capability.
00050  *
00051  * Revision 1.9  2002/05/10 05:49:22  robertj
00052  * Added the max bit rate field to the data channel capability class.
00053  * Added session ID to the data logical channel class.
00054  * Added capability for old pre-v3 non-standard T.38.
00055  *
00056  * Revision 1.8  2002/01/09 00:21:36  robertj
00057  * Changes to support outgoing H.245 RequstModeChange.
00058  *
00059  * Revision 1.7  2002/01/01 23:27:50  craigs
00060  * Added CleanupOnTermination functions
00061  * Thanks to Vyacheslav Frolov
00062  *
00063  * Revision 1.6  2001/12/22 01:55:20  robertj
00064  * Removed vast quatities of redundent code that is done by ancestor class.
00065  *
00066  * Revision 1.5  2001/12/14 08:36:36  robertj
00067  * More implementation of T.38, thanks Adam Lazur
00068  *
00069  * Revision 1.4  2001/11/20 03:04:30  robertj
00070  * Added ability to reuse t38 channels with same session ID.
00071  *
00072  * Revision 1.3  2001/11/09 05:39:54  craigs
00073  * Added initial T.38 support thanks to Adam Lazur
00074  *
00075  * Revision 1.2  2001/07/24 02:25:57  robertj
00076  * Added UDP, dual TCP and single TCP modes to T.38 capability.
00077  *
00078  * Revision 1.1  2001/07/17 04:44:29  robertj
00079  * Partial implementation of T.120 and T.38 logical channels.
00080  *
00081  */
00082 
00083 #ifndef __OPAL_H323T38_H
00084 #define __OPAL_H323T38_H
00085 
00086 #ifdef P_USE_PRAGMA
00087 #pragma interface
00088 #endif
00089 
00090 
00091 #include "h323caps.h"
00092 
00093 
00094 class H245_T38FaxProfile;
00095 
00096 class OpalT38Protocol;
00097 
00098 
00100 
00103 class H323_T38Capability : public H323DataCapability
00104 {
00105     PCLASSINFO(H323_T38Capability, H323DataCapability);
00106   public:
00109     enum TransportMode {
00110       e_UDP,
00111       e_DualTCP,
00112       e_SingleTCP,
00113       NumTransportModes
00114     };
00115 
00118     H323_T38Capability(
00119       TransportMode mode
00120     );
00122 
00128     Comparison Compare(const PObject & obj) const;
00129 
00132     virtual PObject * Clone() const;
00134 
00143     virtual unsigned GetSubType() const;
00144 
00147     virtual PString GetFormatName() const;
00149 
00154     virtual H323Channel * CreateChannel(
00155       H323Connection & connection,    
00156       H323Channel::Directions dir,    
00157       unsigned sessionID,             
00158       const H245_H2250LogicalChannelParameters * param
00160     ) const;
00162 
00173     virtual BOOL OnSendingPDU(
00174       H245_DataApplicationCapability & pdu
00175     ) const;
00176 
00185     virtual BOOL OnSendingPDU(
00186       H245_DataMode & pdu  
00187     ) const;
00188 
00195     virtual BOOL OnSendingPDU(
00196       H245_DataProtocolCapability & proto,  
00197       H245_T38FaxProfile & profile          
00198     ) const;
00199 
00207     virtual BOOL OnReceivedPDU(
00208       const H245_DataApplicationCapability & pdu  
00209     );
00211 
00212     TransportMode GetTransportMode() const { return mode; }
00213 
00214   protected:
00215     TransportMode mode;
00216 };
00217 
00218 
00221 class H323_T38NonStandardCapability : public H323NonStandardDataCapability
00222 {
00223     PCLASSINFO(H323_T38NonStandardCapability, H323NonStandardDataCapability);
00224   public:
00229     H323_T38NonStandardCapability(
00230       BYTE country = 181,            
00231       BYTE extension = 0,            
00232       WORD maufacturer = 18          
00233     );
00235 
00240     virtual PObject * Clone() const;
00242 
00247     virtual PString GetFormatName() const;
00249 
00254     virtual H323Channel * CreateChannel(
00255       H323Connection & connection,    
00256       H323Channel::Directions dir,    
00257       unsigned sessionID,             
00258       const H245_H2250LogicalChannelParameters * param
00260     ) const;
00262 };
00263 
00264 
00267 class H323_T38Channel : public H323DataChannel
00268 {
00269     PCLASSINFO(H323_T38Channel, H323DataChannel);
00270   public:
00275     H323_T38Channel(
00276       H323Connection & connection,       
00277       const H323Capability & capability, 
00278       Directions direction,              
00279       unsigned sessionID,                
00280       H323_T38Capability::TransportMode mode
00281     );
00282     ~H323_T38Channel();
00284 
00289     virtual BOOL OnSendingPDU(
00290       H245_OpenLogicalChannel & openPDU  
00291     ) const;
00292 
00300     virtual BOOL OnReceivedPDU(
00301       const H245_OpenLogicalChannel & pdu,    
00302       unsigned & errorCode                    
00303     );
00304 
00307     virtual void CleanUpOnTermination();
00308 
00315     virtual void Receive();
00316 
00323     virtual void Transmit();
00324 
00331     virtual BOOL CreateListener();
00332 
00340     virtual BOOL CreateTransport();
00342 
00343     OpalT38Protocol * GetHandler() const { return t38handler; }
00344 
00345   protected:
00346     BOOL              usesTCP;
00347     OpalT38Protocol * t38handler;
00348 };
00349 
00350 
00351 #endif // __OPAL_H323T38_H
00352 
00353 

Generated on Thu Oct 25 13:42:27 2007 for h323plus by  doxygen 1.5.2