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 #ifndef __OPAL_H323T120_H
00055 #define __OPAL_H323T120_H
00056
00057 #ifdef P_USE_PRAGMA
00058 #pragma interface
00059 #endif
00060
00061
00062 #include "h323caps.h"
00063 #include "channels.h"
00064
00065
00066 class OpalT120Protocol;
00067
00068
00070
00073 class H323_T120Capability : public H323DataCapability
00074 {
00075 PCLASSINFO(H323_T120Capability, H323DataCapability);
00076 public:
00081 H323_T120Capability();
00083
00088 virtual PObject * Clone() const;
00090
00099 virtual unsigned GetSubType() const;
00100
00103 virtual PString GetFormatName() const;
00105
00110 virtual H323Channel * CreateChannel(
00111 H323Connection & connection,
00112 H323Channel::Directions dir,
00113 unsigned sessionID,
00114 const H245_H2250LogicalChannelParameters * param
00116 ) const;
00118
00129 virtual BOOL OnSendingPDU(
00130 H245_DataApplicationCapability & pdu
00131 ) const;
00132
00141 virtual BOOL OnSendingPDU(
00142 H245_DataMode & pdu
00143 ) const;
00144
00151 virtual BOOL OnSendingPDU(
00152 H245_DataProtocolCapability & pdu
00153 ) const;
00154
00162 virtual BOOL OnReceivedPDU(
00163 const H245_DataApplicationCapability & pdu
00164 );
00166
00172 BOOL GetDynamicPortCapability() const { return dynamicPortCapability; }
00173
00177 void SetDynamicPortCapability(BOOL dynamic) { dynamicPortCapability = dynamic; }
00179
00180 protected:
00181 BOOL dynamicPortCapability;
00182 };
00183
00184
00187 class H323_T120Channel : public H323DataChannel
00188 {
00189 PCLASSINFO(H323_T120Channel, H323DataChannel);
00190 public:
00195 H323_T120Channel(
00196 H323Connection & connection,
00197 const H323Capability & capability,
00198 Directions direction,
00199 unsigned sessionID
00200 );
00202
00212 virtual void Receive();
00213
00222 virtual void Transmit();
00223
00226 virtual BOOL OnSendingPDU(
00227 H245_OpenLogicalChannel & openPDU
00228 ) const;
00229
00233 virtual void OnSendOpenAck(
00234 const H245_OpenLogicalChannel & open,
00235 H245_OpenLogicalChannelAck & ack
00236 ) const;
00237
00245 virtual BOOL OnReceivedPDU(
00246 const H245_OpenLogicalChannel & pdu,
00247 unsigned & errorCode
00248 );
00249
00257 virtual BOOL OnReceivedAckPDU(
00258 const H245_OpenLogicalChannelAck & pdu
00259 );
00261
00262 virtual void HandleChannel();
00263
00264 protected:
00265 OpalT120Protocol * t120handler;
00266 };
00267
00268
00269 #endif // __OPAL_H323T120_H
00270
00271