h245ind.h
资源名称:h323.zip [点击查看]
上传用户:hnnddl
上传日期:2007-01-06
资源大小:3580k
文件大小:8k
源码类别:
IP电话/视频会议
开发平台:
WINDOWS
- /*
- * $Revision: 1.2 $
- * $Date: 1997/10/31 14:53:11 $
- */
- ////////////////////////////////////////////////////////////////
- // 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 : h245ind.h //
- // //
- // Description: The classes for H.245 Indications. //
- // //
- // //
- // 05_May_1997 Created //
- // 28_May_1997 Added FunctionNotSupported class. //
- // 28_Oct_1997 Added the missing methods for Misc Indication //
- // //
- /////////////////////////////////////////////////////////////////
- #if !defined(__H245IND_H__)
- #define __H245IND_H__
- #include "api/h245types.h"
- class H245IndicationMessage;
- // The types of indications that can be sent or got.
- enum H245SigIndicationType
- {
- IND_INVALID = 0,
- IND_NONSTD = 1,
- IND_MISC = 10,
- IND_USER_INPUT = 14,
- IND_H2250_MAX_SKEW = 15,
- IND_MC_LOCATION = 16,
- IND_CONFERENCE = 17,
- IND_FUNC_NOT_SUPP = 19
- };
- enum H245SigConfIndicationType
- {
- CONF_IND_INVALID = 0,
- CONF_IND_SBE_NUMBER,
- CONF_IND_TERM_NUM_ASSIGN,
- CONF_IND_TERM_JOINED,
- CONF_IND_TERM_LEFT,
- CONF_IND_SEEN_BY_ONE,
- CONF_IND_CANCEL_SEEN_BY_ONE,
- CONF_IND_SEEN_BY_ALL,
- CONF_IND_CANCEL_SEEN_BY_ALL,
- CONF_IND_TERM_YOU_ARE_SEEING,
- CONF_IND_REQ_FLOOR
- };
- enum H245SigUIIndicationType
- {
- UI_IND_INVALID = 0,
- UI_IND_NONSTD,
- UI_IND_ALPHA_NUMERIC
- };
- enum H245SigMiscIndicationType
- {
- MISC_IND_INVALID = 0,
- MISC_IND_LC_ACTIVE,
- MISC_IND_LC_INACTIVE,
- MISC_IND_MPOINT,
- MISC_IND_CANCEL_MPOINT,
- MISC_IND_MZERO_COMM,
- MISC_IND_CANCEL_MZERO_COMM,
- MISC_IND_MSEC_STATUS,
- MISC_IND_CANCEL_MSEC_STATUS,
- MISC_IND_VID_IND_RDY_TO_ACTIVE,
- MISC_IND_VID_TEMP_S_TRADEOFF,
- MISC_IND_VID_NOT_DEC_MBS
- };
- enum H245SigFuncNotSuppType
- {
- FNSP_IND_INVALID = 0,
- FNSP_SYNTAX_ERROR = 1,
- FNSP_SEMANTIC_ERROR = 2,
- FNSP_UNKNOWN = 3
- };
- class DLLEXPORT H245SigIndication
- {
- public:
- virtual ~H245SigIndication();
- // return the type of this message. type is from H245SigIndicationType.
- ProtReturnCode GetIndicationType(int &type);
- // To allocate a new instance of the appropriate indication message.
- static ProtReturnCode Factory(H245SigIndication *&, int type);
- H245SigIndication& operator=(H245SigIndication &);
- public:
- // For Protocol internal use.
- virtual H245IndicationMessage *GetPriv() = 0;
- virtual ProtReturnCode SetPriv(H245IndicationMessage *msg) = 0;
- protected:
- // protected constructor. type is from H245SigIndicationType.
- H245SigIndication(int type);
- H245IndicationMessage *message;
- int type;
- };
- class DLLEXPORT H245SigNonStdIndication: public H245SigIndication
- {
- public:
- H245SigNonStdIndication();
- ~H245SigNonStdIndication();
- // Get and set parameters.
- ProtReturnCode GetNonStd(H245SigNonStdParam &non_std);
- ProtReturnCode SetNonStd(H245SigNonStdParam &non_std);
- public:
- // For Protocol internal use.
- H245IndicationMessage *GetPriv();
- ProtReturnCode SetPriv(H245IndicationMessage *msg);
- private:
- H245NonStandardParameter *nsp;
- };
- class DLLEXPORT H245SigConfIndication : public H245SigIndication
- {
- public :
- // type is one of H245SigConfIndicationType.
- H245SigConfIndication();
- ~H245SigConfIndication();
- // Get and set the type of conference indication.
- ProtReturnCode GetType(int &type);
- ProtReturnCode SetType(int type);
- // Get and Set the TerminalLabel, valid only for the following
- // cases of H245SigConfIndicationTypes.
- // - CONF_IND_TERM_NUM_ASSIGN
- // - CONF_IND_TERM_JOINED
- // - CONF_IND_TERM_LEFT
- // - CONF_IND_TERM_YOU_ARE_SEEING
- ProtReturnCode GetTerminalLabel(int &mcu_number, int &terminal_number);
- ProtReturnCode SetTerminalLabel(int mcu_number, int terminal_number);
- public:
- // For Protocol internal use.
- H245IndicationMessage *GetPriv();
- ProtReturnCode SetPriv(H245IndicationMessage *msg);
- private:
- unsigned short mcu_number;
- unsigned short terminal_number;
- int conf_type;
- };
- class DLLEXPORT H245SigMaxSkewIndication :public H245SigIndication
- {
- public:
- H245SigMaxSkewIndication();
- ~H245SigMaxSkewIndication();
- // Get and set the parameters..
- ProtReturnCode GetLCs(int &logchan1, int &logchan2);
- ProtReturnCode SetLCs(int logchan1, int logchan2);
- ProtReturnCode GetMaxSkew(int &max_skew);
- ProtReturnCode SetMaxSkew(int max_skew);
- public:
- // For Protocol internal use.
- H245IndicationMessage *GetPriv();
- ProtReturnCode SetPriv(H245IndicationMessage *msg);
- private:
- unsigned short lc1;
- unsigned short lc2;
- unsigned short skew;
- };
- class DLLEXPORT H245SigMCLocIndication :public H245SigIndication
- {
- public:
- H245SigMCLocIndication();
- ~H245SigMCLocIndication();
- // Get and set the parameters.
- ProtReturnCode GetSignalAddr(struct sockaddr *signal_addr);
- ProtReturnCode SetSignalAddr(struct sockaddr *signal_addr);
- public:
- // For Protocol internal use.
- H245IndicationMessage *GetPriv();
- ProtReturnCode SetPriv(H245IndicationMessage *msg);
- private:
- H245TransportAddress *addr;
- };
- class DLLEXPORT H245SigUIIndication :public H245SigIndication
- {
- public:
- H245SigUIIndication();
- ~H245SigUIIndication();
- // type is one of H245SigUIIndicationType
- ProtReturnCode GetType(int &type);
- ProtReturnCode SetType(int type);
- // Get and set parameters.
- ProtReturnCode GetNonStd(H245SigNonStdParam &non_std);
- ProtReturnCode SetNonStd(H245SigNonStdParam &non_std);
- ProtReturnCode GetAlphaNumeric(char *& alpha_numeric);
- ProtReturnCode SetAlphaNumeric(char * alpha_numeric);
- public:
- // For Protocol internal use.
- H245IndicationMessage *GetPriv();
- ProtReturnCode SetPriv(H245IndicationMessage *msg);
- private:
- H245NonStandardParameter *nsp;
- char *an;
- int ui_type;
- };
- class DLLEXPORT H245SigMiscIndication :public H245SigIndication
- {
- public:
- H245SigMiscIndication();
- ~H245SigMiscIndication();
- // type is one of H245SigMiscIndicationType
- ProtReturnCode GetType(int &type);
- ProtReturnCode SetType(int type);
- ProtReturnCode GetLC(int &lc_num);
- ProtReturnCode SetLC(int lc_num);
- // if the type is MISC_IND_VID_TEMP_S_TRADEOFF, then use the
- // following methods to provide or retrieve a value.
- ProtReturnCode SetVideoTST(int value);
- ProtReturnCode GetVideoTST(int &value);
- // if the type is , MISC_IND_VID_NOT_DEC_MBS then use the following
- // methods to provide or retrieve the values.
- ProtReturnCode SetVideoMBs(int first_mb, int num_mbs, int temporal_ref);
- ProtReturnCode GetVideoMBs(int &first_mb, int &num_mbs,
- int &temporal_ref);
- public:
- // For Protocol internal use.
- H245IndicationMessage *GetPriv();
- ProtReturnCode SetPriv(H245IndicationMessage *msg);
- private:
- int misc_type;
- unsigned short lc;
- unsigned short tradeoff;
- unsigned short first_mb;
- unsigned short number_of_mbs;
- unsigned short temporal_reference;
- };
- class DLLEXPORT H245SigFuncNotSupp : public H245SigIndication
- {
- public:
- H245SigFuncNotSupp();
- ~H245SigFuncNotSupp();
- // type is one of H245SigFuncNotSuppType
- ProtReturnCode GetType(int &type);
- ProtReturnCode SetType(int type);
- public:
- // For Protocol internal use.
- H245IndicationMessage *GetPriv();
- ProtReturnCode SetPriv(H245IndicationMessage *msg);
- private:
- int fnsp_type;
- };
- #endif