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 #ifndef __OPAL_H323T120_H
00058 #define __OPAL_H323T120_H
00059
00060 #ifdef P_USE_PRAGMA
00061 #pragma interface
00062 #endif
00063
00064
00065 #include "h323caps.h"
00066 #include "channels.h"
00067
00068
00069 class OpalT120Protocol;
00070
00071
00073
00076 class H323_T120Capability : public H323DataCapability
00077 {
00078 PCLASSINFO(H323_T120Capability, H323DataCapability);
00079 public:
00084 H323_T120Capability();
00086
00091 virtual PObject * Clone() const;
00093
00102 virtual unsigned GetSubType() const;
00103
00106 virtual PString GetFormatName() const;
00108
00113 virtual H323Channel * CreateChannel(
00114 H323Connection & connection,
00115 H323Channel::Directions dir,
00116 unsigned sessionID,
00117 const H245_H2250LogicalChannelParameters * param
00119 ) const;
00121
00132 virtual BOOL OnSendingPDU(
00133 H245_DataApplicationCapability & pdu
00134 ) const;
00135
00144 virtual BOOL OnSendingPDU(
00145 H245_DataMode & pdu
00146 ) const;
00147
00154 virtual BOOL OnSendingPDU(
00155 H245_DataProtocolCapability & pdu
00156 ) const;
00157
00165 virtual BOOL OnReceivedPDU(
00166 const H245_DataApplicationCapability & pdu
00167 );
00169
00175 BOOL GetDynamicPortCapability() const { return dynamicPortCapability; }
00176
00180 void SetDynamicPortCapability(BOOL dynamic) { dynamicPortCapability = dynamic; }
00182
00183 protected:
00184 BOOL dynamicPortCapability;
00185 };
00186
00187
00190 class H323_T120Channel : public H323DataChannel
00191 {
00192 PCLASSINFO(H323_T120Channel, H323DataChannel);
00193 public:
00198 H323_T120Channel(
00199 H323Connection & connection,
00200 const H323Capability & capability,
00201 Directions direction,
00202 unsigned sessionID
00203 );
00205
00215 virtual void Receive();
00216
00225 virtual void Transmit();
00226
00229 virtual BOOL OnSendingPDU(
00230 H245_OpenLogicalChannel & openPDU
00231 ) const;
00232
00236 virtual void OnSendOpenAck(
00237 const H245_OpenLogicalChannel & open,
00238 H245_OpenLogicalChannelAck & ack
00239 ) const;
00240
00248 virtual BOOL OnReceivedPDU(
00249 const H245_OpenLogicalChannel & pdu,
00250 unsigned & errorCode
00251 );
00252
00260 virtual BOOL OnReceivedAckPDU(
00261 const H245_OpenLogicalChannelAck & pdu
00262 );
00264
00265 virtual void HandleChannel();
00266
00267 protected:
00268 OpalT120Protocol * t120handler;
00269 };
00270
00271
00272 #endif // __OPAL_H323T120_H
00273
00274