h225ie.h
资源名称:h323.zip [点击查看]
上传用户:hnnddl
上传日期:2007-01-06
资源大小:3580k
文件大小:6k
源码类别:
IP电话/视频会议
开发平台:
WINDOWS
- /*
- * $Revision: 1.4 $
- * $Date: 1999/03/30 21:55:44 $
- */
- ////////////////////////////////////////////////////////////////
- // 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 : h225ie.h //
- // //
- // //
- // //
- // History: //
- // //
- // 26_Mar_1997 Created //
- // 28_Apr_1997 Code Review PASS1, added Dump routines. //
- // 29_Apr_1997 Code Review PASS2. //
- // 08_Jul_1997 Merged Sun5 changes. //
- // 03_Aug_1998 Added GetCodingStd() and SetCodingStd() //
- // to H225CSBearerCapabilityIE class //
- // 03_Aug_1998 Added H225CSBCCodingStandard enum //
- // 18_Mar_1999 Replaced CauseIE implementation to be inline //
- // recommendation Q.850 //
- // //
- /////////////////////////////////////////////////////////////////
- #if !defined(__H225IE_H__)
- #define __H225IE_H__
- #include "q931/q931ie.h"
- // Forward declaration.
- class Logger;
- // used in bearer capability information element.
- enum H225CSBCCodingStandard
- {
- BC_CS_ITUT = 0, // IUT-T/CCITT standardized coding
- BC_CS_ISO = 1 // other international standard
- };
- // used in bearer capability information element.
- enum H225CSBCInfoTransferCap
- {
- BC_ITC_SPEECH = 0x00, // Speech
- BC_ITC_UNRES_DIG = 0x08, // unrestricted digital information
- BC_ITC_RES_DIG = 0x09, // restricted ditigal information
- BC_ITC_31 = 0x10 // 3.1 kHz audio
- };
- // used in bearer capability information element.
- enum H225CSBCInfoTransferRate
- {
- BC_ITR_PACKET = 0x00, // Packet mode.
- BC_ITR_64 = 0x10, // 64 kbit/s
- BC_ITR_2x64 = 0x11, // 2 x 64 kbit/s
- BC_ITR_384 = 0x13, // 384 kbit/s
- BC_ITR_1536 = 0x15, // 1536 kbit/s
- BC_ITR_1920 = 0x17, // 1920 kbit/s
- BC_ITR_MULTIRATE = 0x18 // multirate
- };
- // used in bearer capability information element.
- enum H225CSBCLayer1Prot
- {
- BC_L1P_ULAW = 0x02, // G744 ulaw
- BC_L1P_ALAW = 0x03, // G711 alaw
- BC_L1P_VID = 0x05 // H.221 and H.242
- };
- //
- // The progress indicatior information element.
- //
- class DLLEXPORT H225CSProgressIndicatorIE : public Q931IE
- {
- public:
- // loc and desc are values from the enums
- // Q931ProgressIndicatorLoc and
- // Q931ProgressDesc respectively.
- // The only allowed loc values are
- // LOC_USER, LOC_PRIV_NET_LOCAL_USER
- // and LOC_PRIV_NET_REMOTE_USER.
- H225CSProgressIndicatorIE(int loc, int desc);
- H225CSProgressIndicatorIE();
- ~H225CSProgressIndicatorIE();
- ProtReturnCode SetLoc(int loc);
- ProtReturnCode GetLoc(int& loc);
- ProtReturnCode SetDesc(int desc);
- ProtReturnCode GetDesc(int& desc);
- // Override base class Set method.
- ProtReturnCode Set(char *buf, int length);
- H225CSProgressIndicatorIE & operator=(H225CSProgressIndicatorIE &);
- // For protocol internal use..
- void Dump(Logger *logger);
- };
- //
- // The bearer capability information element.
- //
- class DLLEXPORT H225CSBearerCapabilityIE : public Q931IE
- {
- public:
- H225CSBearerCapabilityIE();
- ~H225CSBearerCapabilityIE();
- // std is from enum H225CSBCCodingStandard
- ProtReturnCode GetCodingStd(int &std);
- ProtReturnCode SetCodingStd(int std);
- // cap is from enum H225CSBCInfoTransferCap
- ProtReturnCode GetInfoTransferCap(int &cap);
- ProtReturnCode SetInfoTransferCap(int cap);
- // rate is from enum H225CSBCInfoTransferRate
- ProtReturnCode GetInfoTransferRate(int &rate);
- ProtReturnCode SetInfoTransferRate(int rate);
- // If multirate is specified as info transfer rate,
- // then use this method to speficy the multiplier to
- // the base rate.
- ProtReturnCode GetRateMultiplier(int &value);
- ProtReturnCode SetRateMultiplier(int value);
- // Set the Layer 1 protocol to Alaw, Mlaw, H221 or H242
- // value is from enum H225CSBCLayer1Prot.
- ProtReturnCode GetLayer1Prot(int &value);
- ProtReturnCode SetLayer1Prot(int value);
- H225CSBearerCapabilityIE & operator=(H225CSBearerCapabilityIE &);
- // For Protocol internal use.
- void Dump(Logger *logger);
- private:
- ProtReturnCode alloc(int is_multirate);
- };
- // This class encapsulates the Cause Information Element as specified in
- // recommendations Q.931,Q.850.
- // @See:
- // -Q931CauseIE
- //
- // @Version: PX3230S Version 2.3.2
- class DLLEXPORT H225CSCauseIE : public Q931CauseIE
- {
- public:
- H225CSCauseIE();
- H225CSCauseIE(unsigned char coding_std, unsigned char location,
- unsigned char value);
- ~H225CSCauseIE();
- virtual ProtReturnCode SetCodingStd(unsigned char cause_code_std);
- virtual ProtReturnCode GetCodingStd(unsigned char& cause_code_std);
- virtual ProtReturnCode SetLocation(unsigned char cause_location);
- virtual ProtReturnCode GetLocation(unsigned char& cause_location);
- virtual ProtReturnCode SetCause(unsigned char cause_value);
- virtual ProtReturnCode GetCause(unsigned char& cause_value);
- H225CSCauseIE& operator=(H225CSCauseIE&);
- // For Protocol internal use..
- void Dump(Logger *logger);
- };
- #endif //__H225IE_H__