00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
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