h245rr.h
资源名称:h323.zip [点击查看]
上传用户:hnnddl
上传日期:2007-01-06
资源大小:3580k
文件大小:5k
源码类别:
IP电话/视频会议
开发平台:
WINDOWS
- /*
- * $Revision: 1.3 $
- * $Date: 1998/04/01 22:43:47 $
- */
- ////////////////////////////////////////////////////////////////
- // 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 : h245rr.h //
- // //
- // Description: The classes for H245 Request/Responses. //
- // //
- // //
- // 20_May_1997 Created //
- // 08_Jul_1997 Merged Sun5 changes. //
- // 27_Mar_1998 Addition of remaining fields of version 1 into //
- // conference request and response classes. //
- // //
- /////////////////////////////////////////////////////////////////
- #if !defined(__H245RR_H__)
- #define __H245RR_H__
- #include "api/h245types.h"
- class H245ConferenceRequest;
- class H245ConferenceResponse;
- enum H245SigConfRequestType
- {
- CFREQ_TERMINAL_LIST = 1,
- CFREQ_MAKE_ME_CHAIR = 2,
- CFREQ_CANCEL_MAKE_ME_CHAIR = 3,
- CFREQ_DROP_TERMINAL = 4,
- CFREQ_TERMINAL_ID = 5,
- CFREQ_ENTER_H243_PASSWORD = 6,
- CFREQ_ENTER_H243_TERMINALID = 7,
- CFREQ_ENTER_H243_CONFID = 8
- };
- enum H245SigConfResponseType
- {
- CFRESP_MC_TERMINAL_ID = 1,
- CFRESP_TERMINAL_ID = 2,
- CFRESP_CONFID = 3,
- CFRESP_PASSWD = 4,
- CFRESP_TERMINAL_LIST = 5,
- CFRESP_VIDEO_COMMAND_REJECT = 6,
- CFRESP_TERMINAL_DROP_REJECT = 7,
- CFRESP_MAKE_ME_CHAIR = 8
- };
- // values to be passed in H245SigConfResponse::SetMakeMeChair() function
- enum H245SigMakeMeChairResp
- {
- MMCR_GRANTED_CHAIR = 1,
- MMCR_DENIED_CHAIR = 2
- };
- class DLLEXPORT H245SigConfRequest
- {
- public:
- H245SigConfRequest();
- ~H245SigConfRequest();
- // type is one of enum H245SigConfRequestType.
- ProtReturnCode SetType(int type);
- ProtReturnCode GetType(int &type);
- ProtReturnCode SetTerminalLabel(H245SigTerminalLabel &l);
- ProtReturnCode GetTerminalLabel(H245SigTerminalLabel &l);
- // assignment operator
- H245SigConfRequest& operator=(H245SigConfRequest &);
- // for protocol internal use.
- H245ConferenceRequest *GetPriv();
- ProtReturnCode SetPriv(H245ConferenceRequest *priv);
- private:
- int type;
- H245ConferenceRequest *req;
- H245SigTerminalLabel label;
- };
- class DLLEXPORT H245SigConfResponse
- {
- public:
- H245SigConfResponse();
- ~H245SigConfResponse();
- // type is one of enum H245SigConfResponseType
- ProtReturnCode SetType(int type);
- ProtReturnCode GetType(int &type);
- // For type = CFRESP_MC_TERMINAL_ID
- // terminal_id is an octet string of length 128.
- ProtReturnCode GetMCTerminalID(H245SigTerminalLabel &label,
- unsigned char *& terminal_id, int &length);
- ProtReturnCode SetMCTerminalID(H245SigTerminalLabel &label,
- unsigned char *terminal_id, int length);
- // For type = CFRESP_TERMINAL_ID
- // terminal_id is an octet string of length 128.
- ProtReturnCode GetTerminalID(H245SigTerminalLabel &label,
- unsigned char *& terminal_id, int &length);
- ProtReturnCode SetTerminalID(H245SigTerminalLabel &label,
- unsigned char *terminal_id, int length);
- // For type = CFRESP_CONF_ID
- // conf_id is an octet string of length 32.
- ProtReturnCode GetConfID(H245SigTerminalLabel &label,
- unsigned char *& terminal_id, int &length);
- ProtReturnCode SetConfID(H245SigTerminalLabel &label,
- unsigned char *conf_id, int length);
- // For type = CFRESP_PASSWD_RESPONSE
- // passwd is an octet string of length 32.
- ProtReturnCode GetPasswd(H245SigTerminalLabel &label,
- unsigned char *& passwd, int &length);
- ProtReturnCode SetPasswd(H245SigTerminalLabel &label,
- unsigned char *passwd, int length);
- // Methods to manipulate the terminal list. Calls to these
- // methods are valid iff type == CFRESP_TERMINAL_LIST.
- ProtReturnCode GetTerminalListLength(int &length);
- ProtReturnCode GetTerminalList(H245SigTerminalLabel list[],
- int &length);
- ProtReturnCode AddToTerminalList(H245SigTerminalLabel &tl);
- // response is one of H245SigMakeMeChairResp
- ProtReturnCode GetMakeMeChairResponse(int &response);
- ProtReturnCode SetMakeMeChairResponse(int response);
- // assignment operator
- H245SigConfResponse& operator=(H245SigConfResponse &);
- // for protocol internal use.
- H245ConferenceResponse *GetPriv();
- ProtReturnCode SetPriv(H245ConferenceResponse *priv);
- private:
- H245ConferenceResponse *resp;
- int type;
- unsigned char terminal_id[128];
- int terminal_id_length;
- unsigned char conf_id[32];
- int conf_id_length;
- unsigned char passwd[32];
- int passwd_length;
- H245SigTerminalLabel label;
- void *terminal_label_list;
- int list_length;
- int make_me_chair;
- };
- #endif // __H245RR_H__