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