OpenH323 1.18.0
|
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.9 2002/12/02 04:07:58 robertj 00028 * Turned T.38 Originate inside out, so now has WriteXXX() functions that can 00029 * be call ed in different thread contexts. 00030 * 00031 * Revision 1.8 2002/12/02 00:37:15 robertj 00032 * More implementation of T38 base library code, some taken from the t38modem 00033 * application by Vyacheslav Frolov, eg redundent frames. 00034 * 00035 * Revision 1.7 2002/09/16 01:14:15 robertj 00036 * Added #define so can select if #pragma interface/implementation is used on 00037 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00038 * 00039 * Revision 1.6 2002/09/03 06:19:37 robertj 00040 * Normalised the multi-include header prevention ifdef/define symbol. 00041 * 00042 * Revision 1.5 2002/02/09 04:39:01 robertj 00043 * Changes to allow T.38 logical channels to use single transport which is 00044 * now owned by the OpalT38Protocol object instead of H323Channel. 00045 * 00046 * Revision 1.4 2002/01/01 23:27:50 craigs 00047 * Added CleanupOnTermination functions 00048 * Thanks to Vyacheslav Frolov 00049 * 00050 * Revision 1.3 2001/12/22 01:57:04 robertj 00051 * Cleaned up code and allowed for repeated sequence numbers. 00052 * 00053 * Revision 1.2 2001/11/09 05:39:54 craigs 00054 * Added initial T.38 support thanks to Adam Lazur 00055 * 00056 * Revision 1.1 2001/07/17 04:44:29 robertj 00057 * Partial implementation of T.120 and T.38 logical channels. 00058 * 00059 */ 00060 00061 #ifndef __OPAL_T38PROTO_H 00062 #define __OPAL_T38PROTO_H 00063 00064 #ifdef P_USE_PRAGMA 00065 #pragma interface 00066 #endif 00067 00068 00069 class H323Transport; 00070 class T38_IFPPacket; 00071 class PASN_OctetString; 00072 00073 00075 00078 class OpalT38Protocol : public PObject 00079 { 00080 PCLASSINFO(OpalT38Protocol, PObject); 00081 public: 00086 OpalT38Protocol(); 00087 00090 ~OpalT38Protocol(); 00092 00097 virtual void CleanUpOnTermination(); 00098 00103 virtual BOOL Originate(); 00104 00107 virtual BOOL WritePacket( 00108 const T38_IFPPacket & pdu 00109 ); 00110 00113 virtual BOOL WriteIndicator( 00114 unsigned indicator 00115 ); 00116 00119 virtual BOOL WriteMultipleData( 00120 unsigned mode, 00121 PINDEX count, 00122 unsigned * type, 00123 const PBYTEArray * data 00124 ); 00125 00128 virtual BOOL WriteData( 00129 unsigned mode, 00130 unsigned type, 00131 const PBYTEArray & data 00132 ); 00133 00136 virtual BOOL Answer(); 00137 00142 virtual BOOL HandlePacket( 00143 const T38_IFPPacket & pdu 00144 ); 00145 00150 virtual BOOL HandlePacketLost( 00151 unsigned nLost 00152 ); 00153 00157 virtual BOOL OnIndicator( 00158 unsigned indicator 00159 ); 00160 00164 virtual BOOL OnCNG(); 00165 00169 virtual BOOL OnCED(); 00170 00174 virtual BOOL OnPreamble(); 00175 00179 virtual BOOL OnTraining( 00180 unsigned indicator 00181 ); 00182 00187 virtual BOOL OnData( 00188 unsigned mode, 00189 unsigned type, 00190 const PBYTEArray & data 00191 ); 00193 00194 H323Transport * GetTransport() const { return transport; } 00195 void SetTransport( 00196 H323Transport * transport, 00197 BOOL autoDelete = TRUE 00198 ); 00199 00200 protected: 00201 BOOL HandleRawIFP( 00202 const PASN_OctetString & pdu 00203 ); 00204 00205 H323Transport * transport; 00206 BOOL autoDeleteTransport; 00207 00208 BOOL corrigendumASN; 00209 unsigned indicatorRedundancy; 00210 unsigned lowSpeedRedundancy; 00211 unsigned highSpeedRedundancy; 00212 00213 int lastSentSequenceNumber; 00214 PList<PBYTEArray> redundantIFPs; 00215 }; 00216 00217 00218 #endif // __OPAL_T38PROTO_H 00219 00220