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 #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