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
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 #ifndef __OPAL_H323T38_H
00103 #define __OPAL_H323T38_H
00104
00105 #ifdef P_USE_PRAGMA
00106 #pragma interface
00107 #endif
00108
00109
00110 #include <h323/h323caps.h>
00111
00112
00113 class H245_T38FaxProfile;
00114 class OpalT38Protocol;
00115
00116
00118
00121 class H323_T38Capability : public H323DataCapability
00122 {
00123 PCLASSINFO(H323_T38Capability, H323DataCapability);
00124 public:
00127 enum TransportMode {
00128 e_UDP,
00129 e_DualTCP,
00130 e_SingleTCP,
00131 NumTransportModes
00132 };
00133
00136 H323_T38Capability(
00137 TransportMode mode
00138 );
00140
00146 Comparison Compare(const PObject & obj) const;
00147
00150 virtual PObject * Clone() const;
00152
00161 virtual unsigned GetSubType() const;
00162
00165 virtual PString GetFormatName() const;
00167
00172 virtual H323Channel * CreateChannel(
00173 H323Connection & connection,
00174 H323Channel::Directions dir,
00175 unsigned sessionID,
00176 const H245_H2250LogicalChannelParameters * param
00178 ) const;
00180
00191 virtual BOOL OnSendingPDU(
00192 H245_DataApplicationCapability & pdu
00193 ) const;
00194
00203 virtual BOOL OnSendingPDU(
00204 H245_DataMode & pdu
00205 ) const;
00206
00213 virtual BOOL OnSendingPDU(
00214 H245_DataProtocolCapability & proto,
00215 H245_T38FaxProfile & profile
00216 ) const;
00217
00225 virtual BOOL OnReceivedPDU(
00226 const H245_DataApplicationCapability & pdu
00227 );
00229
00230 TransportMode GetTransportMode() const { return mode; }
00231
00232 protected:
00233 TransportMode mode;
00234 };
00235
00236
00239 class H323_T38NonStandardCapability : public H323NonStandardDataCapability
00240 {
00241 PCLASSINFO(H323_T38NonStandardCapability, H323NonStandardDataCapability);
00242 public:
00247 H323_T38NonStandardCapability(
00248 BYTE country = 181,
00249 BYTE extension = 0,
00250 WORD maufacturer = 18
00251 );
00253
00258 virtual PObject * Clone() const;
00260
00265 virtual PString GetFormatName() const;
00267
00272 virtual H323Channel * CreateChannel(
00273 H323Connection & connection,
00274 H323Channel::Directions dir,
00275 unsigned sessionID,
00276 const H245_H2250LogicalChannelParameters * param
00278 ) const;
00280 };
00281
00282
00285 class H323_T38Channel : public H323DataChannel
00286 {
00287 PCLASSINFO(H323_T38Channel, H323DataChannel);
00288 public:
00293 H323_T38Channel(
00294 H323Connection & connection,
00295 const H323Capability & capability,
00296 Directions direction,
00297 unsigned sessionID,
00298 H323_T38Capability::TransportMode mode
00299 );
00300 ~H323_T38Channel();
00302
00307 virtual BOOL OnSendingPDU(
00308 H245_OpenLogicalChannel & openPDU
00309 ) const;
00310
00318 virtual BOOL OnReceivedPDU(
00319 const H245_OpenLogicalChannel & pdu,
00320 unsigned & errorCode
00321 );
00322
00325 virtual void Close();
00326
00333 virtual void Receive();
00334
00341 virtual void Transmit();
00342
00349 virtual BOOL CreateListener();
00350
00358 virtual BOOL CreateTransport();
00360
00361 OpalT38Protocol * GetHandler() const { return t38handler; }
00362
00363 protected:
00364 BOOL usesTCP;
00365 OpalT38Protocol * t38handler;
00366 };
00367
00368
00369 #endif // __OPAL_H323T38_H
00370
00371