OpenH323 1.18.0
|
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.15 2005/11/30 13:05:01 csoutheren 00028 * Changed tags for Doxygen 00029 * 00030 * Revision 1.14 2002/09/16 01:14:15 robertj 00031 * Added #define so can select if #pragma interface/implementation is used on 00032 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00033 * 00034 * Revision 1.13 2002/09/03 06:19:37 robertj 00035 * Normalised the multi-include header prevention ifdef/define symbol. 00036 * 00037 * Revision 1.12 2002/08/05 10:03:47 robertj 00038 * Cosmetic changes to normalise the usage of pragma interface/implementation. 00039 * 00040 * Revision 1.11 2002/05/15 23:30:01 robertj 00041 * Backed out delete of t38 handler, causes race conditions. 00042 * 00043 * Revision 1.10 2002/05/15 01:30:49 robertj 00044 * Added missing delete of t38 handler, thanks thsuk@digitalsis.com. 00045 * Changed to allow the T.35 information to be adjusted so it will work for 00046 * various vendors version of the non-standard capability. 00047 * 00048 * Revision 1.9 2002/05/10 05:49:22 robertj 00049 * Added the max bit rate field to the data channel capability class. 00050 * Added session ID to the data logical channel class. 00051 * Added capability for old pre-v3 non-standard T.38. 00052 * 00053 * Revision 1.8 2002/01/09 00:21:36 robertj 00054 * Changes to support outgoing H.245 RequstModeChange. 00055 * 00056 * Revision 1.7 2002/01/01 23:27:50 craigs 00057 * Added CleanupOnTermination functions 00058 * Thanks to Vyacheslav Frolov 00059 * 00060 * Revision 1.6 2001/12/22 01:55:20 robertj 00061 * Removed vast quatities of redundent code that is done by ancestor class. 00062 * 00063 * Revision 1.5 2001/12/14 08:36:36 robertj 00064 * More implementation of T.38, thanks Adam Lazur 00065 * 00066 * Revision 1.4 2001/11/20 03:04:30 robertj 00067 * Added ability to reuse t38 channels with same session ID. 00068 * 00069 * Revision 1.3 2001/11/09 05:39:54 craigs 00070 * Added initial T.38 support thanks to Adam Lazur 00071 * 00072 * Revision 1.2 2001/07/24 02:25:57 robertj 00073 * Added UDP, dual TCP and single TCP modes to T.38 capability. 00074 * 00075 * Revision 1.1 2001/07/17 04:44:29 robertj 00076 * Partial implementation of T.120 and T.38 logical channels. 00077 * 00078 */ 00079 00080 #ifndef __OPAL_H323T38_H 00081 #define __OPAL_H323T38_H 00082 00083 #ifdef P_USE_PRAGMA 00084 #pragma interface 00085 #endif 00086 00087 00088 #include "h323caps.h" 00089 00090 00091 class H245_T38FaxProfile; 00092 00093 class OpalT38Protocol; 00094 00095 00097 00100 class H323_T38Capability : public H323DataCapability 00101 { 00102 PCLASSINFO(H323_T38Capability, H323DataCapability); 00103 public: 00106 enum TransportMode { 00107 e_UDP, 00108 e_DualTCP, 00109 e_SingleTCP, 00110 NumTransportModes 00111 }; 00112 00115 H323_T38Capability( 00116 TransportMode mode 00117 ); 00119 00125 Comparison Compare(const PObject & obj) const; 00126 00129 virtual PObject * Clone() const; 00131 00140 virtual unsigned GetSubType() const; 00141 00144 virtual PString GetFormatName() const; 00146 00151 virtual H323Channel * CreateChannel( 00152 H323Connection & connection, 00153 H323Channel::Directions dir, 00154 unsigned sessionID, 00155 const H245_H2250LogicalChannelParameters * param 00157 ) const; 00159 00170 virtual BOOL OnSendingPDU( 00171 H245_DataApplicationCapability & pdu 00172 ) const; 00173 00182 virtual BOOL OnSendingPDU( 00183 H245_DataMode & pdu 00184 ) const; 00185 00192 virtual BOOL OnSendingPDU( 00193 H245_DataProtocolCapability & proto, 00194 H245_T38FaxProfile & profile 00195 ) const; 00196 00204 virtual BOOL OnReceivedPDU( 00205 const H245_DataApplicationCapability & pdu 00206 ); 00208 00209 TransportMode GetTransportMode() const { return mode; } 00210 00211 protected: 00212 TransportMode mode; 00213 }; 00214 00215 00218 class H323_T38NonStandardCapability : public H323NonStandardDataCapability 00219 { 00220 PCLASSINFO(H323_T38NonStandardCapability, H323NonStandardDataCapability); 00221 public: 00226 H323_T38NonStandardCapability( 00227 BYTE country = 181, 00228 BYTE extension = 0, 00229 WORD maufacturer = 18 00230 ); 00232 00237 virtual PObject * Clone() const; 00239 00244 virtual PString GetFormatName() const; 00246 00251 virtual H323Channel * CreateChannel( 00252 H323Connection & connection, 00253 H323Channel::Directions dir, 00254 unsigned sessionID, 00255 const H245_H2250LogicalChannelParameters * param 00257 ) const; 00259 }; 00260 00261 00264 class H323_T38Channel : public H323DataChannel 00265 { 00266 PCLASSINFO(H323_T38Channel, H323DataChannel); 00267 public: 00272 H323_T38Channel( 00273 H323Connection & connection, 00274 const H323Capability & capability, 00275 Directions direction, 00276 unsigned sessionID, 00277 H323_T38Capability::TransportMode mode 00278 ); 00279 ~H323_T38Channel(); 00281 00286 virtual BOOL OnSendingPDU( 00287 H245_OpenLogicalChannel & openPDU 00288 ) const; 00289 00297 virtual BOOL OnReceivedPDU( 00298 const H245_OpenLogicalChannel & pdu, 00299 unsigned & errorCode 00300 ); 00301 00304 virtual void CleanUpOnTermination(); 00305 00312 virtual void Receive(); 00313 00320 virtual void Transmit(); 00321 00328 virtual BOOL CreateListener(); 00329 00337 virtual BOOL CreateTransport(); 00339 00340 OpalT38Protocol * GetHandler() const { return t38handler; } 00341 00342 protected: 00343 BOOL usesTCP; 00344 OpalT38Protocol * t38handler; 00345 }; 00346 00347 00348 #endif // __OPAL_H323T38_H 00349 00350