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 #ifndef __OPAL_H323T120_H
00052 #define __OPAL_H323T120_H
00053
00054 #ifdef P_USE_PRAGMA
00055 #pragma interface
00056 #endif
00057
00058
00059 #include "h323caps.h"
00060 #include "channels.h"
00061
00062
00063 class OpalT120Protocol;
00064
00065
00067
00070 class H323_T120Capability : public H323DataCapability
00071 {
00072 PCLASSINFO(H323_T120Capability, H323DataCapability);
00073 public:
00078 H323_T120Capability();
00080
00085 virtual PObject * Clone() const;
00087
00096 virtual unsigned GetSubType() const;
00097
00100 virtual PString GetFormatName() const;
00102
00107 virtual H323Channel * CreateChannel(
00108 H323Connection & connection,
00109 H323Channel::Directions dir,
00110 unsigned sessionID,
00111 const H245_H2250LogicalChannelParameters * param
00113 ) const;
00115
00126 virtual BOOL OnSendingPDU(
00127 H245_DataApplicationCapability & pdu
00128 ) const;
00129
00138 virtual BOOL OnSendingPDU(
00139 H245_DataMode & pdu
00140 ) const;
00141
00148 virtual BOOL OnSendingPDU(
00149 H245_DataProtocolCapability & pdu
00150 ) const;
00151
00159 virtual BOOL OnReceivedPDU(
00160 const H245_DataApplicationCapability & pdu
00161 );
00163
00169 BOOL GetDynamicPortCapability() const { return dynamicPortCapability; }
00170
00174 void SetDynamicPortCapability(BOOL dynamic) { dynamicPortCapability = dynamic; }
00176
00177 protected:
00178 BOOL dynamicPortCapability;
00179 };
00180
00181
00184 class H323_T120Channel : public H323DataChannel
00185 {
00186 PCLASSINFO(H323_T120Channel, H323DataChannel);
00187 public:
00192 H323_T120Channel(
00193 H323Connection & connection,
00194 const H323Capability & capability,
00195 Directions direction,
00196 unsigned sessionID
00197 );
00199
00209 virtual void Receive();
00210
00219 virtual void Transmit();
00220
00223 virtual BOOL OnSendingPDU(
00224 H245_OpenLogicalChannel & openPDU
00225 ) const;
00226
00230 virtual void OnSendOpenAck(
00231 const H245_OpenLogicalChannel & open,
00232 H245_OpenLogicalChannelAck & ack
00233 ) const;
00234
00242 virtual BOOL OnReceivedPDU(
00243 const H245_OpenLogicalChannel & pdu,
00244 unsigned & errorCode
00245 );
00246
00254 virtual BOOL OnReceivedAckPDU(
00255 const H245_OpenLogicalChannelAck & pdu
00256 );
00258
00259 virtual void HandleChannel();
00260
00261 protected:
00262 OpalT120Protocol * t120handler;
00263 };
00264
00265
00266 #endif // __OPAL_H323T120_H
00267
00268