00001 /* 00002 * t38proto.h 00003 * 00004 * T.38 protocol handler 00005 * 00006 * Open Phone Abstraction 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: t38proto.h,v $ 00027 * Revision 1.1 2007/08/06 20:50:50 shorne 00028 * First commit of h323plus 00029 * 00030 * Revision 1.9 2002/12/02 04:07:58 robertj 00031 * Turned T.38 Originate inside out, so now has WriteXXX() functions that can 00032 * be call ed in different thread contexts. 00033 * 00034 * Revision 1.8 2002/12/02 00:37:15 robertj 00035 * More implementation of T38 base library code, some taken from the t38modem 00036 * application by Vyacheslav Frolov, eg redundent frames. 00037 * 00038 * Revision 1.7 2002/09/16 01:14:15 robertj 00039 * Added #define so can select if #pragma interface/implementation is used on 00040 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00041 * 00042 * Revision 1.6 2002/09/03 06:19:37 robertj 00043 * Normalised the multi-include header prevention ifdef/define symbol. 00044 * 00045 * Revision 1.5 2002/02/09 04:39:01 robertj 00046 * Changes to allow T.38 logical channels to use single transport which is 00047 * now owned by the OpalT38Protocol object instead of H323Channel. 00048 * 00049 * Revision 1.4 2002/01/01 23:27:50 craigs 00050 * Added CleanupOnTermination functions 00051 * Thanks to Vyacheslav Frolov 00052 * 00053 * Revision 1.3 2001/12/22 01:57:04 robertj 00054 * Cleaned up code and allowed for repeated sequence numbers. 00055 * 00056 * Revision 1.2 2001/11/09 05:39:54 craigs 00057 * Added initial T.38 support thanks to Adam Lazur 00058 * 00059 * Revision 1.1 2001/07/17 04:44:29 robertj 00060 * Partial implementation of T.120 and T.38 logical channels. 00061 * 00062 */ 00063 00064 #ifndef __OPAL_T38PROTO_H 00065 #define __OPAL_T38PROTO_H 00066 00067 #ifdef P_USE_PRAGMA 00068 #pragma interface 00069 #endif 00070 00071 00072 class H323Transport; 00073 class T38_IFPPacket; 00074 class PASN_OctetString; 00075 00076 00078 00081 class OpalT38Protocol : public PObject 00082 { 00083 PCLASSINFO(OpalT38Protocol, PObject); 00084 public: 00089 OpalT38Protocol(); 00090 00093 ~OpalT38Protocol(); 00095 00100 virtual void CleanUpOnTermination(); 00101 00106 virtual BOOL Originate(); 00107 00110 virtual BOOL WritePacket( 00111 const T38_IFPPacket & pdu 00112 ); 00113 00116 virtual BOOL WriteIndicator( 00117 unsigned indicator 00118 ); 00119 00122 virtual BOOL WriteMultipleData( 00123 unsigned mode, 00124 PINDEX count, 00125 unsigned * type, 00126 const PBYTEArray * data 00127 ); 00128 00131 virtual BOOL WriteData( 00132 unsigned mode, 00133 unsigned type, 00134 const PBYTEArray & data 00135 ); 00136 00139 virtual BOOL Answer(); 00140 00145 virtual BOOL HandlePacket( 00146 const T38_IFPPacket & pdu 00147 ); 00148 00153 virtual BOOL HandlePacketLost( 00154 unsigned nLost 00155 ); 00156 00160 virtual BOOL OnIndicator( 00161 unsigned indicator 00162 ); 00163 00167 virtual BOOL OnCNG(); 00168 00172 virtual BOOL OnCED(); 00173 00177 virtual BOOL OnPreamble(); 00178 00182 virtual BOOL OnTraining( 00183 unsigned indicator 00184 ); 00185 00190 virtual BOOL OnData( 00191 unsigned mode, 00192 unsigned type, 00193 const PBYTEArray & data 00194 ); 00196 00197 H323Transport * GetTransport() const { return transport; } 00198 void SetTransport( 00199 H323Transport * transport, 00200 BOOL autoDelete = TRUE 00201 ); 00202 00203 protected: 00204 BOOL HandleRawIFP( 00205 const PASN_OctetString & pdu 00206 ); 00207 00208 H323Transport * transport; 00209 BOOL autoDeleteTransport; 00210 00211 BOOL corrigendumASN; 00212 unsigned indicatorRedundancy; 00213 unsigned lowSpeedRedundancy; 00214 unsigned highSpeedRedundancy; 00215 00216 int lastSentSequenceNumber; 00217 PList<PBYTEArray> redundantIFPs; 00218 }; 00219 00220 00221 #endif // __OPAL_T38PROTO_H 00222 00223
1.5.2