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 2.7  2005/11/30 13:35:27  csoutheren
00028  * Changed tags for Doxygen
00029  *
00030  * Revision 2.6  2002/11/10 11:33:17  robertj
00031  * Updated to OpenH323 v1.10.3
00032  *
00033  * Revision 2.5  2002/09/16 02:52:35  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 2.4  2002/09/04 06:01:47  robertj
00038  * Updated to OpenH323 v1.9.6
00039  *
00040  * Revision 2.3  2002/07/01 04:56:31  robertj
00041  * Updated to OpenH323 v1.9.1
00042  *
00043  * Revision 2.2  2002/01/14 06:35:57  robertj
00044  * Updated to OpenH323 v1.7.9
00045  *
00046  * Revision 2.1  2001/08/01 05:08:04  robertj
00047  * Major changes to H.323 capabilities, uses OpalMediaFormat for base name.
00048  *
00049  * Revision 2.0  2001/07/27 15:48:24  robertj
00050  * Conversion of OpenH323 to Open Phone Abstraction Library (OPAL)
00051  *
00052  * Revision 1.14  2002/09/16 01:14:15  robertj
00053  * Added #define so can select if #pragma interface/implementation is used on
00054  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00055  *
00056  * Revision 1.13  2002/09/03 06:19:37  robertj
00057  * Normalised the multi-include header prevention ifdef/define symbol.
00058  *
00059  * Revision 1.12  2002/08/05 10:03:47  robertj
00060  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00061  *
00062  * Revision 1.11  2002/05/15 23:30:01  robertj
00063  * Backed out delete of t38 handler, causes race conditions.
00064  *
00065  * Revision 1.10  2002/05/15 01:30:49  robertj
00066  * Added missing delete of t38 handler, thanks thsuk@digitalsis.com.
00067  * Changed to allow the T.35 information to be adjusted so it will work for
00068  *    various vendors version of the non-standard capability.
00069  *
00070  * Revision 1.9  2002/05/10 05:49:22  robertj
00071  * Added the max bit rate field to the data channel capability class.
00072  * Added session ID to the data logical channel class.
00073  * Added capability for old pre-v3 non-standard T.38.
00074  *
00075  * Revision 1.8  2002/01/09 00:21:36  robertj
00076  * Changes to support outgoing H.245 RequstModeChange.
00077  *
00078  * Revision 1.7  2002/01/01 23:27:50  craigs
00079  * Added CleanupOnTermination functions
00080  * Thanks to Vyacheslav Frolov
00081  *
00082  * Revision 1.6  2001/12/22 01:55:20  robertj
00083  * Removed vast quatities of redundent code that is done by ancestor class.
00084  *
00085  * Revision 1.5  2001/12/14 08:36:36  robertj
00086  * More implementation of T.38, thanks Adam Lazur
00087  *
00088  * Revision 1.4  2001/11/20 03:04:30  robertj
00089  * Added ability to reuse t38 channels with same session ID.
00090  *
00091  * Revision 1.3  2001/11/09 05:39:54  craigs
00092  * Added initial T.38 support thanks to Adam Lazur
00093  *
00094  * Revision 1.2  2001/07/24 02:25:57  robertj
00095  * Added UDP, dual TCP and single TCP modes to T.38 capability.
00096  *
00097  * Revision 1.1  2001/07/17 04:44:29  robertj
00098  * Partial implementation of T.120 and T.38 logical channels.
00099  *
00100  */
00101 
00102 #ifndef __OPAL_H323T38_H
00103 #define __OPAL_H323T38_H
00104 
00105 #ifdef P_USE_PRAGMA
00106 #pragma interface
00107 #endif
00108 
00109 
00110 #include <h323/h323caps.h>
00111 
00112 
00113 class H245_T38FaxProfile;
00114 class OpalT38Protocol;
00115 
00116 
00118 
00121 class H323_T38Capability : public H323DataCapability
00122 {
00123     PCLASSINFO(H323_T38Capability, H323DataCapability);
00124   public:
00127     enum TransportMode {
00128       e_UDP,
00129       e_DualTCP,
00130       e_SingleTCP,
00131       NumTransportModes
00132     };
00133 
00136     H323_T38Capability(
00137       TransportMode mode
00138     );
00140 
00146     Comparison Compare(const PObject & obj) const;
00147 
00150     virtual PObject * Clone() const;
00152 
00161     virtual unsigned GetSubType() const;
00162 
00165     virtual PString GetFormatName() const;
00167 
00172     virtual H323Channel * CreateChannel(
00173       H323Connection & connection,    
00174       H323Channel::Directions dir,    
00175       unsigned sessionID,             
00176       const H245_H2250LogicalChannelParameters * param
00178     ) const;
00180 
00191     virtual BOOL OnSendingPDU(
00192       H245_DataApplicationCapability & pdu
00193     ) const;
00194 
00203     virtual BOOL OnSendingPDU(
00204       H245_DataMode & pdu  
00205     ) const;
00206 
00213     virtual BOOL OnSendingPDU(
00214       H245_DataProtocolCapability & proto,  
00215       H245_T38FaxProfile & profile          
00216     ) const;
00217 
00225     virtual BOOL OnReceivedPDU(
00226       const H245_DataApplicationCapability & pdu  
00227     );
00229 
00230     TransportMode GetTransportMode() const { return mode; }
00231 
00232   protected:
00233     TransportMode mode;
00234 };
00235 
00236 
00239 class H323_T38NonStandardCapability : public H323NonStandardDataCapability
00240 {
00241     PCLASSINFO(H323_T38NonStandardCapability, H323NonStandardDataCapability);
00242   public:
00247     H323_T38NonStandardCapability(
00248       BYTE country = 181,            
00249       BYTE extension = 0,            
00250       WORD maufacturer = 18          
00251     );
00253 
00258     virtual PObject * Clone() const;
00260 
00265     virtual PString GetFormatName() const;
00267 
00272     virtual H323Channel * CreateChannel(
00273       H323Connection & connection,    
00274       H323Channel::Directions dir,    
00275       unsigned sessionID,             
00276       const H245_H2250LogicalChannelParameters * param
00278     ) const;
00280 };
00281 
00282 
00285 class H323_T38Channel : public H323DataChannel
00286 {
00287     PCLASSINFO(H323_T38Channel, H323DataChannel);
00288   public:
00293     H323_T38Channel(
00294       H323Connection & connection,       
00295       const H323Capability & capability, 
00296       Directions direction,              
00297       unsigned sessionID,                
00298       H323_T38Capability::TransportMode mode
00299     );
00300     ~H323_T38Channel();
00302 
00307     virtual BOOL OnSendingPDU(
00308       H245_OpenLogicalChannel & openPDU  
00309     ) const;
00310 
00318     virtual BOOL OnReceivedPDU(
00319       const H245_OpenLogicalChannel & pdu,    
00320       unsigned & errorCode                    
00321     );
00322 
00325     virtual void Close();
00326 
00333     virtual void Receive();
00334 
00341     virtual void Transmit();
00342 
00349     virtual BOOL CreateListener();
00350 
00358     virtual BOOL CreateTransport();
00360 
00361     OpalT38Protocol * GetHandler() const { return t38handler; }
00362 
00363   protected:
00364     BOOL              usesTCP;
00365     OpalT38Protocol * t38handler;
00366 };
00367 
00368 
00369 #endif // __OPAL_H323T38_H
00370 
00371 

Generated on Fri Mar 7 06:33:31 2008 for OPAL by  doxygen 1.5.1