h245types.h
资源名称:h323.zip [点击查看]
上传用户:hnnddl
上传日期:2007-01-06
资源大小:3580k
文件大小:29k
源码类别:
IP电话/视频会议
开发平台:
WINDOWS
- /*
- * $Revision: 1.6 $
- * $Date: 1998/10/23 15:54:13 $
- */
- ////////////////////////////////////////////////////////////////
- // 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 : h245types.h //
- // //
- // This file defines the types used in H.245 signalling. //
- // //
- // //
- // History: //
- // 07_Mar_1997 Created //
- // 16_Apr_1997 Code review pass 1, check for PASS1 //
- // 16_Apr_1997 H245SigH225Params::GetSilenceSuppression //
- // 16_Apr_1997 H245SigNonStdParam::GetIDType //
- // 16_Apr_1997 H245SigH225Params::xxxGuaranteedDelivery //
- // methods //
- // 16_Apr_1997 H245SigMedDistCap::cent, dist data methods //
- // 17_Apr_1997 Code review pass2, check for PASS2. //
- // 08_Jul_1997 Merged Sun5 changes. //
- // 23_Jun_1998 Added methods in H245SigCommModeTableEntry //
- // to manipulate sessionDescription. //
- // 02_Oct_1998 Added classes H245SigForwardLCParams, //
- // H245SigReverseLCParams and //
- // H245SigOpenLogicalChannel //
- // 06_Oct_1998 Added class H245SigNullDataType and //
- // corr. enum DT_NULL //
- // 19_Oct_1998 Added H245SigMuxNone class. //
- ////////////////////////////////////////////////////////////////
- #if (!defined(__H245TYPES_H__))
- #define __H245TYPES_H__
- #include "util/platform.h"
- #include "api/h245sigerr.h"
- #include "util/listifc.h"
- //
- // Forward declarations.
- //
- class H245NonStandardParameter;
- class H245TransportAddress;
- class H245H2250LogicalChannelParameters;
- class H245H2250LogicalChannelAckParameters;
- class H245Capability;
- class H245AudioCapability;
- class H245VideoCapability;
- class H245DataApplicationCapability;
- class H245MediaDistributionCapability;
- class H245H2250Capability;
- class H245CommunicationModeTableEntry;
- class H245SigCap;
- class H245SigAudCap;
- class H245SigVidCap;
- class H245SigDataCap;
- class H245SigMultipointCap;
- struct _H245NonStandardParameter;
- class H245ForwardLogicalChannelParameters;
- class H245ReverseLogicalChannelParameters;
- class H245OpenLogicalChannel;
- class H245DataType;
- // H245 states
- enum H245SigStates
- {
- // LCO states.
- ST_LC0_NOT_CONNECTED,
- ST_LC0_CONNECTED,
- ST_LC0_CONNECTION_ERROR
- };
- // H245 terminal types.
- enum H245SigTerminalType
- {
- TT_TERMINAL_NO_MC = 50,
- TT_TERMINAL_MC_NO_MP = 70,
- TT_GATEWAY_NO_MC = 60,
- TT_GATEWAY_MC_NO_MP = 80,
- TT_GATEWAY_MC_DATA_MP = 90,
- TT_GATEWAY_MC_DATA_AUDIO_MP = 100,
- TT_GATEWAY_MC_DATA_AUDIO_VIDEO_MP = 110,
- TT_GATEKEEPER_MC_NO_MP = 120,
- TT_GATEKEEPER_MC_DATA_MP = 130,
- TT_GATEKEEPER_MC_DATA_AUDIO_MP = 140,
- TT_GATEKEEPER_MC_DATA_AUDIO_VIDEO_MP = 150,
- TT_MCU_MC_NO_MP = 160,
- TT_MCU_MC_DATA_MP = 170,
- TT_MCU_MC_DATA_AUDIO_MP = 180,
- TT_MCU_MC_DATA_AUDIO_VIDEO_MP = 190
- };
- // Capability set reject reasons.
- enum H245SigCapRejectReason
- {
- CRR_REJECT_UNSPECIFIED = 1,
- CRR_TABLE_ENTRY_UNDEFINED,
- CRR_DESCRIPTOR_CAPACITY_EXCEEDED,
- CRR_TABLE_ENTRY_CAPACITY_EXCEEDED
- };
- // Open logical channel reject reasons.
- enum H245SigOLCRejectReason
- {
- OLCRR_UNSPECIFIED = 1,
- OLCRR_UNSUITABLE_REVERSE_PARAMS,
- OLCRR_DATATYPE_NOT_SUPPORTED,
- OLCRR_DATATYPE_NOT_AVAILABLE,
- OLCRR_UNKNOWN_DATATYPE,
- OLCRR_DATATYPE_AL_COMBO_NOT_SUPPORTED,
- OLCRR_MULTICAST_NOT_ALLOWED,
- OLCRR_INSUFFICENT_BANDWIDTH,
- OLCRR_SEPERATE_STACK_ESTAB_FAILED,
- OLCRR_INVALID_SESSION_ID
- };
- // Master slave determination errors.
- enum H245SigMSDError
- {
- //received unexpected MasterSlaveDetermination
- MSDERR_UNEXPECTED_MSD,
- //received unexpected MasterSlaveDeterminationReject
- MSDERR_UNEXPECTED_MSDR,
- //no response from remote MSDSE
- MSDERR_NO_RESPONSE_REMOTE,
- //remote sees no response from local MSDSE
- MSDERR_NO_RESPONSE_LOCAL,
- //inconsistent field values
- MSDERR_INCONSISTENT,
- MSDERR_MAX_ATTEMPTS
- };
- // Master slave determination results.
- enum H245SigMSDResult
- {
- MSDRES_MASTER = 1,
- MSDRES_SLAVE
- };
- // Media packetization protocols.
- enum H245SigMedPacketization
- {
- MEDPKT_H261A_VIDEO
- };
- // Logical channel signalling error.
- enum H245SigLCSError
- {
- //received unexpected OpenLogicalChannelAck
- LCSERR_UNEXPECTED_ACK,
- //received unexpected OpenLogicalChannelReject
- LCSERR_UNEXPECTED_REJECT,
- //received unexpected OpenLogicalChannelConfirm
- LCSERR_UNEXPECTED_CONFIRM,
- //received unexpected CloseLogicalChannelAck
- LCSERR_UNEXPECTED_CLOSE_ACK,
- // no response from peer LCSE (timer expired)
- LCSERR_NO_RESPONSE
- };
- // Logical channel data types.
- enum H245SigDataTypes
- {
- DT_AUDIO,
- DT_VIDEO,
- DT_DATA,
- DT_NON_STD,
- DT_ENCRYPTION_MODE,
- DT_NULL
- };
- // Multiplexing protocols.
- enum H245SigMuxType
- {
- MT_H222,
- MT_H223,
- MT_V76,
- MT_H225,
- MT_NONE
- };
- // Well known session ids, for use with logical
- // channel signalling.
- enum H245SigPriSessID
- {
- PRI_SSID_AUDIO = 1,
- PRI_SSID_VIDEO = 2
- };
- // PASS2. added INVALID.
- enum H245SigNonStdIDType
- {
- H245NS_IDT_INVALID = 0,
- H245NS_IDT_OBJECT = 1,
- H245NS_IDT_H221NS = 2
- };
- // Specifies the Capability Exchange Signalling entity, that generated
- // the NotifyTermCapsReject callback.
- enum H245SigCESEDirection
- {
- CESE_INCOMING,
- CESE_OUTGOING
- };
- enum H245SigCommModeTableEntryType
- {
- CMTE_INVALID,
- CMTE_VIDEO,
- CMTE_AUDIO,
- CMTE_DATA
- };
- // The abstraction for the H.245 NonStandardParameter.
- class DLLEXPORT H245SigNonStdParam
- {
- public:
- // Constructors and destructors.
- H245SigNonStdParam();
- ~H245SigNonStdParam();
- // PASS1 : new function
- // Get the type of non standard parameter..
- // returns one of enum H245SigNonStdIDType
- int GetIDType();
- // For H245SigNonStdIDType = H245NS_IDT_OBJECT use the
- // following.
- ProtReturnCode SetObjectIdentifier(unsigned short *data,
- unsigned short len);
- ProtReturnCode GetObjectIdentifier(unsigned short *&data,
- unsigned short &len);
- // For H245SigNonStdIDType = H245NS_IDT_H221NS use the
- // following.
- ProtReturnCode SetH221NonStd(unsigned short t35_cc,
- unsigned short t35_ext, unsigned short manufacturer_code);
- ProtReturnCode GetH221NonStd(unsigned short &t35_cc,
- unsigned short &t35_ext, unsigned short &manufacturer_code);
- // Must be set for both types of H245SigNonStdIDType.
- ProtReturnCode SetNonStdData(unsigned char *data,
- unsigned int len);
- ProtReturnCode GetNonStdData(unsigned char *&data,
- unsigned int &len);
- H245SigNonStdParam& operator=(H245SigNonStdParam &);
- public:
- // For protocol internal use.
- H245NonStandardParameter * GetPriv();
- ProtReturnCode SetPriv(H245NonStandardParameter *);
- private:
- // The pointer to the internal representation..
- H245NonStandardParameter *nsp_cp;
- _H245NonStandardParameter *nsp_sp;
- };
- class DLLEXPORT H245SigDataType
- {
- public:
- H245SigDataType(int type);
- virtual ~H245SigDataType();
- // Method returns the data type ..
- // data_type is one of enum H245SigDataTypes,
- // cap_type is one of enum H245SigCapType
- // and cap_sub_type depends on the
- // value of cap_type. cap_sub_type is
- // a value from one of the following sets:
- // enum H245SigAudProt,enum H245SigVidProt
- // enum H245SigDataProt, enum H245SigNonStdProt
- // Note: cap_type and cap_sub_type are valid
- // only if data_type is DT_AUDIO or DT_VIDEO
- // DT_DATA, DT_NON_STD.
- // Note: after getting values of cap_type and
- // cap_sub_type, use the Factory method
- // in the Capability class to create the
- // appropriate capability object.
- virtual ProtReturnCode GetType(int& data_type,
- int& cap_type, int& cap_sub_type);
- // PASS1 : made this protected to give access to derived classes.
- protected:
- int type;
- };
- class DLLEXPORT H245SigAudDataType: public H245SigDataType
- {
- public:
- H245SigAudDataType();
- ~H245SigAudDataType();
- ProtReturnCode Get(H245SigAudCap &);
- ProtReturnCode Set(H245SigAudCap &);
- H245SigAudDataType& operator=(H245SigAudDataType &);
- virtual ProtReturnCode GetType(int& data_type,
- int& cap_type, int& cap_sub_type);
- //PASS2: cosmetic, added public:
- public:
- // For protocol internal use.
- H245AudioCapability * GetPriv();
- ProtReturnCode SetPriv(H245AudioCapability *);
- private:
- H245AudioCapability *acap;
- };
- class DLLEXPORT H245SigNullDataType: public H245SigDataType
- {
- public:
- H245SigNullDataType();
- ~H245SigNullDataType();
- H245SigNullDataType& operator=(H245SigNullDataType &);
- virtual ProtReturnCode GetType(int& data_type,
- int& cap_type, int& cap_sub_type);
- };
- class DLLEXPORT H245SigNonStdDataType: public H245SigDataType
- {
- public:
- H245SigNonStdDataType();
- ~H245SigNonStdDataType();
- ProtReturnCode Get(H245SigNonStdParam &);
- ProtReturnCode Set(H245SigNonStdParam &);
- H245SigNonStdDataType& operator=(
- H245SigNonStdDataType &);
- virtual ProtReturnCode GetType(int& data_type,
- int& cap_type, int& cap_sub_type);
- // For protocol internal use.
- H245NonStandardParameter* GetPriv();
- ProtReturnCode SetPriv(H245NonStandardParameter*);
- private:
- H245NonStandardParameter *nsp;
- };
- class DLLEXPORT H245SigVidDataType: public H245SigDataType
- {
- public:
- H245SigVidDataType();
- ~H245SigVidDataType();
- ProtReturnCode Get(H245SigVidCap &);
- ProtReturnCode Set(H245SigVidCap &);
- H245SigVidDataType& operator= (H245SigVidDataType &);
- virtual ProtReturnCode GetType(int& data_type,
- int& cap_type, int& cap_sub_type);
- // PASS2: added public:
- public:
- // For protocol internal use.
- H245VideoCapability * GetPriv();
- ProtReturnCode SetPriv(H245VideoCapability *);
- private:
- H245VideoCapability *vcap;
- };
- class DLLEXPORT H245SigMuxParams
- {
- public:
- H245SigMuxParams(int type);
- // PASS1 : made destructor virtual.
- virtual ~H245SigMuxParams();
- virtual ProtReturnCode GetType(int& type);
- private:
- int type;
- };
- class DLLEXPORT H245SigMuxNone : public H245SigMuxParams
- {
- public:
- H245SigMuxNone();
- ~H245SigMuxNone();
- };
- class DLLEXPORT H245SigH225Params : public H245SigMuxParams
- {
- public:
- H245SigH225Params();
- ~H245SigH225Params();
- // Methods to manipulate session ids.
- ProtReturnCode SetSessionID(unsigned short id);
- ProtReturnCode GetSessionID(unsigned short& id);
- ProtReturnCode SetAssocSessionID(unsigned short id);
- ProtReturnCode GetAssocSessionID(unsigned short& id);
- // Methods to manipulate media channel transport
- // addresses.
- ProtReturnCode SetMediaChan(sockaddr* addr);
- ProtReturnCode GetMediaChan(sockaddr* addr);
- ProtReturnCode SetMediaCtrlChan(sockaddr* addr);
- ProtReturnCode GetMediaCtrlChan(sockaddr* addr);
- // Methods to set/get dynamic rtp payload type.
- ProtReturnCode SetDynamicRTPPayloadType(int pt);
- ProtReturnCode GetDynamicRTPPayloadType(int& pt);
- // PASS1 : GetSilenceSupp now returns ProtReturnCode
- // Methods for manipulating the silence suppression flag.
- ProtReturnCode SetSilenceSupp(boolean flag);
- ProtReturnCode GetSilenceSupp(boolean &flag);
- // PASS1: split the SetGuaranteedDelivery functions into two.
- // Methods for manipulating the mediaGuaranteedDelivery
- // flag and mediacControlGuaranteedDelivery.
- ProtReturnCode SetMediaGuaranteedDelivery(boolean media_flag);
- ProtReturnCode GetMediaGuaranteedDelivery(boolean &media_flag);
- ProtReturnCode SetMediaCtrlGuaranteedDelivery(boolean ctrl_flag);
- ProtReturnCode GetMediaCtrlGuaranteedDelivery(boolean &ctrl_flag);
- // Set/Get terminal label.
- ProtReturnCode SetTerminalLabel(int mcu_number,
- int term_number);
- ProtReturnCode GetTerminalLabel(int& mcu_number,
- int& term_number);
- // Media pkt'ization
- ProtReturnCode SetMediaPacketization(int mp);
- ProtReturnCode GetMediaPacketization(int& mp);
- // Non standard parameters
- ProtReturnCode GetNumNonStd(int& count);
- ProtReturnCode GetNonStdList(H245SigNonStdParam nsp_list[],
- int& count);
- ProtReturnCode AddNonStd(H245SigNonStdParam&);
- H245SigH225Params& operator=(H245SigH225Params&);
- public:
- // For protocol internal use.
- H245H2250LogicalChannelParameters* GetPriv();
- ProtReturnCode SetPriv(
- H245H2250LogicalChannelParameters* lcp);
- private:
- int media_flag;
- int ctrl_flag;
- int payload_type;
- int silence_supp;
- H245TransportAddress *media_chan;
- H245TransportAddress *media_ctrl_chan;
- unsigned short session_id;
- unsigned short assoc_session_id;
- H245H2250LogicalChannelParameters* lcp;
- void* nsp_list;
- // Flag to indicate if terminal label is present.
- int tl_present;
- int term;
- int mcu;
- int mp_present;
- int mp;
- };
- class DLLEXPORT H245SigH225AckParams
- {
- public:
- H245SigH225AckParams();
- ~H245SigH225AckParams();
- // Methods to manipulate session id.
- ProtReturnCode SetSessionID(unsigned short id);
- ProtReturnCode GetSessionID(unsigned short& id);
- // Methods to manipulate media channel transport
- // addresses.
- ProtReturnCode SetMediaChan(sockaddr* addr);
- ProtReturnCode GetMediaChan(sockaddr* addr);
- ProtReturnCode SetMediaCtrlChan(sockaddr* addr);
- ProtReturnCode GetMediaCtrlChan(sockaddr* addr);
- // Methods to set/get dynamic rtp payload type.
- ProtReturnCode SetDymnamicRTPPayloadType(int pt);
- ProtReturnCode GetDymnamicRTPPayloadType(int& pt);
- // Non standard parameters
- ProtReturnCode GetNumNonStd(int& count);
- ProtReturnCode GetNonStdList(H245SigNonStdParam nsp_list[],
- int& count);
- ProtReturnCode AddNonStd(H245SigNonStdParam&);
- H245SigH225AckParams& operator=(H245SigH225AckParams&);
- // For protocol internal use.
- H245H2250LogicalChannelAckParameters* GetPriv();
- ProtReturnCode SetPriv(
- H245H2250LogicalChannelAckParameters* lcp);
- private:
- void* nsp_list;
- unsigned short session_id;
- int payload_type;
- H245TransportAddress *media_chan;
- H245TransportAddress *media_ctrl_chan;
- H245H2250LogicalChannelAckParameters* lcack;
- };
- class DLLEXPORT H245SigMedDistCap
- {
- public:
- H245SigMedDistCap();
- ~H245SigMedDistCap();
- ProtReturnCode SetControl(boolean centralized,
- boolean distributed);
- ProtReturnCode GetControl(boolean& centralized, boolean&
- distributed);
- ProtReturnCode SetAudio(boolean centralized,
- boolean distributed);
- ProtReturnCode GetAudio(boolean& centralized, boolean&
- distributed);
- ProtReturnCode SetVideo(boolean centralized,
- boolean distributed);
- ProtReturnCode GetVideo(boolean& centralized, boolean&
- distributed);
- // PASS1 : Added functions to manipulate centralized data.
- ProtReturnCode GetNumCentralData(int& count);
- ProtReturnCode GetCentralData(H245SigDataCap data_list[],
- int& count);
- ProtReturnCode AddCentralData(H245SigDataCap&);
- // PASS1 : Added functions to manipulate distributed data.
- ProtReturnCode GetNumDistData(int& count);
- ProtReturnCode GetDistData(H245SigDataCap data_list[],
- int& count);
- ProtReturnCode AddDistData(H245SigDataCap&);
- H245SigMedDistCap& operator=(H245SigMedDistCap& mdist_cap);
- public:
- // For protocol internal use.
- H245MediaDistributionCapability* GetPriv();
- ProtReturnCode SetPriv(H245MediaDistributionCapability* cap);
- private:
- H245MediaDistributionCapability* cap;
- int cent_ctrl;
- int dist_ctrl;
- int cent_audio;
- int dist_audio;
- int cent_video;
- int dist_video;
- // PASS1 : Additional 2 parameters.
- void *central_data;
- void *dist_data;
- };
- class DLLEXPORT H245SigMultipointCap
- {
- public:
- H245SigMultipointCap();
- ~H245SigMultipointCap();
- ProtReturnCode SetMcast(boolean flag);
- ProtReturnCode GetMcast(boolean& flag);
- ProtReturnCode SetMultiUcast(boolean flag);
- ProtReturnCode GetMultiUcast(boolean& flag);
- // Methods to manipulate media distribution
- // capabilities.
- ProtReturnCode GetNumMedDistCap(int& count);
- // mdist_cap_list points an array of
- // H245SigMedDistCap, count contains the number
- // of elements in the array, upon return from
- // the call count will contain the number of
- // items filled.
- ProtReturnCode GetMedDistCap(H245SigMedDistCap
- mdist_cap_list[], int& count);
- ProtReturnCode AddMedDistCap(H245SigMedDistCap&
- mdist_cap);
- H245SigMultipointCap& operator=(H245SigMultipointCap&);
- // For protocol internal use.
- ProtReturnCode SetPriv(int mcast, int multi_ucast,
- void* mdist_list);
- ProtReturnCode GetPriv(int& mcast, int& multi_ucast,
- void*& mdist_list);
- private:
- int mcast;
- int multi_ucast;
- void* mdist_list;
- int list_length;
- };
- class DLLEXPORT H245SigMuxCap
- {
- public:
- H245SigMuxCap(int type);
- // PASS1 : destructor made virtual
- virtual ~H245SigMuxCap();
- virtual ProtReturnCode GetType(int& type);
- private:
- int type;
- };
- class DLLEXPORT H245SigH225Cap : public H245SigMuxCap
- {
- public:
- H245SigH225Cap();
- ~H245SigH225Cap();
- // Methods to Set/Get delay jitter
- ProtReturnCode SetAudioDelayJitter(int jitter);
- ProtReturnCode GetAudioDelayJitter(int& jitter);
- // Methods to Set/Get multipoint cap.
- // Receive cap
- ProtReturnCode GetRxMultipointCap(
- H245SigMultipointCap& mcap);
- ProtReturnCode SetRxMultipointCap(
- H245SigMultipointCap& mcap);
- // transmit cap
- ProtReturnCode GetTxMultipointCap(
- H245SigMultipointCap& mcap);
- ProtReturnCode SetTxMultipointCap(
- H245SigMultipointCap& mcap);
- // receive/transmit cap
- ProtReturnCode GetRxTxMultipointCap(
- H245SigMultipointCap& mcap);
- ProtReturnCode SetRxTxMultipointCap(
- H245SigMultipointCap& mcap);
- // Set/Get MC capability.
- ProtReturnCode SetMCCap(boolean centralized_conf,
- boolean decentralized_conf);
- ProtReturnCode GetMCCap(boolean& centralized_conf,
- boolean& decentralized_conf);
- ProtReturnCode SetRTCPVideoControlCap(boolean flag);
- ProtReturnCode GetRTCPVideoControlCap(boolean& flag);
- // Set/Get media packetization capabilities.
- ProtReturnCode SetMedPktCap(int medpkt);
- ProtReturnCode GetMedPktCap(int& medpkt);
- H245SigH225Cap& operator=(H245SigH225Cap&);
- // For protocol internal use.
- H245H2250Capability* GetPriv();
- ProtReturnCode SetPriv(H245H2250Capability* cap);
- private:
- int jitter;
- H245H2250Capability* cap;
- H245SigMultipointCap rx_mcap;
- H245SigMultipointCap tx_mcap;
- H245SigMultipointCap rxtx_mcap;
- int mc_cent_conf;
- int mc_decent_conf;
- int rtcp_video_ctrl_cap;
- int medpkt;
- };
- class DLLEXPORT H245SigCommModeTableEntry
- {
- public:
- H245SigCommModeTableEntry();
- ~H245SigCommModeTableEntry();
- // Method to get the type of this entry.
- // type is from enum H245SigCommunicationModeTableEntryType
- ProtReturnCode GetType(int &type);
- ProtReturnCode SetDataType(H245SigCap &cap);
- ProtReturnCode GetDataType(H245SigCap &cap);
- // Methods to manipulate session ids.
- ProtReturnCode SetSessionID(unsigned short id);
- ProtReturnCode GetSessionID(unsigned short& id);
- ProtReturnCode SetAssocSessionID(unsigned short id);
- ProtReturnCode GetAssocSessionID(unsigned short& id);
- ProtReturnCode SetMediaGuaranteedDelivery(
- boolean media_flag);
- ProtReturnCode GetMediaGuaranteedDelivery(
- boolean &media_flag);
- ProtReturnCode SetMediaCtrlGuaranteedDelivery(
- boolean ctrl_flag);
- ProtReturnCode GetMediaCtrlGuaranteedDelivery(
- boolean &ctrl_flag);
- // Set/Get terminal label.
- ProtReturnCode SetTerminalLabel(int mcu_number,
- int term_number);
- ProtReturnCode GetTerminalLabel(int& mcu_number,
- int& term_number);
- // Methods to manipulate media channel transport
- // addresses.
- ProtReturnCode SetMediaChan(sockaddr* addr);
- ProtReturnCode GetMediaChan(sockaddr* addr);
- ProtReturnCode SetMediaCtrlChan(sockaddr* addr);
- ProtReturnCode GetMediaCtrlChan(sockaddr* addr);
- // Non standard parameters
- ProtReturnCode GetNumNonStd(int& count);
- ProtReturnCode GetNonStdList(H245SigNonStdParam nsp_list[],
- int& count);
- ProtReturnCode AddNonStd(H245SigNonStdParam&);
- /*
- * Methods to set/get session description.
- */
- ProtReturnCode SetSessionDesc(unsigned short *desc,
- int desc_length);
- ProtReturnCode GetSessionDescLength(int& length);
- /*
- * This method must be invoked with desc_length initialized
- * to the length of the input buffer in shorts.
- * Upon return desc_length will contain the length of the
- * resultant desc in number of shorts.
- */
- ProtReturnCode GetSessionDesc(unsigned short *desc,
- int& desc_length);
- H245SigCommModeTableEntry& operator=(
- H245SigCommModeTableEntry &ent);
- public:
- // for internal use.
- ProtReturnCode SetPriv(H245CommunicationModeTableEntry *priv);
- H245CommunicationModeTableEntry *GetPriv();
- private:
- H245CommunicationModeTableEntry *cmte;
- int media_flag;
- int ctrl_flag;
- int payload_type;
- int silence_supp;
- H245TransportAddress *media_chan;
- H245TransportAddress *media_ctrl_chan;
- unsigned short session_id;
- unsigned short assoc_session_id;
- int cap_type;
- int prot;
- H245AudioCapability *aud_cap;
- H245VideoCapability *vid_cap;
- H245DataApplicationCapability *data_cap;
- void *nsp_list;
- // Flag to indicate if terminal label is present.
- int tl_present;
- int term;
- int mcu;
- unsigned short *desc;
- unsigned short desc_length;
- void FreeCaps();
- };
- class DLLEXPORT H245SigTerminalLabel
- {
- public:
- unsigned short mcu_number;
- unsigned short terminal_number;
- };
- // H245SigForwardLCParams encapsulates the ForwardLogicalChannelParameters
- // field of the H.245 OpenLogicalChannel structure. Use this class to
- // initialize the ForwardLogicalChannelParameters and then set in
- // the H245SigOpenLogicalChannel object using the SetForwardLCParams method.
- // @See:
- // -H245SigOpenLogicalChannel
- //
- // @Version: PX3230S Version 2.2
- class DLLEXPORT H245SigForwardLCParams
- {
- public:
- H245SigForwardLCParams();
- ~H245SigForwardLCParams();
- H245SigForwardLCParams& operator=(H245SigForwardLCParams &);
- // Use this method to set the dataType field of the H.245
- // ForwardLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode SetDataType(H245SigDataType &dataType);
- // Use this method to set the multiplexParameters field of the H.245
- // ForwardLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode SetMuxParams(H245SigMuxParams &muxParams);
- // Use this method to set the portNumber field of the H.245
- // ForwardLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode SetPortNumber(unsigned short portNumber);
- // Use this method to retrieve the type of the dataType present
- // in the ForwardLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode GetTypeOfDataType(int &type);
- // Use this method to retrieve the dataType field of
- // the ForwardLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure. The argument dataType is
- // assumed to be of the correct subtype. Use the method
- // GetTypeOfDataType to figure out the subtype.
- ProtReturnCode GetDataType(H245SigDataType &dataType);
- // Use this method to retrieve the type of the multiplexParameters
- // present in the ForwardLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode GetTypeOfMuxParams(int &type);
- // Use this method to retrieve the multiplexParameters field of
- // the ForwardLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure. The argument muxParams is
- // assumed to be of the correct subtype. Use the method
- // GetTypeOfMuxParams to figure out the subtype.
- ProtReturnCode GetMuxParams(H245SigMuxParams &muxParams);
- // Use this method to retrive the portNumber field of the H.245
- // ForwardLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode GetPortNumber(unsigned short &portNumber);
- //@DELB
- public:
- // For protocol internal use.
- H245ForwardLogicalChannelParameters * GetPriv();
- ProtReturnCode SetPriv(H245ForwardLogicalChannelParameters *);
- private:
- H245ForwardLogicalChannelParameters *_fwdlcpPtr;
- H245DataType *_dataTypeObjPtr;
- H245H2250LogicalChannelParameters *_lcpObjPtr;
- int _portNumber;
- //@DELE
- };
- // H245SigReverseLCParams encapsulates the ReverseLogicalChannelParameters
- // field of the H.245 OpenLogicalChannel structure. Use this class to
- // initialize the ReverseLogicalChannelParameters and then set in
- // the H245SigOpenLogicalChannel object using the SetReverseLCParams method.
- // @See:
- // -H245SigOpenLogicalChannel
- //
- // @Version: PX3230S Version 2.2
- class DLLEXPORT H245SigReverseLCParams
- {
- public:
- H245SigReverseLCParams();
- ~H245SigReverseLCParams();
- H245SigReverseLCParams& operator=(H245SigReverseLCParams &);
- // Use this method to set the dataType field of the H.245
- // ReverseLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode SetDataType(H245SigDataType &dataType);
- // Use this method to set the multiplexParameters field of the H.245
- // ReverseLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode SetMuxParams(H245SigMuxParams &muxParams);
- // Use this method to retrieve the type of the dataType present
- // in the ReverseLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode GetTypeOfDataType(int &type);
- // Use this method to retrieve the dataType field of
- // the ReverseLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure. The argument dataType is
- // assumed to be of the correct subtype. Use the method
- // GetTypeOfDataType to figure out the subtype.
- ProtReturnCode GetDataType(H245SigDataType &dataType);
- // Use this method to retrieve the type of the multiplexParameters
- // present in the ReverseLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure.
- ProtReturnCode GetTypeOfMuxParams(int &type);
- // Use this method to retrieve the multiplexParameters field of
- // the ReverseLogicalChannelParameters field of the H.245
- // OpenLogicalChannel structure. The argument muxParams is
- // assumed to be of the correct subtype. Use the method
- // GetTypeOfMuxParams to figure out the subtype.
- ProtReturnCode GetMuxParams(H245SigMuxParams &muxParams);
- //@DELB
- public:
- // For protocol internal use.
- H245ReverseLogicalChannelParameters * GetPriv();
- ProtReturnCode SetPriv(H245ReverseLogicalChannelParameters *);
- private:
- H245ReverseLogicalChannelParameters *_revlcpPtr;
- H245DataType *_dataTypeObjPtr;
- H245H2250LogicalChannelParameters *_lcpObjPtr;
- //@DELE
- };
- // H245SigOpenLogicalChannel encapsulates the H.245 OpenLogicalChannel
- // structure.
- // @See:
- // -H245SigReverseLCParams
- // -H245SigForwardLCParams
- //
- // @Version: PX3230S Version 2.2
- class DLLEXPORT H245SigOpenLogicalChannel : public ListElementInterface
- {
- public:
- H245SigOpenLogicalChannel();
- ~H245SigOpenLogicalChannel();
- H245SigOpenLogicalChannel& operator=(H245SigOpenLogicalChannel &);
- // Use this method to set the ForwardLogicalChannelNumber field of
- // H.245 OpenLogicalChannel structure.
- ProtReturnCode SetForwardLCNumber(int fwdLcn);
- // Use this method to set the ForwardLogicalChannelParameters field
- // of the H.245 OpenLogicalChannel structure.
- ProtReturnCode SetForwardLCParams(H245SigForwardLCParams &fwdLcp);
- // Use this method to set the ReverseLogicalChannnelParameters field
- // of the H.245 OpenLogicalChannel structure. Note that this field
- // is optional.
- ProtReturnCode SetReverseLCParams(H245SigReverseLCParams &revlcp);
- // Use this method to get the ForwardLogicalChannelNumber field of
- // H.245 OpenLogicalChannel structure.
- ProtReturnCode GetForwardLCNumber(int &fwdLcn);
- // Use this method to get the ForwardLogicalChannelParameters field
- // of the H.245 OpenLogicalChannel structure.
- ProtReturnCode GetForwardLCParams(H245SigForwardLCParams &fwdLcp);
- // Use this method to get the ReverseLogicalChannelParameters field
- // of the H.245 OpenLogicalChannel structure. If this field is not
- // present then an error value of H245SIG_ITEM_NOT_PRESENT is returned.
- ProtReturnCode GetReverseLCParams(H245SigReverseLCParams &revlcp);
- //@DELB
- public:
- // For protocol internal use.
- H245OpenLogicalChannel * GetPriv();
- ProtReturnCode SetPriv(H245OpenLogicalChannel *);
- int Match(void *key, unsigned long key_type);
- private:
- H245OpenLogicalChannel *_olcPtr;
- int _fwdlcNum;
- H245ForwardLogicalChannelParameters *_fwdlcpPtr;
- H245ReverseLogicalChannelParameters *_revlcpPtr;
- //@DELE
- };
- #endif // __H245TYPES_H__