OPAL Version 3.10.2
|
00001 /* 00002 * h323t120.h 00003 * 00004 * H.323 T.120 logical channel establishment 00005 * 00006 * Open H323 Library 00007 * 00008 * Copyright (c) 2001 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Open H323 Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Contributor(s): ______________________________________. 00025 * 00026 * $Revision: 21293 $ 00027 * $Author: rjongbloed $ 00028 * $Date: 2008-10-12 18:24:41 -0500 (Sun, 12 Oct 2008) $ 00029 */ 00030 00031 #ifndef OPAL_T120_H323T120_H 00032 #define OPAL_T120_H323T120_H 00033 00034 #ifdef P_USE_PRAGMA 00035 #pragma interface 00036 #endif 00037 00038 #include <opal/buildopts.h> 00039 00040 #include <h323/h323caps.h> 00041 00042 00043 class OpalT120Protocol; 00044 00045 00047 00050 class H323_T120Capability : public H323DataCapability 00051 { 00052 PCLASSINFO(H323_T120Capability, H323DataCapability); 00053 public: 00058 H323_T120Capability(); 00060 00065 virtual PObject * Clone() const; 00067 00076 virtual unsigned GetSubType() const; 00077 00080 virtual PString GetFormatName() const; 00082 00087 virtual H323Channel * CreateChannel( 00088 H323Connection & connection, 00089 H323Channel::Directions dir, 00090 unsigned sessionID, 00091 const H245_H2250LogicalChannelParameters * param 00093 ) const; 00095 00106 virtual PBoolean OnSendingPDU( 00107 H245_DataApplicationCapability & pdu 00108 ) const; 00109 00118 virtual PBoolean OnSendingPDU( 00119 H245_DataMode & pdu 00120 ) const; 00121 00128 virtual PBoolean OnSendingPDU( 00129 H245_DataProtocolCapability & pdu 00130 ) const; 00131 00139 virtual PBoolean OnReceivedPDU( 00140 const H245_DataApplicationCapability & pdu 00141 ); 00143 00149 PBoolean GetDynamicPortCapability() const { return dynamicPortCapability; } 00150 00154 void SetDynamicPortCapability(PBoolean dynamic) { dynamicPortCapability = dynamic; } 00156 00157 protected: 00158 PBoolean dynamicPortCapability; 00159 }; 00160 00161 00164 class H323_T120Channel : public H323DataChannel 00165 { 00166 PCLASSINFO(H323_T120Channel, H323DataChannel); 00167 public: 00172 H323_T120Channel( 00173 H323Connection & connection, 00174 const H323Capability & capability, 00175 Directions direction, 00176 unsigned sessionID 00177 ); 00179 00189 virtual void Receive(); 00190 00199 virtual void Transmit(); 00200 00203 virtual PBoolean OnSendingPDU( 00204 H245_OpenLogicalChannel & openPDU 00205 ) const; 00206 00210 virtual void OnSendOpenAck( 00211 const H245_OpenLogicalChannel & open, 00212 H245_OpenLogicalChannelAck & ack 00213 ) const; 00214 00222 virtual PBoolean OnReceivedPDU( 00223 const H245_OpenLogicalChannel & pdu, 00224 unsigned & errorCode 00225 ); 00226 00234 virtual PBoolean OnReceivedAckPDU( 00235 const H245_OpenLogicalChannelAck & pdu 00236 ); 00238 00239 virtual void HandleChannel(); 00240 00241 protected: 00242 OpalT120Protocol * t120handler; 00243 }; 00244 00245 00246 #endif // OPAL_T120_H323T120_H 00247 00248