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

00001 /*
00002  * h323caps.h
00003  *
00004  * H.323 protocol handler
00005  *
00006  * Open H323 Library
00007  *
00008  * Copyright (c) 1998-2000 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  * Portions of this code were written with the assisance of funding from
00025  * Vovida Networks, Inc. http://www.vovida.com.
00026  *
00027  * Contributor(s): ______________________________________.
00028  *
00029  * $Log: h323caps.h,v $
00030  * Revision 1.3  2007/10/16 17:00:28  shorne
00031  * Added H.230 Support
00032  *
00033  * Revision 1.2  2007/08/20 19:13:27  shorne
00034  * Added Generic Capability support. Fixed Linux compile errors
00035  *
00036  * Revision 1.1  2007/08/06 20:50:49  shorne
00037  * First commit of h323plus
00038  *
00039  * Revision 1.53.2.5  2007/03/24 23:39:42  shorne
00040  * More H.239 work
00041  *
00042  * Revision 1.53.2.4  2007/02/19 20:11:05  shorne
00043  * Added Baseline H.239 Support
00044  *
00045  * Revision 1.53.2.3  2007/02/18 17:11:22  shorne
00046  * Added H.249 Extended UserInput Support
00047  *
00048  * Revision 1.53.2.2  2007/02/02 22:12:43  shorne
00049  * Added ability to set FrameSize for video plugins
00050  *
00051  * Revision 1.53.2.1  2006/12/23 19:08:02  shorne
00052  * Plugin video codecs & sundry
00053  *
00054  * Revision 1.53  2006/09/05 23:56:57  csoutheren
00055  * Convert media format and capability factories to use std::string
00056  *
00057  * Revision 1.52  2006/05/16 11:36:01  shorne
00058  * added AEC support and  H323VdieoCapability default constructor
00059  *
00060  * Revision 1.51  2005/11/30 13:05:01  csoutheren
00061  * Changed tags for Doxygen
00062  *
00063  * Revision 1.50  2005/06/07 07:09:13  csoutheren
00064  * Removed compiler warnings on Windows
00065  *
00066  * Revision 1.49  2005/06/07 03:22:22  csoutheren
00067  * Added patch 1198741 with support for plugin codecs with generic capabilities
00068  * Added patch 1198754 with support for setting quality level on audio codecs
00069  * Added patch 1198760 with GSM-AMR codec support
00070  * Many thanks to Richard van der Hoff for his work
00071  *
00072  * Revision 1.48  2005/01/03 06:25:52  csoutheren
00073  * Added extensive support for disabling code modules at compile time
00074  *
00075  * Revision 1.47  2004/08/24 14:23:09  csoutheren
00076  * Fixed problem with plugin codecs using capability compare functions
00077  *
00078  * Revision 1.46  2004/06/30 12:31:09  rjongbloed
00079  * Rewrite of plug in system to use single global variable for all factories to avoid all sorts
00080  *   of issues with startup orders and Windows DLL multiple instances.
00081  *
00082  * Revision 1.45  2004/06/08 01:20:28  csoutheren
00083  * Provide backwards compatibility for applications using old capability API
00084  *
00085  * Revision 1.44  2004/06/01 05:47:58  csoutheren
00086  * Changed capability table to use abstract factory routines rather than internal linked list
00087  *
00088  * Revision 1.43  2004/05/13 12:49:32  rjongbloed
00089  * Fixed usage of the compare function in non-standard capabilities.
00090  *
00091  * Revision 1.42  2004/04/03 10:38:24  csoutheren
00092  * Added in initial cut at codec plugin code. Branches are for wimps :)
00093  *
00094  * Revision 1.41.2.1  2004/03/31 11:11:58  csoutheren
00095  * Initial public release of plugin codec code
00096  *
00097  * Revision 1.41  2004/03/02 11:48:14  rjongbloed
00098  * Fixed correct capability table matching when FindCapability with a mode change,
00099  *   uses different enum so needs translation table.
00100  *
00101  * Revision 1.40  2003/10/27 06:03:39  csoutheren
00102  * Added support for QoS
00103  *   Thanks to Henry Harrison of AliceStreet
00104  *
00105  * Revision 1.39  2003/06/06 02:13:10  rjongbloed
00106  * Changed non-standard capability semantics so can use C style strings as
00107  *   the embedded data block (ie automatically call strlen)
00108  *
00109  * Revision 1.38  2003/04/28 07:00:00  robertj
00110  * Fixed problem with compiler(s) not correctly initialising static globals
00111  *
00112  * Revision 1.37  2003/04/27 23:49:21  craigs
00113  * Fixed some comments and made list of registered codecs
00114  * available outside h323caps.cxx
00115  *
00116  * Revision 1.36  2002/11/09 04:24:01  robertj
00117  * Fixed minor documentation errors.
00118  *
00119  * Revision 1.35  2002/09/16 01:14:15  robertj
00120  * Added #define so can select if #pragma interface/implementation is used on
00121  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00122  *
00123  * Revision 1.34  2002/09/03 06:19:36  robertj
00124  * Normalised the multi-include header prevention ifdef/define symbol.
00125  *
00126  * Revision 1.33  2002/08/05 10:03:47  robertj
00127  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00128  *
00129  * Revision 1.32  2002/05/29 03:55:17  robertj
00130  * Added protocol version number checking infrastructure, primarily to improve
00131  *   interoperability with stacks that are unforgiving of new features.
00132  *
00133  * Revision 1.31  2002/05/10 05:44:50  robertj
00134  * Added the max bit rate field to the data channel capability class.
00135  *
00136  * Revision 1.30  2002/01/22 06:25:02  robertj
00137  * Moved payload type to ancestor so any capability can adjust it on logical channel.
00138  *
00139  * Revision 1.29  2002/01/17 07:04:57  robertj
00140  * Added support for RFC2833 embedded DTMF in the RTP stream.
00141  *
00142  * Revision 1.28  2002/01/16 05:37:41  robertj
00143  * Added missing mode change functions on non standard capabilities.
00144  *
00145  * Revision 1.27  2002/01/09 00:21:36  robertj
00146  * Changes to support outgoing H.245 RequstModeChange.
00147  *
00148  * Revision 1.26  2001/12/22 01:44:05  robertj
00149  * Added more support for H.245 RequestMode operation.
00150  *
00151  * Revision 1.25  2001/10/24 01:20:34  robertj
00152  * Added code to help with static linking of H323Capability names database.
00153  *
00154  * Revision 1.24  2001/09/21 02:48:51  robertj
00155  * Added default implementation for PDU encode/decode for codecs
00156  *   that have simple integer as frames per packet.
00157  *
00158  * Revision 1.23  2001/09/11 10:21:40  robertj
00159  * Added direction field to capabilities, thanks Nick Hoath.
00160  *
00161  * Revision 1.22  2001/07/19 09:50:40  robertj
00162  * Added code for default session ID on data channel being three.
00163  *
00164  * Revision 1.21  2001/07/17 04:44:29  robertj
00165  * Partial implementation of T.120 and T.38 logical channels.
00166  *
00167  * Revision 1.20  2001/05/21 07:20:47  robertj
00168  * Removed redundent class name in declaration.
00169  *
00170  * Revision 1.19  2001/05/14 05:56:26  robertj
00171  * Added H323 capability registration system so can add capabilities by
00172  *   string name instead of having to instantiate explicit classes.
00173  *
00174  * Revision 1.18  2001/05/02 16:22:21  rogerh
00175  * Add IsAllow() for a single capability to check if it is in the
00176  * capabilities set. This fixes the bug where OpenH323 would accept
00177  * incoming H261 video even when told not to accept it.
00178  *
00179  * Revision 1.17  2001/03/16 23:00:21  robertj
00180  * Improved validation of codec selection against capability set, thanks Chris Purvis.
00181  *
00182  * Revision 1.16  2001/02/09 05:16:24  robertj
00183  * Added #pragma interface for GNU C++.
00184  *
00185  * Revision 1.15  2001/01/25 07:27:14  robertj
00186  * Major changes to add more flexible OpalMediaFormat class to normalise
00187  *   all information about media types, especially codecs.
00188  *
00189  * Revision 1.14  2001/01/09 23:05:22  robertj
00190  * Fixed inability to have 2 non standard codecs in capability table.
00191  *
00192  * Revision 1.13  2000/10/16 08:49:30  robertj
00193  * Added single function to add all UserInput capability types.
00194  *
00195  * Revision 1.12  2000/08/23 14:23:11  craigs
00196  * Added prototype support for Microsoft GSM codec
00197  *
00198  * Revision 1.11  2000/07/13 12:25:47  robertj
00199  * Fixed problems with fast start frames per packet adjustment.
00200  *
00201  * Revision 1.10  2000/07/10 16:01:50  robertj
00202  * Started fixing capability set merging, still more to do.
00203  *
00204  * Revision 1.9  2000/07/04 01:16:49  robertj
00205  * Added check for capability allowed in "combinations" set, still needs more done yet.
00206  *
00207  * Revision 1.8  2000/06/03 03:16:47  robertj
00208  * Fixed using the wrong capability table (should be connections) for some operations.
00209  *
00210  * Revision 1.7  2000/05/23 11:32:27  robertj
00211  * Rewrite of capability table to combine 2 structures into one and move functionality into that class
00212  *    allowing some normalisation of usage across several applications.
00213  * Changed H323Connection so gets a copy of capabilities instead of using endponts, allows adjustments
00214  *    to be done depending on the remote client application.
00215  *
00216  * Revision 1.6  2000/05/18 11:53:34  robertj
00217  * Changes to support doc++ documentation generation.
00218  *
00219  * Revision 1.5  2000/05/10 04:05:26  robertj
00220  * Changed capabilities so has a function to get name of codec, instead of relying on PrintOn.
00221  *
00222  * Revision 1.4  2000/05/02 04:32:24  robertj
00223  * Fixed copyright notice comment.
00224  *
00225  * Revision 1.3  2000/04/05 19:01:12  robertj
00226  * Added function so can change desired transmit packet size.
00227  *
00228  * Revision 1.2  2000/03/21 03:06:47  robertj
00229  * Changes to make RTP TX of exact numbers of frames in some codecs.
00230  *
00231  * Revision 1.1  1999/12/23 23:02:35  robertj
00232  * File reorganision for separating RTP from H.323 and creation of LID for VPB support.
00233  *
00234  */
00235 
00236 #ifndef __OPAL_H323CAPS_H
00237 #define __OPAL_H323CAPS_H
00238 
00239 #ifdef P_USE_PRAGMA
00240 #pragma interface
00241 #endif
00242 
00243 
00244 #include "codecs.h"
00245 #include "channels.h"
00246 #include "mediafmt.h"
00247 
00248 
00249 /* The following classes have forward references to avoid including the VERY
00250    large header files for H225 and H245. If an application requires access
00251    to the protocol classes they can include them, but for simple usage their
00252    inclusion can be avoided.
00253  */
00254 class PASN_Choice;
00255 class H245_Capability;
00256 class H245_DataType;
00257 class H245_ModeElement;
00258 class H245_AudioCapability;
00259 class H245_AudioMode;
00260 class H245_VideoCapability;
00261 class H245_VideoMode;
00262 class H245_DataApplicationCapability;
00263 class H245_DataMode;
00264 class H245_DataProtocolCapability;
00265 class H245_GenericCapability;
00266 class H245_CapabilityIdentifier;
00267 class H245_GenericParameter;
00268 class H245_H2250LogicalChannelParameters;
00269 class H245_H223LogicalChannelParameters;
00270 class H245_TerminalCapabilitySet;
00271 class H245_NonStandardParameter;
00272 class H323Connection;
00273 class H323Capabilities;
00274 
00275 
00276 
00278 
00292 class H323Capability : public PObject
00293 {
00294   PCLASSINFO(H323Capability, PObject);
00295 
00296   public:
00301     H323Capability();
00303 
00309     Comparison Compare(const PObject & obj) const;
00310 
00313     void PrintOn(ostream & strm) const;
00315 
00318     enum MainTypes {
00320       e_Audio,
00322       e_Video,
00324       e_Data,
00326       e_UserInput,
00328           e_ExtendVideo,
00330           e_ConferenceControl,
00332       e_NumMainTypes
00333     };
00334 
00340     virtual MainTypes GetMainType() const = 0;
00341 
00345     virtual unsigned  GetSubType()  const = 0;
00346 
00349     virtual PString GetFormatName() const = 0;
00351 
00357     static H323Capability * Create(
00358       const PString & name    
00359     );
00360 
00364     static H323Capability * Create(
00365       H323EndPoint &,         
00366       const PString & name    
00367     )
00368     { return Create(name); }
00369 
00378     virtual unsigned GetDefaultSessionID() const;
00379 
00388     virtual void SetTxFramesInPacket(
00389       unsigned frames   
00390     );
00391 
00396     virtual unsigned GetTxFramesInPacket() const;
00397 
00402     virtual unsigned GetRxFramesInPacket() const;
00403 
00404          enum CapabilityFrameSize {
00405                  sqcifMPI,
00406          qcifMPI,
00407                  cifMPI,
00408                  cif4MPI,
00409                  cif16MPI
00410          };
00411 
00416          virtual BOOL SetMaxFrameSize(
00417                    CapabilityFrameSize /*framesize*/, 
00418                    int /*frameUnits*/) 
00419          { return FALSE; };
00420 
00426     virtual H323Channel * CreateChannel(
00427       H323Connection & connection,    
00428       H323Channel::Directions dir,    
00429       unsigned sessionID,             
00430       const H245_H2250LogicalChannelParameters * param
00432     ) const = 0;
00433 
00436     virtual H323Codec * CreateCodec(
00437       H323Codec::Direction direction  
00438     ) const = 0;
00440 
00443     enum CommandType {
00444       e_TCS,
00445       e_OLC,
00446       e_ReqMode
00447     };
00448 
00456     virtual BOOL OnSendingPDU(
00457       H245_Capability & pdu  
00458     ) const = 0;
00459 
00467     virtual BOOL OnSendingPDU(
00468       H245_DataType & pdu  
00469     ) const = 0;
00470 
00478     virtual BOOL OnSendingPDU(
00479       H245_ModeElement & pdu  
00480     ) const = 0;
00481 
00494     virtual BOOL OnReceivedPDU(
00495       const H245_Capability & pdu 
00496     );
00497 
00505     virtual BOOL OnReceivedPDU(
00506       const H245_DataType & pdu,  
00507       BOOL receiver               
00508     ) = 0;
00509 
00512     virtual BOOL IsMatch(
00513       const PASN_Choice & subTypePDU  
00514     ) const;
00515 
00523     virtual BOOL IsUsable(
00524       const H323Connection & connection
00525     ) const;
00527 
00530     enum CapabilityDirection {
00531       e_Unknown,
00532       e_Receive,
00533       e_Transmit,
00534       e_ReceiveAndTransmit,
00535       e_NoDirection,
00536           e_GenericControl,
00537       NumCapabilityDirections
00538     };
00539 
00542     CapabilityDirection GetCapabilityDirection() const { return capabilityDirection; }
00543 
00546     void SetCapabilityDirection(
00547       CapabilityDirection dir   
00548     ) { capabilityDirection = dir; }
00549 
00551     virtual unsigned GetCapabilityNumber() const { return assignedCapabilityNumber; }
00552 
00554     virtual void SetCapabilityNumber(unsigned num) { assignedCapabilityNumber = num; }
00555 
00558     const OpalMediaFormat & GetMediaFormat() const;
00559     OpalMediaFormat & GetWritableMediaFormat();
00560 
00562     RTP_DataFrame::PayloadTypes GetPayloadType() const { return rtpPayloadType; }
00563 
00565     virtual void AttachQoS(RTP_QOS *)
00566     {}
00568 
00569 #if PTRACING
00570     friend ostream & operator<<(ostream & o , MainTypes t);
00571     friend ostream & operator<<(ostream & o , CapabilityDirection d);
00572 #endif
00573 
00574   protected:
00575     unsigned assignedCapabilityNumber;  
00576     CapabilityDirection capabilityDirection;
00577     RTP_DataFrame::PayloadTypes rtpPayloadType;
00578     
00579   private:
00580     OpalMediaFormat mediaFormat;
00581 };
00582 
00583 
00584 
00594 class H323NonStandardCapabilityInfo
00595 {
00596   public:
00597     typedef PObject::Comparison (*CompareFuncType)(struct PluginCodec_H323NonStandardCodecData *);
00598 
00601     H323NonStandardCapabilityInfo(
00602       CompareFuncType compareFunc,
00603       const BYTE * dataBlock,         
00604       PINDEX dataSize                 
00605     );
00606 
00607     H323NonStandardCapabilityInfo(
00608       const BYTE * dataBlock,         
00609       PINDEX dataSize,                
00610       PINDEX comparisonOffset = 0,    
00611       PINDEX comparisonLength = P_MAX_INDEX    
00612     );
00613 
00616     H323NonStandardCapabilityInfo(
00617       const PString & oid,
00618       const BYTE * dataBlock,         
00619       PINDEX dataSize,                
00620       PINDEX comparisonOffset = 0,
00621       PINDEX comparisonLength = P_MAX_INDEX
00622     );
00623 
00626     H323NonStandardCapabilityInfo(
00627       BYTE country,                  
00628       BYTE extension,                
00629       WORD maufacturer,              
00630       const BYTE * dataBlock,        
00631       PINDEX dataSize,               
00632       PINDEX comparisonOffset = 0,   
00633       PINDEX comparisonLength = P_MAX_INDEX  
00634     );
00635 
00638     virtual ~H323NonStandardCapabilityInfo();
00639 
00644     virtual BOOL OnSendingPDU(
00645       PBYTEArray & data  
00646     ) const;
00647 
00652     virtual BOOL OnReceivedPDU(
00653       const PBYTEArray & data  
00654     );
00655 
00656     BOOL IsMatch(const H245_NonStandardParameter & param) const;
00657 
00658   protected:
00659     BOOL OnSendingNonStandardPDU(
00660       PASN_Choice & pdu,
00661       unsigned nonStandardTag
00662     ) const;
00663     BOOL OnReceivedNonStandardPDU(
00664       const PASN_Choice & pdu,
00665       unsigned nonStandardTag
00666     );
00667 
00668     PObject::Comparison CompareParam(
00669       const H245_NonStandardParameter & param
00670     ) const;
00671     PObject::Comparison CompareInfo(
00672       const H323NonStandardCapabilityInfo & obj
00673     ) const;
00674     PObject::Comparison CompareData(
00675       const PBYTEArray & data  
00676     ) const;
00677 
00678     PString    oid;
00679     BYTE       t35CountryCode;
00680     BYTE       t35Extension;
00681     WORD       manufacturerCode;
00682     PBYTEArray nonStandardData;
00683     PINDEX     comparisonOffset;
00684     PINDEX     comparisonLength;
00685     CompareFuncType compareFunc;
00686 };
00687 
00688 
00698 class H323GenericCapabilityInfo
00699 {
00700   public:
00701     H323GenericCapabilityInfo(
00702         const PString &capabilityId,    
00703         PINDEX maxBitRate = 0         
00704     );
00705     H323GenericCapabilityInfo(const H323GenericCapabilityInfo &obj);
00706     virtual ~H323GenericCapabilityInfo();
00707 
00708     BOOL IsMatch(
00709       const H245_GenericCapability & param  
00710     ) const;
00711   protected:
00712     virtual BOOL OnSendingGenericPDU(
00713       H245_GenericCapability & pdu,
00714       const OpalMediaFormat & mediaFormat,
00715       H323Capability::CommandType type
00716     ) const;
00717     virtual BOOL OnReceivedGenericPDU(
00718       OpalMediaFormat & mediaFormat,
00719       const H245_GenericCapability & pdu,
00720       H323Capability::CommandType type
00721     );
00722 
00723     PObject::Comparison CompareInfo(
00724         const H323GenericCapabilityInfo & obj
00725         ) const;
00726 
00727 
00728     H245_CapabilityIdentifier * identifier;
00729     unsigned                    maxBitRate;
00730 };
00731 
00732     
00739 class PAec;
00740 class H323RealTimeCapability : public H323Capability
00741 {
00742   PCLASSINFO(H323RealTimeCapability, H323Capability);
00743 
00744   public:
00749     virtual H323Channel * CreateChannel(
00750       H323Connection & connection,    
00751       H323Channel::Directions dir,    
00752       unsigned sessionID,             
00753       const H245_H2250LogicalChannelParameters * param
00755     ) const;
00756 
00757     H323RealTimeCapability();
00758     H323RealTimeCapability(const H323RealTimeCapability &rtc);
00759     virtual ~H323RealTimeCapability();
00760     virtual void AttachQoS(RTP_QOS * _rtpqos);
00761 
00762   protected:
00763     RTP_QOS * rtpqos;
00764 
00765 
00767 };
00768 
00769 #ifndef NO_H323_AUDIO_CODECS
00770 
00777 class H323AudioCapability : public H323RealTimeCapability
00778 {
00779   PCLASSINFO(H323AudioCapability, H323RealTimeCapability);
00780 
00781   public:
00786     H323AudioCapability(
00787       unsigned rxPacketSize, 
00788       unsigned txPacketSize  
00789     );
00791 
00797     virtual MainTypes GetMainType() const;
00799 
00810     virtual unsigned GetDefaultSessionID() const;
00811 
00820     virtual void SetTxFramesInPacket(
00821       unsigned frames   
00822     );
00823 
00829     virtual unsigned GetTxFramesInPacket() const;
00830 
00836     virtual unsigned GetRxFramesInPacket() const;
00838 
00849     virtual BOOL OnSendingPDU(
00850       H245_Capability & pdu  
00851     ) const;
00852 
00861     virtual BOOL OnSendingPDU(
00862       H245_DataType & pdu  
00863     ) const;
00864 
00873     virtual BOOL OnSendingPDU(
00874       H245_ModeElement & pdu  
00875     ) const;
00876 
00885     virtual BOOL OnSendingPDU(
00886       H245_AudioCapability & pdu,  
00887       unsigned packetSize          
00888     ) const;
00889     virtual BOOL OnSendingPDU(
00890       H245_AudioCapability & pdu,  
00891       unsigned packetSize,         
00892       CommandType type             
00893     ) const;
00894 
00903     virtual BOOL OnSendingPDU(
00904       H245_AudioMode & pdu  
00905     ) const;
00906 
00918     virtual BOOL OnReceivedPDU(
00919       const H245_Capability & pdu  
00920     );
00921 
00931     virtual BOOL OnReceivedPDU(
00932       const H245_DataType & pdu,  
00933       BOOL receiver               
00934     );
00935 
00944     virtual BOOL OnReceivedPDU(
00945       const H245_AudioCapability & pdu,  
00946       unsigned & packetSize              
00947     );
00948     virtual BOOL OnReceivedPDU(
00949       const H245_AudioCapability & pdu,  
00950       unsigned & packetSize,             
00951       CommandType type                   
00952     );
00954 
00955   protected:
00956     unsigned rxFramesInPacket;
00957     unsigned txFramesInPacket;
00958 };
00959 
00960 
00968 class H323NonStandardAudioCapability : public H323AudioCapability,
00969                                        public H323NonStandardCapabilityInfo
00970 {
00971   PCLASSINFO(H323NonStandardAudioCapability, H323AudioCapability);
00972 
00973   public:
00978     H323NonStandardAudioCapability(
00979       unsigned maxPacketSize,         
00980       unsigned desiredPacketSize,     
00981       H323NonStandardCapabilityInfo::CompareFuncType compareFunc,
00982       const BYTE * dataBlock,         
00983       PINDEX dataSize                 
00984     );
00985     H323NonStandardAudioCapability(
00986       unsigned maxPacketSize,         
00987       unsigned desiredPacketSize,     
00988       const BYTE * dataBlock,         
00989       PINDEX dataSize,                
00990       PINDEX comparisonOffset = 0,    
00991       PINDEX comparisonLength = P_MAX_INDEX     
00992      );
00996     H323NonStandardAudioCapability(
00997       unsigned maxPacketSize,         
00998       unsigned desiredPacketSize,     
00999       H323EndPoint &,
01000       H323NonStandardCapabilityInfo::CompareFuncType compareFunc,
01001       const BYTE * dataBlock,         
01002       PINDEX dataSize                 
01003     );
01004     H323NonStandardAudioCapability(
01005       unsigned maxPacketSize,         
01006       unsigned desiredPacketSize,     
01007       H323EndPoint &,
01008       const BYTE * dataBlock,         
01009       PINDEX dataSize,                
01010       PINDEX comparisonOffset = 0,    
01011       PINDEX comparisonLength = P_MAX_INDEX         
01012      );
01013 
01016     H323NonStandardAudioCapability(
01017       unsigned maxPacketSize,         
01018       unsigned desiredPacketSize,     
01019       const PString & oid,            
01020       const BYTE * dataBlock,         
01021       PINDEX dataSize,                
01022       PINDEX comparisonOffset = 0,    
01023       PINDEX comparisonLength = P_MAX_INDEX  
01024     );
01025 
01028     H323NonStandardAudioCapability(
01029       unsigned maxPacketSize,         
01030       unsigned desiredPacketSize,     
01031       BYTE country,                   
01032       BYTE extension,                 
01033       WORD maufacturer,               
01034       const BYTE * dataBlock,         
01035       PINDEX dataSize,                
01036       PINDEX comparisonOffset = 0,        
01037       PINDEX comparisonLength = P_MAX_INDEX        
01038     );
01040 
01046     Comparison Compare(const PObject & obj) const;
01048 
01056     virtual unsigned GetSubType() const;
01058 
01069     virtual BOOL OnSendingPDU(
01070       H245_AudioCapability & pdu,  
01071       unsigned packetSize          
01072     ) const;
01073 
01082     virtual BOOL OnSendingPDU(
01083       H245_AudioMode & pdu  
01084     ) const;
01085 
01094     virtual BOOL OnReceivedPDU(
01095       const H245_AudioCapability & pdu,  
01096       unsigned & packetSize              
01097     );
01098 
01101     virtual BOOL IsMatch(
01102       const PASN_Choice & subTypePDU  
01103     ) const;
01105 };
01106 
01114 class H323GenericAudioCapability : public H323AudioCapability,
01115                                    public H323GenericCapabilityInfo
01116 {
01117   PCLASSINFO(H323NonStandardAudioCapability, H323AudioCapability);
01118 
01119   public:
01124     H323GenericAudioCapability(
01125       unsigned maxPacketSize,         
01126       unsigned desiredPacketSize,     
01127       const PString &capabilityId,    
01128       PINDEX maxBitRate = 0           
01129       );
01130 
01132 
01138     Comparison Compare(const PObject & obj) const;
01140 
01148     virtual unsigned GetSubType() const;
01150 
01161     virtual BOOL OnSendingPDU(
01162       H245_AudioCapability & pdu,  
01163       unsigned packetSize,         
01164       CommandType type             
01165     ) const;
01166 
01175     virtual BOOL OnSendingPDU(
01176       H245_AudioMode & pdu  
01177     ) const;
01178 
01187     virtual BOOL OnReceivedPDU(
01188       const H245_AudioCapability & pdu,  
01189       unsigned & packetSize,             
01190       CommandType type                   
01191     );
01192 
01195     virtual BOOL IsMatch(
01196       const PASN_Choice & subTypePDU  
01197     ) const;
01199 };
01200 
01201 #endif
01202 
01203 #ifndef NO_H323_VIDEO
01204 
01211 class H323VideoCapability : public H323RealTimeCapability
01212 {
01213   PCLASSINFO(H323VideoCapability, H323RealTimeCapability);
01214 
01215   public:
01220     H323VideoCapability();
01222 
01227     virtual MainTypes GetMainType() const;
01229 
01240     virtual unsigned GetDefaultSessionID() const;
01242 
01253     virtual BOOL OnSendingPDU(
01254       H245_Capability & pdu  
01255     ) const;
01256 
01265     virtual BOOL OnSendingPDU(
01266       H245_DataType & pdu  
01267     ) const;
01268 
01277     virtual BOOL OnSendingPDU(
01278       H245_ModeElement & pdu  
01279     ) const;
01280 
01288     virtual BOOL OnSendingPDU(
01289       H245_VideoCapability & pdu  
01290     ) const;
01291     virtual BOOL OnSendingPDU(
01292       H245_VideoCapability & pdu,  
01293       CommandType type             
01294     ) const;
01295 
01304     virtual BOOL OnSendingPDU(
01305       H245_VideoMode & pdu  
01306     ) const = 0;
01307 
01317     virtual BOOL OnReceivedPDU(
01318       const H245_Capability & pdu  
01319     );
01320 
01328     virtual BOOL OnReceivedPDU(
01329       const H245_DataType & pdu,  
01330       BOOL receiver               
01331     );
01332 
01340     virtual BOOL OnReceivedPDU(
01341       const H245_VideoCapability & pdu  
01342     );
01343     virtual BOOL OnReceivedPDU(
01344       const H245_VideoCapability & pdu,  
01345       CommandType type                   
01346     );
01348 };
01349 
01350 
01358 class H323NonStandardVideoCapability : public H323VideoCapability,
01359                                        public H323NonStandardCapabilityInfo
01360 {
01361   PCLASSINFO(H323NonStandardVideoCapability, H323VideoCapability);
01362 
01363   public:
01368     H323NonStandardVideoCapability(
01369       const BYTE * dataBlock,         
01370       PINDEX dataSize,                
01371       PINDEX comparisonOffset = 0,    
01372       PINDEX comparisonLength = P_MAX_INDEX  
01373     );
01374 
01378     H323NonStandardVideoCapability(
01379       H323EndPoint &,
01380       const BYTE * dataBlock,         
01381       PINDEX dataSize,                
01382       PINDEX comparisonOffset = 0,    
01383       PINDEX comparisonLength = P_MAX_INDEX  
01384     );
01385 
01388     H323NonStandardVideoCapability(
01389       const PString & oid,            
01390       const BYTE * dataBlock,         
01391       PINDEX dataSize,                
01392       PINDEX comparisonOffset = 0,    
01393       PINDEX comparisonLength = P_MAX_INDEX  
01394     );
01395 
01398     H323NonStandardVideoCapability(
01399       BYTE country,                   
01400       BYTE extension,                 
01401       WORD maufacturer,               
01402       const BYTE * dataBlock,         
01403       PINDEX dataSize,                
01404       PINDEX comparisonOffset = 0,    
01405       PINDEX comparisonLength = P_MAX_INDEX  
01406     );
01408 
01414     Comparison Compare(const PObject & obj) const;
01416 
01425     virtual unsigned GetSubType() const;
01427 
01438     virtual BOOL OnSendingPDU(
01439       H245_VideoCapability & pdu  
01440     ) const;
01441 
01450     virtual BOOL OnSendingPDU(
01451       H245_VideoMode & pdu  
01452     ) const;
01453 
01462     virtual BOOL OnReceivedPDU(
01463       const H245_VideoCapability & pdu  
01464     );
01465 
01468     virtual BOOL IsMatch(
01469       const PASN_Choice & subTypePDU  
01470     ) const;
01472 };
01473 
01481 class H323GenericVideoCapability : public H323VideoCapability,
01482                                    public H323GenericCapabilityInfo
01483 {
01484   PCLASSINFO(H323GenericVideoCapability, H323VideoCapability);
01485 
01486   public:
01491     H323GenericVideoCapability(
01492         const PString &capabilityId,    
01493         PINDEX maxBitRate = 0           
01494     );
01496 
01502     Comparison Compare(const PObject & obj) const;
01504 
01512     virtual unsigned GetSubType() const;
01514 
01525     virtual BOOL OnSendingPDU(
01526       H245_VideoCapability & pdu,  
01527       CommandType type             
01528     ) const;
01529 
01538     virtual BOOL OnSendingPDU(
01539       H245_VideoMode & pdu  
01540     ) const;
01541 
01550     virtual BOOL OnReceivedPDU(
01551       const H245_VideoCapability & pdu,  
01552       CommandType type                   
01553     );
01555 
01558     virtual BOOL IsMatch(
01559       const PASN_Choice & subTypePDU  
01560     ) const;
01561 };
01562 
01563 #endif
01564 
01565 
01572 class H323DataCapability : public H323Capability
01573 {
01574   PCLASSINFO(H323DataCapability, H323Capability);
01575 
01576   public:
01581     H323DataCapability(
01582       unsigned maxBitRate = 0  
01583     );
01585 
01591     virtual MainTypes GetMainType() const;
01593 
01603     virtual unsigned GetDefaultSessionID() const;
01604 
01608     virtual H323Codec * CreateCodec(
01609       H323Codec::Direction direction  
01610     ) const;
01612 
01623     virtual BOOL OnSendingPDU(
01624       H245_Capability & pdu  
01625     ) const;
01626 
01635     virtual BOOL OnSendingPDU(
01636       H245_DataType & pdu  
01637     ) const;
01638 
01647     virtual BOOL OnSendingPDU(
01648       H245_ModeElement & pdu  
01649     ) const;
01650 
01658     virtual BOOL OnSendingPDU(
01659       H245_DataApplicationCapability & pdu  
01660     ) const;
01661     virtual BOOL OnSendingPDU(
01662       H245_DataApplicationCapability & pdu, 
01663       CommandType type                      
01664     ) const;
01665 
01674     virtual BOOL OnSendingPDU(
01675       H245_DataMode & pdu  
01676     ) const = 0;
01677 
01687     virtual BOOL OnReceivedPDU(
01688       const H245_Capability & pdu  
01689     );
01690 
01698     virtual BOOL OnReceivedPDU(
01699       const H245_DataType & pdu,  
01700       BOOL receiver               
01701     );
01702 
01710     virtual BOOL OnReceivedPDU(
01711       const H245_DataApplicationCapability & pdu  
01712     );
01713     virtual BOOL OnReceivedPDU(
01714       const H245_DataApplicationCapability & pdu, 
01715       CommandType type                            
01716     );
01718 
01719   protected:
01720     unsigned maxBitRate;
01721 };
01722 
01723 
01731 class H323NonStandardDataCapability : public H323DataCapability,
01732                                       public H323NonStandardCapabilityInfo
01733 {
01734   PCLASSINFO(H323NonStandardDataCapability, H323DataCapability);
01735 
01736   public:
01741     H323NonStandardDataCapability(
01742       unsigned maxBitRate,            
01743       const BYTE * dataBlock,         
01744       PINDEX dataSize,                
01745       PINDEX comparisonOffset = 0,    
01746       PINDEX comparisonLength = P_MAX_INDEX  
01747     );
01748 
01751     H323NonStandardDataCapability(
01752       unsigned maxBitRate,            
01753       const PString & oid,            
01754       const BYTE * dataBlock,         
01755       PINDEX dataSize,                
01756       PINDEX comparisonOffset = 0,    
01757       PINDEX comparisonLength = P_MAX_INDEX  
01758     );
01759 
01762     H323NonStandardDataCapability(
01763       unsigned maxBitRate,            
01764       BYTE country,                   
01765       BYTE extension,                 
01766       WORD maufacturer,               
01767       const BYTE * dataBlock,         
01768       PINDEX dataSize,                
01769       PINDEX comparisonOffset = 0,    
01770       PINDEX comparisonLength = P_MAX_INDEX  
01771     );
01773 
01779     Comparison Compare(const PObject & obj) const;
01781 
01790     virtual unsigned GetSubType() const;
01792 
01803     virtual BOOL OnSendingPDU(
01804       H245_DataApplicationCapability & pdu  
01805     ) const;
01806 
01815     virtual BOOL OnSendingPDU(
01816       H245_DataMode & pdu  
01817     ) const;
01818 
01827     virtual BOOL OnReceivedPDU(
01828       const H245_DataApplicationCapability & pdu  
01829     );
01830 
01833     virtual BOOL IsMatch(
01834       const PASN_Choice & subTypePDU  
01835     ) const;
01837 };
01838 
01839 #ifndef NO_H323_AUDIO_CODECS
01840 
01842 // The simplest codec is the G.711 PCM codec.
01843 
01846 class H323_G711Capability : public H323AudioCapability
01847 {
01848   PCLASSINFO(H323_G711Capability, H323AudioCapability)
01849 
01850   public:
01852     enum Mode {
01854       ALaw,
01856       muLaw
01857     };
01859     enum Speed {
01861       At64k,
01863       At56k
01864     };
01865 
01870     H323_G711Capability(
01871       Mode mode = muLaw,    
01872       Speed speed = At64k   
01873     );
01875 
01880     virtual PObject * Clone() const;
01882 
01891     virtual unsigned GetSubType() const;
01892 
01895     virtual PString GetFormatName() const;
01897 
01902     virtual H323Codec * CreateCodec(
01903       H323Codec::Direction direction  
01904     ) const;
01906 
01907   protected:
01908     Mode     mode;
01909     Speed    speed;
01910 };
01911 
01912 #endif // NO_H323_AUDIO_CODECS
01913 
01914 
01916 
01919 class H245_GenericInformation;
01920 class H323_UserInputCapability : public H323Capability
01921 {
01922   PCLASSINFO(H323_UserInputCapability, H323Capability);
01923 
01924   public:
01927     enum SubTypes {
01928       BasicString,
01929       IA5String,
01930       GeneralString,
01931       SignalToneH245,
01932       HookFlashH245,
01933       SignalToneRFC2833,
01934           H249A_Navigation,
01935           H249B_Softkey,
01936           H249C_PointDevice,
01937           H249D_Modal,
01938       NumSubTypes
01939     };
01940     static const char * const SubTypeNames[NumSubTypes];
01941 
01942 #ifdef H323_H249
01943         static const char * const SubTypeOID[4];
01944 
01945         enum NavigateKeyID {
01946                 NavigateRight =1,
01947                 NavigateLeft,
01948                 NavigateUp,
01949                 NavigateDown,
01950                 NavigateActivate
01951         };
01952 #endif
01953 
01958     H323_UserInputCapability(
01959       SubTypes subType
01960     );
01962 
01967     virtual PObject * Clone() const;
01969 
01977     virtual MainTypes GetMainType() const;
01978 
01982     virtual unsigned  GetSubType()  const;
01983 
01986     virtual PString GetFormatName() const;
01988 
01996     virtual H323Channel * CreateChannel(
01997       H323Connection & connection,    
01998       H323Channel::Directions dir,    
01999       unsigned sessionID,             
02000       const H245_H2250LogicalChannelParameters * param
02002     ) const;
02003 
02006     virtual H323Codec * CreateCodec(
02007       H323Codec::Direction direction  
02008     ) const;
02009 
02010 #ifdef H323_H249
02011 
02013         static H245_GenericInformation * BuildGenericIndication(
02014                 const char * oid  
02015         );
02016 
02017         static H245_GenericParameter * BuildGenericParameter(
02018                 unsigned id,              
02019                 unsigned type,            
02020                 const PString & value     
02021         );
02022 #endif
02023 
02025 
02035     virtual BOOL OnSendingPDU(
02036       H245_Capability & pdu  
02037     ) const;
02038 
02046     virtual BOOL OnSendingPDU(
02047       H245_DataType & pdu  
02048     ) const;
02049 
02058     virtual BOOL OnSendingPDU(
02059       H245_ModeElement & pdu  
02060     ) const;
02061 
02071     virtual BOOL OnReceivedPDU(
02072       const H245_Capability & pdu  
02073     );
02074 
02082     virtual BOOL OnReceivedPDU(
02083       const H245_DataType & pdu,  
02084       BOOL receiver               
02085     );
02086 
02095     virtual BOOL IsUsable(
02096       const H323Connection & connection
02097     ) const;
02099 
02100     static void AddAllCapabilities(
02101       H323Capabilities & capabilities,        
02102       PINDEX descriptorNum,   
02103       PINDEX simultaneous     
02104     );
02105 
02106   protected:
02107     SubTypes subType;
02108     
02109 #ifdef H323_H249
02110         PString subTypeOID;
02111 #endif
02112 
02113 };
02114 
02115 
02116 
02118 
02119 PLIST(H323CapabilitiesList, H323Capability);
02120 
02121 PARRAY(H323CapabilitiesListArray, H323CapabilitiesList);
02122 
02123 class H323SimultaneousCapabilities : public H323CapabilitiesListArray
02124 {
02125   PCLASSINFO(H323SimultaneousCapabilities, H323CapabilitiesListArray);
02126   public:
02127     BOOL SetSize(PINDEX newSize);
02128 };
02129 
02130 
02131 PARRAY(H323CapabilitiesSetArray, H323SimultaneousCapabilities);
02132 
02133 
02134 class H323CapabilitiesSet : public H323CapabilitiesSetArray
02135 {
02136   PCLASSINFO(H323CapabilitiesSet, H323CapabilitiesSetArray);
02137   public:
02139     BOOL SetSize(PINDEX newSize);
02140 };
02141 
02142 
02145 class H323Capabilities : public PObject
02146 {
02147     PCLASSINFO(H323Capabilities, PObject);
02148   public:
02153     H323Capabilities();
02154 
02157     H323Capabilities(
02158       const H323Connection & connection,      
02159       const H245_TerminalCapabilitySet & pdu  
02160     );
02161 
02166     H323Capabilities(
02167       const H323Capabilities & original 
02168     );
02169 
02174     H323Capabilities & operator=(
02175       const H323Capabilities & original 
02176     );
02178 
02183     void PrintOn(
02184       ostream & strm    
02185     ) const;
02187 
02192     PINDEX GetSize() const { return table.GetSize(); }
02193 
02196     H323Capability & operator[](PINDEX i) const { return table[i]; }
02197 
02218     PINDEX SetCapability(
02219       PINDEX descriptorNum, 
02220       PINDEX simultaneous,  
02221       H323Capability * cap  
02222     );
02223 
02228     PINDEX AddAllCapabilities(
02229       PINDEX descriptorNum, 
02230       PINDEX simultaneous,  
02231       const PString & name  
02232     );
02233     PINDEX AddAllCapabilities(
02234       H323EndPoint &,
02235       PINDEX descriptorNum, 
02236       PINDEX simultaneous,  
02237       const PString & name  
02238     )
02239     { return AddAllCapabilities(descriptorNum, simultaneous, name); }
02240 
02249     void Add(
02250       H323Capability * capability   
02251     );
02252 
02259     H323Capability * Copy(
02260       const H323Capability & capability   
02261     );
02262 
02267     void Remove(
02268       H323Capability * capability   
02269     );
02270 
02275     void Remove(
02276       const PString & formatName   
02277     );
02278 
02282     void Remove(
02283       const PStringArray & formatNames  
02284     );
02285 
02288     void RemoveAll();
02289 
02290 #ifdef H323_VIDEO
02291 
02296         BOOL SetVideoFrameSize(H323Capability::CapabilityFrameSize frameSize, 
02297                                   int frameUnits
02298         );
02299 #endif
02300 
02308     H323Capability * FindCapability(
02309       unsigned capabilityNumber
02310     ) const;
02311 
02327     H323Capability * FindCapability(
02328       const PString & formatName, 
02329       H323Capability::CapabilityDirection direction = H323Capability::e_Unknown
02331     ) const;
02332 
02338     H323Capability * FindCapability(
02339       H323Capability::CapabilityDirection direction 
02340     ) const;
02341 
02349     H323Capability * FindCapability(
02350       const H323Capability & capability 
02351     ) const;
02352 
02358     H323Capability * FindCapability(
02359       const H245_Capability & cap  
02360     ) const;
02361 
02367     H323Capability * FindCapability(
02368       const H245_DataType & dataType  
02369     ) const;
02370 
02376     H323Capability * FindCapability(
02377       const H245_ModeElement & modeElement  
02378     ) const;
02379 
02385     H323Capability * FindCapability(
02386       H323Capability::MainTypes mainType, 
02387       const PASN_Choice & subTypePDU,     
02388       const unsigned * translationTable   
02389     ) const;
02390 
02396     H323Capability * FindCapability(
02397       H323Capability::MainTypes mainType, 
02398       unsigned subType = UINT_MAX         
02399     ) const;
02400 
02403     void BuildPDU(
02404       const H323Connection & connection,  
02405       H245_TerminalCapabilitySet & pdu    
02406     ) const;
02407 
02410     BOOL Merge(
02411       const H323Capabilities & newCaps
02412     );
02413 
02420     void Reorder(
02421       const PStringArray & preferenceOrder  
02422     );
02423 
02426     BOOL IsAllowed(
02427       const H323Capability & capability
02428     );
02429 
02432     BOOL IsAllowed(
02433       unsigned capabilityNumber
02434     );
02435 
02438     BOOL IsAllowed(
02439       const H323Capability & capability1,
02440       const H323Capability & capability2
02441     );
02442 
02445     BOOL IsAllowed(
02446       unsigned capabilityNumber1,
02447       unsigned capabilityNumber2
02448     );
02450 
02451   protected:
02452     H323CapabilitiesList table;
02453     H323CapabilitiesSet  set;
02454 };
02455 
02457 
02458 #ifdef H323_VIDEO
02459 #ifdef H323_H239
02460 
02461 class H323ExtendedVideoCapability : public H323Capability,
02462                                       public H323GenericCapabilityInfo
02463 {
02464   PCLASSINFO(H323ExtendedVideoCapability, H323Capability);
02465 
02466   public:
02471     H323ExtendedVideoCapability(
02472       const PString &capabilityId   
02473         );
02475 
02481     Comparison Compare(const PObject & obj) const;
02483 
02486 
02487         virtual PString GetFormatName() const
02488     { return "H.239";}
02489 
02493     virtual H323Capability::MainTypes GetMainType() const;
02494 
02501         virtual unsigned GetSubType() const;
02503     
02504 
02515     virtual BOOL OnSendingPDU(
02516       H245_Capability & pdu  
02517     ) const;
02518 
02528     virtual BOOL OnReceivedPDU(
02529       const H245_Capability & pdu  
02530     );
02531 
02540     virtual BOOL OnReceivedPDU(
02541       const H245_GenericCapability & cap,  
02542       CommandType type                     
02543     );
02544 
02552     virtual BOOL OnSendingPDU(
02553       H245_GenericCapability & cap,  
02554       CommandType type               
02555     ) const;
02556 
02564     virtual BOOL OnSendingPDU(
02565       H245_DataType & pdu  
02566     ) const;
02567 
02575     virtual BOOL OnSendingPDU(
02576       H245_ModeElement & pdu  
02577     ) const;
02578 
02586     virtual BOOL OnReceivedPDU(
02587       const H245_DataType & pdu,  
02588       BOOL receiver               
02589     );
02590 
02593     virtual BOOL IsMatch(
02594       const PASN_Choice & subTypePDU  
02595     ) const;
02597 
02602     virtual H323Channel * CreateChannel(
02603       H323Connection & connection,    
02604       H323Channel::Directions dir,    
02605       unsigned sessionID,             
02606       const H245_H2250LogicalChannelParameters * param
02608     ) const;
02609 
02611     H323Capability & operator[](PINDEX i);
02612 
02614         PINDEX GetSize() { return table.GetSize(); }
02615 
02618     static void AddAllCapabilities(
02619       H323Capabilities &  basecapabilities,  
02620       PINDEX descriptorNum,   
02621       PINDEX simultaneous     
02622     );
02624 
02625 protected:
02626         static H323Capabilities localCapabilities;   
02627         H323CapabilitiesList table;                  
02628 
02629 };
02630 
02631 
02633 //
02634 // Class for handling extended video capabilities ie H.239
02635 //
02636 
02637 class H323CodecExtendedVideoCapability : public H323ExtendedVideoCapability
02638 {
02639   PCLASSINFO(H323CodecExtendedVideoCapability, H323ExtendedVideoCapability);
02640   public:
02641     H323CodecExtendedVideoCapability();
02642 
02643     virtual PObject * Clone() const
02644     { return new H323CodecExtendedVideoCapability(*this); }
02645  
02646     virtual H323Codec * CreateCodec(H323Codec::Direction /*direction*/) const
02647     { return NULL; }
02648 
02649         virtual BOOL SetMaxFrameSize(CapabilityFrameSize /*framesize*/, int /*frameunits*/) 
02650         { return TRUE; };
02651 
02652     virtual BOOL OnReceivedGenericPDU(
02653                 const H245_GenericCapability &pdu
02654         );
02655 
02656     virtual BOOL OnSendingPDU(
02657       H245_VideoCapability & pdu  
02658         ) const;
02659 
02660     virtual BOOL OnReceivedPDU(
02661       const H245_VideoCapability & pdu  
02662         );
02663 
02664 };
02665 
02666 typedef PFactory<H323Capability, std::string> H323ExtendedVideoFactory;
02667 
02668 #endif  // H323_H239
02669 #endif  // H323_VIDEO
02670 
02672 
02673 #ifdef H323_H230
02674 class H323_ConferenceControlCapability : public H323Capability
02675 {
02676   PCLASSINFO(H323_ConferenceControlCapability, H323Capability);
02677 
02678   public:
02683     H323_ConferenceControlCapability();
02684 
02685         H323_ConferenceControlCapability( 
02686                                BOOL chairControls,
02687                        BOOL T124Extension
02688                                    );
02690 
02695     virtual PObject * Clone() const;
02697 
02702     virtual MainTypes GetMainType() const;
02703 
02707     virtual unsigned  GetSubType()  const;
02708 
02711     virtual PString GetFormatName() const;
02713 
02721     virtual H323Channel * CreateChannel(
02722       H323Connection & connection,    
02723       H323Channel::Directions dir,    
02724       unsigned sessionID,             
02725       const H245_H2250LogicalChannelParameters * param
02727     ) const;
02728 
02731     virtual H323Codec * CreateCodec(
02732       H323Codec::Direction direction  
02733     ) const;
02734 
02736 
02746     virtual BOOL OnSendingPDU(
02747       H245_Capability & pdu  
02748     ) const;
02749 
02757     virtual BOOL OnSendingPDU(
02758       H245_DataType & pdu  
02759     ) const;
02760 
02769     virtual BOOL OnSendingPDU(
02770       H245_ModeElement & pdu  
02771     ) const;
02772 
02782     virtual BOOL OnReceivedPDU(
02783       const H245_Capability & pdu  
02784     );
02785 
02793     virtual BOOL OnReceivedPDU(
02794       const H245_DataType & pdu,  
02795       BOOL receiver               
02796     );
02798 
02803         BOOL SupportChairControls() {  return chairControlCapability;  }
02804 
02808         BOOL SupportExtControls() {  return nonStandardExtension;  }
02810 
02811   protected:
02812           BOOL chairControlCapability;
02813           BOOL nonStandardExtension;
02814 
02815 };
02816 #endif // H323_H230
02817 
02818 
02820 
02821 typedef PFactory<H323Capability, std::string> H323CapabilityFactory;
02822 
02823 #define H323_REGISTER_CAPABILITY(cls, capName)   static H323CapabilityFactory::Worker<cls> cls##Factory(capName, true); \
02824 
02825 #define H323_DEFINE_CAPABILITY(cls, capName, fmtName) \
02826 class cls : public H323Capability { \
02827   public: \
02828     cls() : H323Capability() { } \
02829     PString GetFormatName() const \
02830     { return fmtName; } \
02831 }; \
02832 H323_REGISTER_CAPABILITY(cls, capName) \
02833 
02834 #define H323_DEFINE_CAPABILITY_FROM(cls, ancestor, capName, fmtName) \
02835 class cls : public ancestor { \
02836   public: \
02837     cls() : ancestor() { } \
02838     PString GetFormatName() const \
02839     { return fmtName; } \
02840 }; \
02841 H323_REGISTER_CAPABILITY(cls, capName) \
02842 
02843 #endif // __OPAL_H323CAPS_H
02844 
02845 

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