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 #ifndef __OPAL_H323H224_H
00041 #define __OPAL_H323H224_H
00042
00043 #ifdef P_USE_PRAGMA
00044 #pragma interface
00045 #endif
00046
00047 #ifndef _PTLIB_H
00048 #include <ptlib.h>
00049 #endif
00050
00051 #include <h323/h323caps.h>
00052
00053 #include <h224/h224.h>
00054 #include <h224/h224handler.h>
00055
00056 #define OPAL_H224_CAPABILITY_NAME "H.224"
00057
00060 class H323_H224Capability : public H323DataCapability
00061 {
00062 PCLASSINFO(H323_H224Capability, H323DataCapability);
00063
00064 public:
00065
00066 H323_H224Capability();
00067 ~H323_H224Capability();
00068
00069 Comparison Compare(const PObject & obj) const;
00070
00071 virtual PObject * Clone() const;
00072
00073 virtual unsigned GetSubType() const;
00074
00075 virtual PString GetFormatName() const;
00076
00077 virtual H323Channel * CreateChannel(H323Connection & connection,
00078 H323Channel::Directions dir,
00079 unsigned sesionID,
00080 const H245_H2250LogicalChannelParameters * param) const;
00081
00082 virtual BOOL OnSendingPDU(H245_DataApplicationCapability & pdu) const;
00083 virtual BOOL OnSendingPDU(H245_DataMode & pdu) const;
00084 virtual BOOL OnReceivedPDU(const H245_DataApplicationCapability & pdu);
00085
00086 };
00087
00090 class H323_H224Channel : public H323Channel
00091 {
00092 PCLASSINFO(H323_H224Channel, H323Channel);
00093
00094 public:
00095 H323_H224Channel(H323Connection & connection,
00096 const H323Capability & capability,
00097 Directions direction,
00098 RTP_UDP & session,
00099 unsigned sessionID);
00100 ~H323_H224Channel();
00101
00102 virtual H323Channel::Directions GetDirection() const;
00103 virtual BOOL SetInitialBandwidth();
00104
00105 virtual BOOL Open();
00106 virtual BOOL Start();
00107 virtual void Close();
00108
00109 virtual BOOL OnSendingPDU(H245_OpenLogicalChannel & openPDU) const;
00110 virtual void OnSendOpenAck(const H245_OpenLogicalChannel & openPDU,
00111 H245_OpenLogicalChannelAck & ack) const;
00112 virtual BOOL OnReceivedPDU(const H245_OpenLogicalChannel & pdu, unsigned & errorCode);
00113 virtual BOOL OnReceivedAckPDU(const H245_OpenLogicalChannelAck & pdu);
00114
00115 virtual BOOL OnSendingPDU(H245_H2250LogicalChannelParameters & param) const;
00116 virtual void OnSendOpenAck(H245_H2250LogicalChannelAckParameters & param) const;
00117 virtual BOOL OnReceivedPDU(const H245_H2250LogicalChannelParameters & param,
00118 unsigned & errorCode);
00119 virtual BOOL OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param);
00120
00121 virtual BOOL SetDynamicRTPPayloadType(int newType);
00122 RTP_DataFrame::PayloadTypes GetDynamicRTPPayloadType() const { return rtpPayloadType; }
00123
00124 virtual OpalMediaStream * GetMediaStream(BOOL deleted = FALSE) const;
00125
00126 OpalH224Handler * GetHandler() const { return h224Handler; }
00127
00128 protected:
00129
00130 virtual BOOL ExtractTransport(const H245_TransportAddress & pdu,
00131 BOOL isDataPort,
00132 unsigned & errorCode);
00133
00134 unsigned sessionID;
00135 Directions direction;
00136 RTP_UDP & rtpSession;
00137 H323_RTP_Session & rtpCallbacks;
00138 OpalH224Handler *h224Handler;
00139 RTP_DataFrame::PayloadTypes rtpPayloadType;
00140
00141 };
00142
00143 #endif // __OPAL_H323H224_H
00144