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