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 #ifndef __OPAL_H323T38_H
00032 #define __OPAL_H323T38_H
00033
00034 #ifdef P_USE_PRAGMA
00035 #pragma interface
00036 #endif
00037
00038
00039 #include <h323/h323caps.h>
00040
00041
00042 class H245_T38FaxProfile;
00043 class OpalT38Protocol;
00044
00045
00047
00050 class H323_T38Capability : public H323DataCapability
00051 {
00052 PCLASSINFO(H323_T38Capability, H323DataCapability);
00053 public:
00056 enum TransportMode {
00057 e_UDP,
00058 e_DualTCP,
00059 e_SingleTCP,
00060 NumTransportModes
00061 };
00062
00065 H323_T38Capability(
00066 TransportMode mode
00067 );
00069
00075 Comparison Compare(const PObject & obj) const;
00076
00079 virtual PObject * Clone() const;
00081
00090 virtual unsigned GetSubType() const;
00091
00094 virtual PString GetFormatName() const;
00096
00101 virtual H323Channel * CreateChannel(
00102 H323Connection & connection,
00103 H323Channel::Directions dir,
00104 unsigned sessionID,
00105 const H245_H2250LogicalChannelParameters * param
00107 ) const;
00109
00120 virtual PBoolean OnSendingPDU(
00121 H245_DataApplicationCapability & pdu
00122 ) const;
00123
00132 virtual PBoolean OnSendingPDU(
00133 H245_DataMode & pdu
00134 ) const;
00135
00142 virtual PBoolean OnSendingPDU(
00143 H245_DataProtocolCapability & proto,
00144 H245_T38FaxProfile & profile
00145 ) const;
00146
00154 virtual PBoolean OnReceivedPDU(
00155 const H245_DataApplicationCapability & pdu
00156 );
00158
00159 TransportMode GetTransportMode() const { return mode; }
00160
00161 protected:
00162 TransportMode mode;
00163 };
00164
00165
00168 class H323_T38NonStandardCapability : public H323NonStandardDataCapability
00169 {
00170 PCLASSINFO(H323_T38NonStandardCapability, H323NonStandardDataCapability);
00171 public:
00176 H323_T38NonStandardCapability(
00177 BYTE country = 181,
00178 BYTE extension = 0,
00179 WORD maufacturer = 18
00180 );
00182
00187 virtual PObject * Clone() const;
00189
00194 virtual PString GetFormatName() const;
00196
00201 virtual H323Channel * CreateChannel(
00202 H323Connection & connection,
00203 H323Channel::Directions dir,
00204 unsigned sessionID,
00205 const H245_H2250LogicalChannelParameters * param
00207 ) const;
00209 };
00210
00211
00214 class H323_T38Channel : public H323DataChannel
00215 {
00216 PCLASSINFO(H323_T38Channel, H323DataChannel);
00217 public:
00222 H323_T38Channel(
00223 H323Connection & connection,
00224 const H323Capability & capability,
00225 Directions direction,
00226 unsigned sessionID,
00227 H323_T38Capability::TransportMode mode
00228 );
00229 ~H323_T38Channel();
00231
00236 virtual PBoolean OnSendingPDU(
00237 H245_OpenLogicalChannel & openPDU
00238 ) const;
00239
00247 virtual PBoolean OnReceivedPDU(
00248 const H245_OpenLogicalChannel & pdu,
00249 unsigned & errorCode
00250 );
00251
00254 virtual void Close();
00255
00262 virtual void Receive();
00263
00270 virtual void Transmit();
00271
00278 virtual PBoolean CreateListener();
00279
00287 virtual PBoolean CreateTransport();
00289
00290 OpalT38Protocol * GetHandler() const { return t38handler; }
00291
00292 protected:
00293 PBoolean usesTCP;
00294 OpalT38Protocol * t38handler;
00295 };
00296
00297
00298 #endif // __OPAL_H323T38_H
00299
00300