D:/Storage/CVS_Head/h323plus/include/h323h224.h

00001 /*
00002  * h323h224.h
00003  *
00004  * H.323 H.224 logical channel establishment implementation for the 
00005  * OpenH323 Project.
00006  *
00007  * Copyright (c) 2006 Network for Educational Technology, ETH Zurich.
00008  * Written by Hannes Friederich.
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  * Contributor(s): ______________________________________.
00021  *
00022  * $Log: h323h224.h,v $
00023  * Revision 1.1  2007/08/06 20:50:49  shorne
00024  * First commit of h323plus
00025  *
00026  * Revision 1.1  2006/06/22 11:07:22  shorne
00027  * Backport of FECC (H.224) from Opal
00028  *
00029  * Revision 1.2  2006/04/30 09:25:08  csoutheren
00030  * Remove warning about missing newline
00031  *
00032  * Revision 1.1  2006/04/20 16:48:17  hfriederich
00033  * Initial version of H.224/H.281 implementation.
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 //  virtual OpalMediaStream * GetMediaStream() const;
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 

Generated on Thu Oct 25 13:42:27 2007 for h323plus by  doxygen 1.5.2