h245caps.h
资源名称:h323.zip [点击查看]
上传用户:hnnddl
上传日期:2007-01-06
资源大小:3580k
文件大小:56k
源码类别:
IP电话/视频会议
开发平台:
WINDOWS
- /*
- * $Revision: 1.6 $
- * $Date: 1998/04/03 15:16:32 $
- */
- ////////////////////////////////////////////////////////////////
- // Copyright (c) 1996,97 Lucent Technologies //
- // All Rights Reserved //
- // //
- // THIS IS UNPUBLISHED //
- // PROPRIETARY SOURCE //
- // CODE OF Lucent Technologies //
- // AND elemedia //
- // //
- // The copyright notice above does not evidence any //
- // actual or intended publication of such source code//
- ////////////////////////////////////////////////////////////////
- //
- ///////////////////////////////////////////////////////////////
- // File: h245caps.h //
- // //
- // 11_Jul_1997 Unixware port. //
- // removed virtual keyword from operator = //
- // 10_Dec_1997 Destructor made virtual //
- // //
- ///////////////////////////////////////////////////////////////
- #if (!defined(__H245SIGCAPS_H__))
- #define __H245SIGCAPS_H__
- #include "util/platform.h"
- #include "api/h245types.h"
- // The Capability Types...
- enum H245SigCapType
- {
- CAP_NONSTD,
- CAP_AUDIO,
- CAP_VIDEO,
- CAP_DATA,
- CAP_CONF
- };
- // The various Audio capability types...
- enum H245SigAudProt
- {
- AUD_NONSTD = 1,
- AUD_G711ALAW64K = 2,
- AUD_G711ALAW56K = 3,
- AUD_G711ULAW64K = 4,
- AUD_G711ULAW56K = 5,
- AUD_G722_64K = 6,
- AUD_G722_56K = 7,
- AUD_G722_48K = 8,
- AUD_G7231 = 9,
- AUD_G728 = 10,
- AUD_G729 = 11,
- AUD_G729A = 12,
- AUD_IS11172 = 13,
- AUD_IS13818 = 14,
- AUD_G729AWSILSUPP = 15
- };
- // The various video capability types.
- enum H245SigVidProt
- {
- VID_NONSTD = 1,
- VID_H261 = 2,
- VID_H262 = 3,
- VID_H263 = 4,
- VID_IS11172 = 5
- };
- // The various data application capability types.
- enum H245SigDataProt
- {
- DAT_NONSTD = 1,
- DAT_T120 = 2,
- DAT_DSM_CC = 3,
- DAT_USERDATA = 4,
- DAT_T84 = 5,
- DAT_T434 = 6,
- DAT_H224 = 7,
- DAT_NLPID = 8,
- DAT_DSVDCTRL = 9,
- DAT_H222DATAPTNG = 10,
- DAT_T84RESTRICTED = 11 /*,*/ // <PORT1>
- };
- // The various data application capability protocol types.
- enum H245SigDataProtType
- {
- DPT_NONSTD = 1,
- DPT_V14BUFFERED = 2,
- DPT_V42LAPM = 3,
- DPT_HDLCFRAMETUNN = 4,
- DPT_H310SEPVCSTK = 5,
- DPT_H310SINGLEVCSTK = 6,
- DPT_TRANSPARENT = 7,
- DPT_SEGANDREASSEMBLY = 8,
- DPT_HDLCFRAMETUNNWSAR = 9,
- DPT_V120 = 10,
- DPT_SEPARATELANSTACK = 11,
- DPT_INVALID
- };
- // The T84 protocol data application capability types.
- enum H245SigDataT84Prot
- {
- T84_UNRESTRICTED = 1,
- T84_RESTRICTED = 2
- };
- // The only nonstatandard capability type.
- enum H245SigNonStdProt
- {
- NSP_NONSTD = 1 /*,*/ // <PORT1>
- };
- // The various capability modes..
- enum H245SigCapMode
- {
- CPM_XX,
- CPM_NS,
- CPM_RX, // Receive only
- CPM_TX, // Transmit only
- CPM_RW // Receive and Transmit
- };
- // Forward Class Declarations
- class H245Capability;
- class H245SigCapTable;
- class H245SigNonStdParam;
- class H245AudioCapability;
- class H245VideoCapability;
- class H245NonStandardParameter;
- class H245CapabilityDescriptor;
- class H245DataApplicationCapability;
- class Logger;
- struct _H245T84Profile;
- struct _H245DataProtocolCapability;
- struct _H245H225Capability;
- struct _H245H261VideoCapability;
- struct _H245H263VideoCapability;
- struct _H245IS11172AudioCapability;
- // Internal Range checking class
- class DLLEXPORT H245SigRange
- {
- // Data
- protected: // <PORT1>
- unsigned int min;
- unsigned int max;
- // Methods
- protected:
- ProtReturnCode Check(unsigned int value);
- public:
- H245SigRange(unsigned int newMin, unsigned int newMax);
- };
- // Internal Range checking integer class
- class DLLEXPORT H245SigInt : protected H245SigRange // <PORT1>
- {
- // Data
- private:
- unsigned int value;
- // Methods
- public:
- H245SigInt(unsigned int min, unsigned int max);
- ProtReturnCode Set(unsigned int);
- ProtReturnCode Get(unsigned int &);
- };
- // Internal Range checking optional integer class
- class DLLEXPORT H245SigOptInt : protected H245SigRange // <PORT1>
- {
- // Data
- private:
- unsigned int *value;
- // Methods
- public:
- H245SigOptInt(unsigned int min, unsigned int max);
- H245SigOptInt(H245SigOptInt &);
- virtual ~H245SigOptInt();
- H245SigOptInt& operator=( H245SigOptInt &);
- ProtReturnCode Set(unsigned int);
- ProtReturnCode Get(unsigned int &) ;
- ProtReturnCode Reset();
- };
- //
- // abstraction of capability
- //
- // This is an abstract base class for all the H245Sig Capability Classes.
- // It should never be instantiated and is intended for use only to define
- // interfaces and act as a polymorphic base.
- //
- class DLLEXPORT H245SigCap
- {
- // Friends
- friend class H245SigCapTable;
- // Data
- private:
- int prot;
- int type;
- // Methods
- private:
- virtual ProtReturnCode GetCapability(H245Capability &, int mode) = 0;
- virtual ProtReturnCode SetCapability(H245Capability &) = 0;
- protected:
- H245SigCap(int type, int prot);
- public:
- virtual ~H245SigCap();
- // GetType method
- //
- // This method returns type information about the capability
- // class that is being referenced.
- // Parameter: type returns the basic type of the class (Audio, Video etc.)
- // Parameter: prot returns the actual protocol or sub-type of the class (G711, H263 etc.)
- virtual ProtReturnCode GetType(int &type, int &prot) ;
- // Class Factory method.
- //
- // This is a static class method implementing a virtual constructor.
- // It takes parameters representing the type and protocol of the required class,
- // and creates a new instance of that class.
- // The user is responsible for freeing the memory created here.
- static ProtReturnCode Factory(H245SigCap *&, int type, int prot);
- // For Protocol internal use..
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Non Standard Capabilities class
- //
- // This Class represents the generic H245 non-standard class and is
- // intended for access by the user.
- // It is completely independent of the non standard audio and video classes,
- // and is intended to cater for non-standard and new protocol types.
- //
- class DLLEXPORT H245SigNonStdCap : public H245SigCap
- {
- // Data
- private:
- H245NonStandardParameter *data;
- // Methods
- private:
- virtual ProtReturnCode GetCapability(H245Capability &, int mode);
- virtual ProtReturnCode SetCapability(H245Capability &);
- friend class H245SigCap;
- static ProtReturnCode Factory(H245SigCap *&, int prot);
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigNonStdCap();
- H245SigNonStdCap(H245SigNonStdCap &);
- virtual ~H245SigNonStdCap();
- H245SigNonStdCap &operator =(H245SigNonStdCap &);
- // Data access methods
- //
- // These methods are used to get and set the internal data of the class.
- // They both take references to H245SigNonStdParam types and hence
- // the user is responsible for allocation/de-allocation of the parameters.
- virtual ProtReturnCode GetData(H245SigNonStdParam &) ;
- virtual ProtReturnCode SetData(H245SigNonStdParam &);
- // For Protocol internal use..
- virtual H245NonStandardParameter *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245NonStandardParameter *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Abstraction of Audio Capability
- //
- // This is a base class for all the H245Sig Audio Capability Classes.
- // It should never be instantiated.
- //
- class DLLEXPORT H245SigAudCap : public H245SigCap
- {
- // Data
- private:
- H245AudioCapability *data;
- // Methods
- private:
- virtual ProtReturnCode GetCapability(H245Capability &, int mode);
- virtual ProtReturnCode SetCapability(H245Capability &);
- friend class H245SigCap;
- static ProtReturnCode Factory(H245SigCap *&, int prot);
- protected:
- H245SigAudCap(int);
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigAudCap(H245SigAudCap&);
- virtual ~H245SigAudCap();
- H245SigAudCap& operator=(H245SigAudCap&);
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv();
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Abstraction of Video Capability
- //
- // This is a base class for all the H245Sig Video Capability Classes.
- // It should never be instantiated.
- //
- class DLLEXPORT H245SigVidCap : public H245SigCap
- {
- // Data
- private:
- H245VideoCapability *data;
- // Methods
- private:
- virtual ProtReturnCode GetCapability(H245Capability &, int mode);
- virtual ProtReturnCode SetCapability(H245Capability &);
- friend class H245SigCap;
- static ProtReturnCode Factory(H245SigCap *&, int prot);
- protected:
- H245SigVidCap(int);
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigVidCap(H245SigVidCap&);
- virtual ~H245SigVidCap();
- H245SigVidCap& operator=(H245SigVidCap&);
- // For Protocol internal use..
- virtual H245VideoCapability *GetPriv();
- virtual ProtReturnCode SetPriv(H245VideoCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Abstraction of Data Application Capability
- //
- // This class represents the H245Sig Data Application Capability Class.
- // It should never be instantiated.
- //
- class DLLEXPORT H245SigDataCap : public H245SigCap
- {
- // Data
- private:
- H245DataApplicationCapability *data;
- H245SigInt maxBitRate;
- // Methods
- private:
- virtual ProtReturnCode GetCapability(H245Capability &, int mode);
- virtual ProtReturnCode SetCapability(H245Capability &);
- friend class H245SigCap;
- static ProtReturnCode Factory(H245SigCap *&, int prot);
- protected:
- H245SigDataCap(int);
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigDataCap(H245SigDataCap&);
- ~H245SigDataCap();
- H245SigDataCap& operator=(H245SigDataCap&);
- // Data access methods
- //
- // These methods are used to get and set the internal data
- // common to all the derived classes.
- // The Set passes the data in by value, while the Get passes
- // the value to be returned by reference.
- ProtReturnCode GetMaxBitRate(unsigned int &);
- ProtReturnCode SetMaxBitRate(unsigned int);
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv();
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Non Standard Audio Capabilities class
- //
- // This Class represents the H245 non-standard Audio class and is
- // intended for access by the user.
- // It is an audio class intended to cater for proprietary/new audio protocols.
- //
- class DLLEXPORT H245SigNonStdAudCap : public H245SigAudCap
- {
- // Data
- private:
- H245NonStandardParameter *data;
- // Methods
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigNonStdAudCap();
- H245SigNonStdAudCap(H245SigNonStdAudCap &);
- virtual ~H245SigNonStdAudCap();
- H245SigNonStdAudCap& operator=(H245SigNonStdAudCap &);
- // Data access methods
- //
- // These methods are used to get and set the internal data of the class.
- // They both take references to H245SigNonStdParam types and hence
- // the user is responsible for allocation/de-allocation of the parameters.
- virtual ProtReturnCode SetData(H245SigNonStdParam &);
- virtual ProtReturnCode GetData(H245SigNonStdParam &) ;
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv();
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Simple audio base class - for internal use only
- //
- // This is a base class for the simple H245Sig Audio Capability Classes that
- // share similar implementation details.
- // It should never be instantiated.
- //
- class DLLEXPORT H245SigSimAudCap : public H245SigAudCap
- {
- // Data
- protected:
- H245SigInt framesPerPkt;
- // Methods
- protected:
- H245SigSimAudCap(int);
- public:
- // Data access methods
- //
- // These methods are used to get and set the internal data of the
- // derived classes.
- // The Set passes the types in by value, while the Get passes
- // the value to be returned by reference.
- ProtReturnCode GetFramesPerPkt(unsigned int &);
- ProtReturnCode SetFramesPerPkt(unsigned int);
- // This method is used to dump the internal data values of the class
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G711Ulaw64k audio class
- //
- // This Class represents the H245 G711Ulaw64k Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG711Ulaw64kCap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG711Ulaw64kCap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- // For Protocol internal use..
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G711Alaw64k audio class
- //
- // This Class represents the H245 G711Alaw64k Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG711Alaw64kCap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG711Alaw64kCap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G711Ulaw56k audio class
- //
- // This Class represents the H245 G711Ulaw56k Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG711Ulaw56kCap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG711Ulaw56kCap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G711Alaw56k audio class
- //
- // This Class represents the H245 G711Alaw56k Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG711Alaw56kCap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG711Alaw56kCap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G722_64k audio class
- //
- // This Class represents the H245 G722_64k Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG722_64kCap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG722_64kCap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G722_56k audio class
- //
- // This Class represents the H245 G722_56k Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG722_56kCap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG722_56kCap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G722_48k audio class
- //
- // This Class represents the H245 G722_48k Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG722_48kCap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG722_48kCap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G7231 audio class
- //
- // This Class represents the H245 G7231 Audio class and is
- // intended for access by the user.
- //
- // It is derived directly from the H245SigAudCap class and
- // implements its own data accessing methods.
- //
- class DLLEXPORT H245SigG7231Cap : public H245SigAudCap
- {
- // Data
- private:
- H245SigInt audioFrames;
- boolean suppression;
- // Methods
- public:
- H245SigG7231Cap();
- // Data access methods
- //
- // These methods are used to get and set the internal data
- // of the class.
- // The Set passes the types in by value, while the Get passes
- // the value to be returned by reference.
- ProtReturnCode SetMaxFrames(unsigned int);
- ProtReturnCode GetMaxFrames(unsigned int &);
- ProtReturnCode SetSilenceSupp(boolean);
- ProtReturnCode GetSilenceSupp(boolean &) ;
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G728 audio class
- //
- // This Class represents the H245 G728 Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG728Cap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG728Cap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv();
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G729 audio class
- //
- // This Class represents the H245 G729 Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG729Cap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG729Cap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv();
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G729AnnexA audio class
- //
- // This Class represents the H245 G729AnnexA Audio class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG729AnnexACap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG729AnnexACap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv();
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // IS11172AudioCapability audio class
- //
- // This Class represents the H245 IS11172AudioCapability
- // Audio class and is intended for access by the user.
- //
- // It is derived directly from the H245SigAudCap class and
- // implements its own data accessing methods.
- //
- class DLLEXPORT H245SigIS11172AudCap : public H245SigAudCap
- {
- // Data
- private:
- boolean audioLayer1;
- boolean audioLayer2;
- boolean audioLayer3;
- boolean audioSampling32k;
- boolean audioSampling44k1;
- boolean audioSampling48k;
- boolean singleChannel;
- boolean twoChannels;
- H245SigInt bitRate;
- // Methods
- public:
- H245SigIS11172AudCap();
- // Data access methods
- //
- // These methods are used to get and set the internal data
- // of the class.
- // The Set passes the types in by value, while the Get passes
- // the value to be returned by reference.
- ProtReturnCode SetAudioLayer1(boolean);
- ProtReturnCode GetAudioLayer1(boolean &) ;
- ProtReturnCode SetAudioLayer2(boolean);
- ProtReturnCode GetAudioLayer2(boolean &) ;
- ProtReturnCode SetAudioLayer3(boolean);
- ProtReturnCode GetAudioLayer3(boolean &) ;
- ProtReturnCode SetAudioSampling32k(boolean);
- ProtReturnCode GetAudioSampling32k(boolean &) ;
- ProtReturnCode SetAudioSampling44k1(boolean);
- ProtReturnCode GetAudioSampling44k1(boolean &) ;
- ProtReturnCode SetAudioSampling48k(boolean);
- ProtReturnCode GetAudioSampling48k(boolean &) ;
- ProtReturnCode SetSingleChannel(boolean);
- ProtReturnCode GetSingleChannel(boolean &) ;
- ProtReturnCode SetTwoChannels(boolean);
- ProtReturnCode GetTwoChannels(boolean &) ;
- ProtReturnCode SetBitRate(unsigned int);
- ProtReturnCode GetBitRate(unsigned int &) ;
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // G729AnnexAwithSilenceSuppression audio class
- //
- // This Class represents the H245 G729AnnexAwithSilenceSuppression
- // Audio class and is intended for access by the user.
- //
- // It is derived from the H245SigSimAudCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigG729AnnexAwSSCap : public H245SigSimAudCap
- {
- // Methods
- public:
- H245SigG729AnnexAwSSCap();
- // For Protocol internal use..
- virtual H245AudioCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245AudioCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Non Standard Video Capabilities class
- //
- // This Class represents the H245 non-standard Video class and is
- // intended for access by the user.
- // It is an audio class intended to cater for proprietary/new video protocols.
- //
- class DLLEXPORT H245SigNonStdVidCap : public H245SigVidCap
- {
- // Data
- private:
- H245NonStandardParameter *data;
- // Methods
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigNonStdVidCap();
- H245SigNonStdVidCap(H245SigNonStdVidCap &);
- virtual ~H245SigNonStdVidCap();
- H245SigNonStdVidCap& operator=(H245SigNonStdVidCap &);
- // Data access methods
- //
- // These methods are used to get and set the internal data of the class.
- // They both take references to H245SigNonStdParam types and hence
- // the user is responsible for allocation/de-allocation of the parameters.
- virtual ProtReturnCode GetData(H245SigNonStdParam &) ;
- virtual ProtReturnCode SetData(H245SigNonStdParam &);
- // For Protocol internal use..
- virtual H245VideoCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245VideoCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // H261 video class
- //
- // This Class represents the H245 H261 Video class and is
- // intended for access by the user.
- //
- class DLLEXPORT H245SigH261VidCap : public H245SigVidCap
- {
- // Data
- private:
- H245SigOptInt qcifMPI;
- H245SigOptInt cifMPI;
- boolean tradeOff;
- boolean stillImageTrans;
- H245SigInt maxBitRate;
- // Methods
- public:
- H245SigH261VidCap();
- // Data access methods
- //
- // These methods are used to get, set and reset (where applicable)
- // the internal data of the class.
- // The Set passes the types in by value, while the Get passes
- // the value to be returned by reference.
- // The Reset methods are used to remove optional parameters
- // (reset by default in the constructor) and take no parameters.
- ProtReturnCode SetQcifMPI(unsigned int);
- ProtReturnCode GetQcifMPI(unsigned int &);
- ProtReturnCode ResetQcifMPI();
- ProtReturnCode SetCifMPI(unsigned int);
- ProtReturnCode GetCifMPI(unsigned int &);
- ProtReturnCode ResetCifMPI();
- ProtReturnCode SetTemporalSpatialTradeOff(boolean);
- ProtReturnCode GetTemporalSpatialTradeOff(boolean &);
- ProtReturnCode SetMaxBitRate(unsigned int);
- ProtReturnCode GetMaxBitRate(unsigned int &);
- ProtReturnCode SetStillImageTransmission(boolean);
- ProtReturnCode GetStillImageTransmission(boolean &);
- // For Protocol internal use..
- virtual H245VideoCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245VideoCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // H261 video class
- //
- // This Class represents the H245 H261 Video class and is
- // intended for access by the user.
- //
- class DLLEXPORT H245SigH263VidCap : public H245SigVidCap
- {
- // Data
- private:
- boolean unrestrictedVector;
- boolean arithmeticCoding;
- boolean advancedPrediction;
- boolean errorCompensation;
- boolean pbFrames;
- boolean tradeOff;
- H245SigInt maxBitRate;
- H245SigOptInt sqcifMPI;
- H245SigOptInt qcifMPI;
- H245SigOptInt cifMPI;
- H245SigOptInt cif4MPI;
- H245SigOptInt cif16MPI;
- H245SigOptInt hrd_B;
- H245SigOptInt bppMaxKb;
- H245SigOptInt slowSqcifMPI;
- H245SigOptInt slowQcifMPI;
- H245SigOptInt slowCifMPI;
- H245SigOptInt slowCif4MPI;
- H245SigOptInt slowCif16MPI;
- // Methods
- public:
- H245SigH263VidCap();
- // Data access methods
- //
- // These methods are used to get, set and reset (where applicable)
- // the internal data of the class.
- // The Set passes the types in by value, while the Get passes
- // the value to be returned by reference.
- // The Reset methods are used to remove optional parameters
- // (reset by default in the constructor) and take no parameters.
- ProtReturnCode SetSqcifMPI(unsigned int);
- ProtReturnCode GetSqcifMPI(unsigned int &) ;
- ProtReturnCode ResetSqcifMPI();
- ProtReturnCode SetQcifMPI(unsigned int);
- ProtReturnCode GetQcifMPI(unsigned int &) ;
- ProtReturnCode ResetQcifMPI();
- ProtReturnCode SetCifMPI(unsigned int);
- ProtReturnCode GetCifMPI(unsigned int &) ;
- ProtReturnCode ResetCifMPI();
- ProtReturnCode SetCif4MPI(unsigned int);
- ProtReturnCode GetCif4MPI(unsigned int &) ;
- ProtReturnCode ResetCif4MPI();
- ProtReturnCode SetCif16MPI(unsigned int);
- ProtReturnCode GetCif16MPI(unsigned int &) ;
- ProtReturnCode ResetCif16MPI();
- ProtReturnCode SetMaxBitRate(unsigned int);
- ProtReturnCode GetMaxBitRate(unsigned int &) ;
- ProtReturnCode SetUnrestrictedVector(boolean);
- ProtReturnCode GetUnrestrictedVector(boolean &) ;
- ProtReturnCode SetArithmeticCoding(boolean);
- ProtReturnCode GetArithmeticCoding(boolean &) ;
- ProtReturnCode SetAdvancedPrediction(boolean);
- ProtReturnCode GetAdvancedPrediction(boolean &) ;
- ProtReturnCode SetPbFrames(boolean);
- ProtReturnCode GetPbFrames(boolean &) ;
- ProtReturnCode SetTempSpatialTradeOffCap(boolean);
- ProtReturnCode GetTempSpatialTradeOffCap(boolean &) ;
- ProtReturnCode SetHrd_B(unsigned int);
- ProtReturnCode GetHrd_B(unsigned int &);
- ProtReturnCode ResetHrd_B();
- ProtReturnCode SetBppMaxKb(unsigned int);
- ProtReturnCode GetBppMaxKb(unsigned int &);
- ProtReturnCode ResetBppMaxKb();
- ProtReturnCode SetSlowSqcifMPI(unsigned int);
- ProtReturnCode GetSlowSqcifMPI(unsigned int &);
- ProtReturnCode ResetSlowSqcifMPI();
- ProtReturnCode SetSlowQcifMPI(unsigned int);
- ProtReturnCode GetSlowQcifMPI(unsigned int &);
- ProtReturnCode ResetSlowQcifMPI();
- ProtReturnCode SetSlowCifMPI(unsigned int);
- ProtReturnCode GetSlowCifMPI(unsigned int &);
- ProtReturnCode ResetSlowCifMPI();
- ProtReturnCode SetSlowCif4MPI(unsigned int);
- ProtReturnCode GetSlowCif4MPI(unsigned int &);
- ProtReturnCode ResetSlowCif4MPI();
- ProtReturnCode SetSlowCif16MPI(unsigned int);
- ProtReturnCode GetSlowCif16MPI(unsigned int &);
- ProtReturnCode ResetSlowCif16MPI();
- ProtReturnCode SetErrorCompensation(boolean);
- ProtReturnCode GetErrorCompensation(boolean &) ;
- // For Protocol internal use..
- virtual H245VideoCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245VideoCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Non Standard Data Application Capabilities class
- //
- // This Class represents the H245 non-standard Data Application class and is
- // intended for access by the user.
- // It is a data class intended to cater for proprietary/new data protocols.
- //
- class DLLEXPORT H245SigNonStdDataCap : public H245SigDataCap
- {
- // Data
- private:
- H245NonStandardParameter *data;
- // Methods
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigNonStdDataCap();
- H245SigNonStdDataCap(H245SigNonStdDataCap &);
- virtual ~H245SigNonStdDataCap();
- H245SigNonStdDataCap& operator=(H245SigNonStdDataCap &);
- // Data access methods
- //
- // These methods are used to get and set the internal data of the class.
- // They both take references to H245SigNonStdParam types and hence
- // the user is responsible for allocation/de-allocation of the parameters.
- virtual ProtReturnCode SetData(H245SigNonStdParam &);
- virtual ProtReturnCode GetData(H245SigNonStdParam &) ;
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv();
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Abstraction of Data Protocol Capability
- //
- // This class represents the H245Sig Data Protocol Capability Class.
- // It should never be instantiated.
- //
- class DLLEXPORT H245SigComDataProtCap
- {
- // Data
- private:
- _H245DataProtocolCapability *data;
- H245SigNonStdParam nonstd;
- // Methods
- protected:
- H245SigComDataProtCap(int prot);
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigComDataProtCap(H245SigComDataProtCap &);
- virtual ~H245SigComDataProtCap();
- H245SigComDataProtCap& operator=(H245SigComDataProtCap &);
- // For Protocol internal use..
- ProtReturnCode SetData(int, H245SigNonStdParam &);
- ProtReturnCode GetData(int &, H245SigNonStdParam &);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- virtual _H245DataProtocolCapability *GetPriv();
- virtual ProtReturnCode SetPriv(_H245DataProtocolCapability *);
- };
- //
- // Data protocol capability class
- //
- // This Class represents the H245 Data Protocol Capability class and is
- // intended for access by the user. It is intended for use with the
- // Data Application Capability classes.
- //
- // It is derived from the H245SigComDataProtCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigDataProtCap : public H245SigComDataProtCap
- {
- // Methods
- public:
- H245SigDataProtCap();
- // Data access methods
- //
- // These methods are used to get and set the internal data of the
- // derived classes.
- // The Set passes the types in by value, while the Get passes
- // the value to be returned by reference.
- ProtReturnCode SetProt(int);
- ProtReturnCode GetProt(int &);
- // For Protocol internal use..
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Non Standard data protocol capability class
- //
- // This Class represents the H245 Non Standard Data Protocol Capability class and is
- // intended for access by the user. It is intended for use with the
- // Data Application Capability classes.
- //
- // It is derived from the H245SigComDataProtCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigNonStdDataProtCap : public H245SigComDataProtCap
- {
- // Methods
- public:
- H245SigNonStdDataProtCap();
- // Data access methods
- //
- // These methods are used to get and set the internal data of the class.
- // They both take references to H245SigNonStdParam types and hence
- // the user is responsible for allocation/de-allocation of the parameters.
- virtual ProtReturnCode GetData(H245SigNonStdParam &);
- virtual ProtReturnCode SetData(H245SigNonStdParam &);
- // For Protocol internal use..
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Common Data Application base class - for internal use only
- //
- // This is a base class for Data Application Capability Classes that
- // share similar implementation details.
- // It should never be instantiated.
- //
- class DLLEXPORT H245SigComDataCap : public H245SigDataCap
- {
- // Data
- protected:
- H245SigDataProtCap *data;
- // Methods
- protected:
- H245SigComDataCap(int);
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigComDataCap(H245SigComDataCap &);
- virtual ~H245SigComDataCap();
- H245SigComDataCap& operator=(H245SigComDataCap &);
- // Data access methods
- //
- // These methods are used to get and set the internal data of the
- // derived classes.
- // The Set & Get both pass the types in by reference.
- ProtReturnCode GetProtCap(H245SigDataProtCap &);
- ProtReturnCode SetProtCap(H245SigDataProtCap &);
- // This method is used to dump the internal data values of the class
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // T120 data application capability class
- //
- // This Class represents the H245 T120 Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigComDataCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigT120Cap : public H245SigComDataCap
- {
- // Methods
- public:
- H245SigT120Cap();
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // DSMCC data application capability class
- //
- // This Class represents the H245 DSMCC Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigComDataCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigDSMCCCap : public H245SigComDataCap
- {
- // Methods
- public:
- H245SigDSMCCCap();
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // UserData data application capability class
- //
- // This Class represents the H245 UserData Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigComDataCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigUserDataCap : public H245SigComDataCap
- {
- // Methods
- public:
- H245SigUserDataCap();
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // T84Unrestricted data application capability class
- //
- // This Class represents the H245 T84 Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigComDataCap class and inherits its
- // data accessing methods
- //
- class DLLEXPORT H245SigT84UnrestrictedCap : public H245SigComDataCap
- {
- // Methods
- public:
- H245SigT84UnrestrictedCap();
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // T84Restricted data application capability class
- //
- // This Class represents the H245 T84 Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigComDataCap class and inherits its
- // data accessing methods, while also adding its own data and methods.
- //
- class DLLEXPORT H245SigT84RestrictedCap : public H245SigComDataCap
- {
- // Data
- private:
- int qcif;
- int cif;
- int ccir601Seq;
- int ccir601Prog;
- int hdtvSeq;
- int hdtvProg;
- int g3FacsMH200x100;
- int g3FacsMH200x200;
- int g4FacsMMR200x100;
- int g4FacsMMR200x200;
- int jbig200x200Seq;
- int jbig200x200Prog;
- int jbig300x300Seq;
- int jbig300x300Prog;
- int digPhotoLow;
- int digPhotoMedSeq;
- int digPhotoMedProg;
- int digPhotoHighSeq;
- int digPhotoHighProg;
- // Methods
- public:
- H245SigT84RestrictedCap();
- // Data access methods
- //
- // These methods are used to get and set
- // the internal data of the class.
- // The Set passes the types in by value, while the Get passes
- // the value to be returned by reference.
- ProtReturnCode SetQcif(boolean);
- ProtReturnCode GetQcif(boolean &);
- ProtReturnCode SetCif(boolean);
- ProtReturnCode GetCif(boolean &);
- ProtReturnCode SetCcir601Seq(boolean);
- ProtReturnCode GetCcir601Seq(boolean &);
- ProtReturnCode SetCcir601Prog(boolean);
- ProtReturnCode GetCcir601Prog(boolean &);
- ProtReturnCode SetHdtvSeq(boolean);
- ProtReturnCode GetHdtvSeq(boolean &);
- ProtReturnCode SetHdtvProg(boolean);
- ProtReturnCode GetHdtvProg(boolean &);
- ProtReturnCode SetG3FacsMH200x100(boolean);
- ProtReturnCode GetG3FacsMH200x100(boolean &);
- ProtReturnCode SetG3FacsMH200x200(boolean);
- ProtReturnCode GetG3FacsMH200x200(boolean &);
- ProtReturnCode SetG4FacsMMR200x100(boolean);
- ProtReturnCode GetG4FacsMMR200x100(boolean &);
- ProtReturnCode SetG4FacsMMR200x200(boolean);
- ProtReturnCode GetG4FacsMMR200x200(boolean &);
- ProtReturnCode SetJbig200x200Seq(boolean);
- ProtReturnCode GetJbig200x200Seq(boolean &);
- ProtReturnCode SetJbig200x200Prog(boolean);
- ProtReturnCode GetJbig200x200Prog(boolean &);
- ProtReturnCode SetJbig300x300Seq(boolean);
- ProtReturnCode GetJbig300x300Seq(boolean &);
- ProtReturnCode SetJbig300x300Prog(boolean);
- ProtReturnCode GetJbig300x300Prog(boolean &);
- ProtReturnCode SetDigPhotoLow(boolean);
- ProtReturnCode GetDigPhotoLow(boolean &);
- ProtReturnCode SetDigPhotoMedSeq(boolean);
- ProtReturnCode GetDigPhotoMedSeq(boolean &);
- ProtReturnCode SetDigPhotoMedProg(boolean);
- ProtReturnCode GetDigPhotoMedProg(boolean &);
- ProtReturnCode SetDigPhotoHighSeq(boolean);
- ProtReturnCode GetDigPhotoHighSeq(boolean &);
- ProtReturnCode SetDigPhotoHighProg(boolean);
- ProtReturnCode GetDigPhotoHighProg(boolean &);
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // T434 data application capability class
- //
- // This Class represents the H245 T434 Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigComDataCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigT434Cap : public H245SigComDataCap
- {
- // Methods
- public:
- H245SigT434Cap();
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // H224 data application capability class
- //
- // This Class represents the H245 H224 Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigComDataCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigH224Cap : public H245SigComDataCap
- {
- // Methods
- public:
- H245SigH224Cap();
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // Nlpid data application capability class
- //
- // This Class represents the H245 Nlpid Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigComDataCap class and inherits its
- // data accessing methods and also adds new ones.
- //
- class DLLEXPORT H245SigNLPIDCap : public H245SigComDataCap
- {
- // Data
- private:
- int length;
- char *data;
- // Methods
- public:
- H245SigNLPIDCap();
- H245SigNLPIDCap(H245SigNLPIDCap &);
- virtual ~H245SigNLPIDCap();
- H245SigNLPIDCap &operator = (H245SigNLPIDCap &);
- // Data access methods
- //
- // These methods are used to get and set the internal data of the
- // derived classes.
- // The Set passes the types in by reference, while the Get passes
- // the value to be returned as a reference to a pointer.
- ProtReturnCode GetNLPIDData(int &, char *&);
- ProtReturnCode SetNLPIDData(int, char *);
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // DSVDControl data application capability class
- //
- // This Class represents the H245 DSVDControl Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigDataCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigDSVDControlCap : public H245SigDataCap
- {
- // Methods
- public:
- H245SigDSVDControlCap();
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // DataPartitioning data application capability class
- //
- // This Class represents the H245 DataPartitioning Data Application Capability class and is
- // intended for access by the user.
- //
- // It is derived from the H245SigComDataCap class and inherits its
- // data accessing methods.
- //
- class DLLEXPORT H245SigH222DataPartitioningCap : public H245SigComDataCap
- {
- // Methods
- public:
- H245SigH222DataPartitioningCap();
- // For Protocol internal use..
- virtual H245DataApplicationCapability *GetPriv() ;
- virtual ProtReturnCode SetPriv(H245DataApplicationCapability *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // CapTable class
- //
- // This Class represents the H245 Capability Table class and is
- // intended for access by the user.
- //
- // It is based on the CapabilityTable H245 Data structure and is used
- // to hold information on all protocol capabilities that are being
- // used.
- //
- // The protocol capabilities, once they have been created and
- // initialised with their appropriate data must be registered with the
- // capability table with an appropriate ID before they can be used.
- //
- // The capabilities can be registered in different ways depending on
- // their type:
- //
- // H245SigNonStd types must be registered using RegisterNonStd.
- // H245SigConference types must be registered using RegisterConf (This
- // is currently not yet implemented).
- // H245SigAud..., H245SigVid... and H245SigData... protocol capabilities
- // can ber registered as either Read only, Read/Write or Write only
- // (using RegisterRx/RegisterRW/RegisterTx).
- //
- // All protocol capabilities can be registered multiple times with
- // different (or the same) values and different (or the same) directions
- // (if allowed by the class type), but each time a class is registered
- // it must use a different ID. (This is not enforced internally - but
- // using the same ID more than once will cause indeterminate results!)
- //
- // When a class is registered, the capability table copies its data
- // internally and stores this data with the ID that is passed in. The
- // ID is then the mechanism used to identify the protocol capability to
- // the rest of the protocol stack.
- //
- class DLLEXPORT H245SigCapTable
- {
- // Data
- private:
- void *data;
- // methods.
- private:
- ProtReturnCode Register(H245SigCap &, int id, int);
- ProtReturnCode Count(int &num, int mode) ;
- ProtReturnCode GetCaps(int [], int &count, int mode);
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigCapTable();
- H245SigCapTable( H245SigCapTable &);
- virtual ~H245SigCapTable();
- H245SigCapTable &operator=( H245SigCapTable &);
- // Capability Registration Methods
- //
- // All take a reference to a H245SigCap and an int ID which is
- // passed by value. No memory is allocated by the method, and
- // all memory handling is the responsibility of the user.
- //
- // As the Capability classes are passed by reference and unaffected
- // by registration, they can be re-registered with the same values
- // in different directions, or, they can have their values changed and
- // then be re-registered in the same directions, or neither or both.
- // The only restriction is that each time any class is registered
- // it MUST use a unique ID (see above).
- // This method is used to register only H245SigNonStdCap protocol
- // capability classes to the capability table. (this does not
- // apply to H245SigNonStdAudCap etc. types which are registered
- // as normal standard types.
- ProtReturnCode RegisterNonStd(H245SigCap &, int id);
- // This method is used to register only H245SigConf protocol
- // capability classes to the capability table.
- // This method is not yet implemented!
- ProtReturnCode RegisterAsConf(H245SigCap &, int id);
- // These methods are used to register the Audio/Video/Data protocol
- // capability classes to the capability table. Specifying seperate
- // values for Read Only (RegisterAsRx), Read/Write (RegisterAsRW)
- // and Write Only (RegisterAsTx).
- ProtReturnCode RegisterAsRx(H245SigCap &, int id);
- ProtReturnCode RegisterAsTx(H245SigCap &, int id);
- ProtReturnCode RegisterAsRW(H245SigCap &, int id);
- // Protocol Count Methods
- //
- // These methods are used to get the numbers of capabilities
- // registered as any one type. They take a reference to an int
- // which is updated by the appropriate method.
- ProtReturnCode GetNumNonStd(int &) ;
- ProtReturnCode GetNumConf(int &) ;
- ProtReturnCode GetNumRx(int &) ;
- ProtReturnCode GetNumTx(int &) ;
- ProtReturnCode GetNumRW(int &) ;
- // Protocol Id Retrieval
- //
- // These methods each retrieve a list of capability IDs registered
- // as any one type.
- // The numeric ID values are placed in an array passed into the method
- // by the user along with the number of elements.
- // The method fills the array with numeric ids and updates the count
- // value to indicate the number of ids actually returned.
- // It is up to the user to check the number of capabilities registered
- // as any one type using the appropriate GetNumXX method, and pass in
- // an array big enough to hold all the values. If the array is too
- // small, only the number of spaces available will be filled.
- // No memory is allocated by this method and it is up to the user to
- // deal with the memory handling of the array.
- ProtReturnCode GetNonStd(int [], int &count) ;
- ProtReturnCode GetConf(int [], int &count) ;
- ProtReturnCode GetRx(int [], int &count) ;
- ProtReturnCode GetTx(int [], int &count) ;
- ProtReturnCode GetRW(int [], int &count) ;
- // Protocol Type Retrieval
- //
- // This method takes (as an int passed by value) the ID of a registered
- // capability class, and then updates the type and protocol parameters
- // (passed in by reference) to indicate what type of capability this is.
- ProtReturnCode GetCapType(int &type, int &prot, int id) ;
- // Protocol Data Retrieval
- //
- // This method takes (as an int passed by value) the ID of a registered
- // capability class, and then copies the registered Capability Class to
- // the Class parameter (passed in as a reference).
- //
- // This Class parameter must be an instance of the correct capability class
- // for this call to work. If an incorrect class is passed, an error will be
- // returned.
- //
- // (The parameters returned from the above GetCapType method could be used
- // with the class method: H245SigCap::Factory() to automatically create
- // instances of the appropriate type.)
- //
- // The class is passed in by reference and hence, the user is responsible
- // for memory handling.
- ProtReturnCode GetCap(H245SigCap &, int id) ;
- // This method clears all stored data
- ProtReturnCode Reset();
- // For Protocol internal use.
- void *GetPriv() ;
- ProtReturnCode SetPriv(void *ct);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // AltSet class
- //
- // This Class represents the H245 Alternate Set class and is
- // intended for access by the user.
- //
- // It is based on the AlternativeCapabilitySet H245 Data structure
- // and is used to group the set of alternative protocol capabilities
- // that can go to make up a single active logical channel.
- //
- // i.e. At any one time, only one of the stored protocols can be the
- // active logical channel represented by the class.
- //
- // The protocol capabilities are identified to the class by means of
- // the numeric IDs used when the capability class is registered with
- // the capability table.
- //
- // The class contains methods to add an individual protocol capability
- // to the set, get the number of capabilities in the set, and retrieve
- // the capabilities in the set.
- //
- class DLLEXPORT H245SigAltSet
- {
- // Data
- private:
- void *data;
- // methods.
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigAltSet();
- H245SigAltSet( H245SigAltSet &);
- virtual ~H245SigAltSet();
- H245SigAltSet& operator=( H245SigAltSet &);
- // Data access methods
- //
- // These methods are used to get, set and reset (where applicable)
- // the internal data of the class.
- // The Set passes the types in by value, while the Get passes
- // the value to be returned by reference.
- // The Reset methods are used to remove optional parameters
- // (reset by default in the constructor) and take no parameters.
- // This method adds a capability to the alternate set.
- // The capability is referenced by the numeric ID used when the
- // class was registered with the capability table.
- ProtReturnCode AddCapId(int);
- // This method returns the number of protocol capabilities added
- // to this set. The number is passed by reference, and is updated
- // within the method.
- ProtReturnCode GetNum(int &) ;
- // This method retrieves a list of capabilities grouped in this
- // Alternate Set. The numeric values are placed in an array passed
- // into the method by the user along with the number of elements.
- // The method fills the array with numeric ids and updates the count
- // value to indicate the number of ids actually returned.
- // It is up to the user to check the number of capabilities grouped
- // in the set using the GetNum method, and pass in an array big enough
- // to hold all the values. If the array is too small, only the number
- // of spaces available will be filled.
- // No memory is allocated by this method and it is up to the user to
- // deal with the memory handling of the array.
- ProtReturnCode GetCaps(int [], int &count) ;
- // This method clears all stored data
- ProtReturnCode Reset();
- // For protocol internal use.
- void *GetPriv() ;
- ProtReturnCode SetPriv(void *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // CapDesc class
- //
- // This Class represents the H245 Capability Descriptor class and is
- // intended for access by the user.
- //
- // It is based on the CapabilityDescriptor H245 Data structure and is
- // used to represent set of logical channels (each represented by an
- // AltSet Class) that can be simultaneously active at any one time.
- //
- // i.e. A CapabilityDescriptor contains multiple
- // AlternativeCapabilitySets. From each of the contained
- // AlternativeCapabilitySets, one of its alternative protocols
- // can be used as a single logical channel that can be used
- // simultaneously with the other single alternative protocols from
- // all the other AlternativeCapabilitySets.
- //
- // Thus a CapabilityDescriptor represents a possible group of logical
- // channel alternatives.
- //
- // The class contains methods to add and retrieve AlternativeCapabilitySet
- // classes stored in this class.
- //
- // The class also contains methods to get and set an ID which is used
- // to identify it to the CapabilityDescriptorSet of CapabilityDescriptor
- // classes that represent all the possible combinations of alternative
- // logical channels that can be active at any one time.
- //
- class DLLEXPORT H245SigCapDesc
- {
- // Data
- private:
- int id;
- void *data;
- H245CapabilityDescriptor *desc;
- // Methods
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigCapDesc();
- H245SigCapDesc(H245SigCapDesc &);
- virtual ~H245SigCapDesc();
- H245SigCapDesc& operator=(H245SigCapDesc &);
- // Id Setting Methods
- //
- // These methods are used to Set and Get the Id of the CapDesc.
- // The Set passes the ID in by value, while the Get passes
- // the value to be returned by reference.
- ProtReturnCode SetId(int);
- ProtReturnCode GetId(int &);
- // AltSet Manipulation Methods
- //
- // These methods are used to Add and Retrieve information about
- // Logical Channels in the form of AltSets stored in the CApDesc.
- // This method is used to add an Alternate Set to the Capability
- // Descriptor. The method copies the relevant data leaving the
- // Alternative Set (passed in by reference) unchanged. Hence all
- // memory handling is the responsinility of the user.
- ProtReturnCode AddSet(H245SigAltSet &);
- // These methods are used to iteratively retrive copies of the
- // Alternative Cability sets from the Descriptor into the
- // (passed by reference) parameters.
- // No memory is allocated, and the stored data is not affected
- // by being copied - its data cannot be manipulated by this
- // process - only viewed.
- ProtReturnCode GetFirstSet(H245SigAltSet &);
- ProtReturnCode GetNextSet(H245SigAltSet &);
- // This method clears all stored data
- ProtReturnCode Reset();
- // For protocol internal use.
- H245CapabilityDescriptor *GetPriv() ;
- ProtReturnCode SetPriv(H245CapabilityDescriptor *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- //
- // CapDescs class
- //
- // This Class represents the H245 Capability Descriptor Set class and is
- // intended for access by the user.
- //
- // It is based on the CapabilityDescriptorSet H245 Data structure and is
- // used to represent every (relevant) possible combination of logical
- // channels that can be simultaneously opened at any one time.
- //
- // i.e. Whereas each CapabilityDescriptor represents one possible group
- // of alternatives, the CapabilityDescriptorSet represents the complete
- // set of groups of alternative simultaneous logical channels.
- //
- // The class contains methods to add an individual capability descriptor
- // to the set, get the number of capability descriptors in the set, and
- // retrieve the capability descriptors in the set.
- //
- class DLLEXPORT H245SigCapDescs
- {
- // Data
- private:
- void *descs;
- // Methods
- public:
- // Constructor/Destructor/Assignment methods...
- //
- // These are implemented because the default compiler generated
- // methods would not correctly handle the internal data.
- H245SigCapDescs();
- H245SigCapDescs( H245SigCapDescs &);
- virtual ~H245SigCapDescs();
- H245SigCapDescs& operator=( H245SigCapDescs &);
- // Data Manipulation Methods
- //
- // These methods are used to Add and Retrieve information about
- // Capability Descriptors stored in the set.
- // This method is used to add a Capability Descriptor to the set.
- // The method copies the relevant data leaving the descriptor
- // (passed in by reference) unchanged. Hence all memory handling
- // is the responsinility of the user.
- ProtReturnCode AddDesc(H245SigCapDesc &);
- // These methods are used to iteratively retrive copies of the
- // Capability Descriptors from the set into the (passed by
- // reference) parameters.
- // No memory is allocated, and the stored data is not affected
- // by being copied - its data cannot be manipulated by this
- // process - only viewed.
- ProtReturnCode GetFirstDesc(H245SigCapDesc &);
- ProtReturnCode GetNextDesc(H245SigCapDesc &);
- // This methods are used to selectively retrive a copy of the
- // Capability Descriptor specified by the ID parameter (passed
- // in by value) from the set into the parameters (passed by
- // reference).
- // No memory is allocated, and the stored data is not affected
- // by being copied - its data cannot be manipulated by this
- // process - only viewed.
- ProtReturnCode GetDesc(H245SigCapDesc &, int id);
- // This method clears all stored data
- ProtReturnCode Reset();
- // For protocol internal use.
- void *GetPriv() ;
- ProtReturnCode SetPriv(void *);
- virtual ProtReturnCode Dump(Logger *, int = 0);
- };
- #endif // __H245SIGCAPS_H__