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
#ifndef __OPAL_H323T38_H
00078
#define __OPAL_H323T38_H
00079
00080
#ifdef P_USE_PRAGMA
00081
#pragma interface
00082
#endif
00083
00084
00085
#include "h323caps.h"
00086
00087
00088
class H245_T38FaxProfile;
00089
00090
class OpalT38Protocol;
00091
00092
00094
00097 class H323_T38Capability :
public H323DataCapability
00098 {
00099 PCLASSINFO(
H323_T38Capability,
H323DataCapability);
00100
public:
00103 enum TransportMode {
00104
e_UDP,
00105
e_DualTCP,
00106
e_SingleTCP,
00107
NumTransportModes
00108 };
00109
00112
H323_T38Capability(
00113 TransportMode mode
00114 );
00116
00122 Comparison Compare(
const PObject & obj)
const;
00123
00126
virtual PObject *
Clone() const;
00128
00137 virtual
unsigned GetSubType() const;
00138
00141 virtual PString GetFormatName() const;
00143
00148 virtual
H323Channel * CreateChannel(
00149
H323Connection & connection,
00150
H323Channel::Directions dir,
00151
unsigned sessionID,
00152 const
H245_H2250LogicalChannelParameters * param
00154 ) const;
00156
00167 virtual BOOL OnSendingPDU(
00168
H245_DataApplicationCapability & pdu
00169 ) const;
00170
00179 virtual BOOL OnSendingPDU(
00180
H245_DataMode & pdu
00181 ) const;
00182
00189 virtual BOOL OnSendingPDU(
00190
H245_DataProtocolCapability & proto,
00191
H245_T38FaxProfile & profile
00192 ) const;
00193
00201 virtual BOOL OnReceivedPDU(
00202 const
H245_DataApplicationCapability & pdu
00203 );
00205
00206 TransportMode GetTransportMode()
const {
return mode; }
00207
00208
protected:
00209 TransportMode mode;
00210 };
00211
00212
00215 class H323_T38NonStandardCapability :
public H323NonStandardDataCapability
00216 {
00217 PCLASSINFO(
H323_T38NonStandardCapability,
H323NonStandardDataCapability);
00218
public:
00223
H323_T38NonStandardCapability(
00224 BYTE country = 181,
00225 BYTE extension = 0,
00226 WORD maufacturer = 18
00227 );
00229
00234
virtual PObject *
Clone()
const;
00236
00241
virtual PString
GetFormatName()
const;
00243
00248
virtual H323Channel *
CreateChannel(
00249
H323Connection & connection,
00250 H323Channel::Directions dir,
00251
unsigned sessionID,
00252
const H245_H2250LogicalChannelParameters * param
00254 )
const;
00256 };
00257
00258
00261 class H323_T38Channel :
public H323DataChannel
00262 {
00263 PCLASSINFO(
H323_T38Channel,
H323DataChannel);
00264
public:
00269
H323_T38Channel(
00270
H323Connection & connection,
00271
const H323Capability & capability,
00272 Directions direction,
00273
unsigned sessionID,
00274 H323_T38Capability::TransportMode mode
00275 );
00276
~H323_T38Channel();
00278
00283
virtual BOOL
OnSendingPDU(
00284
H245_OpenLogicalChannel & openPDU
00285 )
const;
00286
00294
virtual BOOL
OnReceivedPDU(
00295
const H245_OpenLogicalChannel & pdu,
00296
unsigned & errorCode
00297 );
00298
00301
virtual void CleanUpOnTermination();
00302
00309
virtual void Receive();
00310
00317
virtual void Transmit();
00318
00325
virtual BOOL
CreateListener();
00326
00334
virtual BOOL
CreateTransport();
00336
00337 OpalT38Protocol *
GetHandler()
const {
return t38handler; }
00338
00339
protected:
00340 BOOL
usesTCP;
00341 OpalT38Protocol *
t38handler;
00342 };
00343
00344
00345
#endif // __OPAL_H323T38_H
00346
00347