h245rr.h
上传用户:hnnddl
上传日期:2007-01-06
资源大小:3580k
文件大小:5k
源码类别:

IP电话/视频会议

开发平台:

WINDOWS

  1. /*
  2.  * $Revision: 1.3 $
  3.  * $Date: 1998/04/01 22:43:47 $
  4.  */
  5. ////////////////////////////////////////////////////////////////
  6. //               Copyright (c) 1996,97 Lucent Technologies    //
  7. //                       All Rights Reserved                  //
  8. //                                                            //
  9. //                       THIS IS UNPUBLISHED                  //
  10. //                       PROPRIETARY SOURCE                   //
  11. //                   CODE OF Lucent Technologies              //
  12. // AND elemedia   //
  13. //                                                            //
  14. //           The copyright notice above does not evidence any //
  15. //          actual or intended publication of such source code//
  16. ////////////////////////////////////////////////////////////////
  17. //
  18. /////////////////////////////////////////////////////////////////
  19. // File : h245rr.h    //
  20. //                                                             //
  21. // Description: The classes for H245 Request/Responses.    //
  22. //    //
  23. //    //
  24. // 20_May_1997 Created    //
  25. // 08_Jul_1997 Merged Sun5 changes.    //
  26. // 27_Mar_1998 Addition of remaining fields of version 1 into  //
  27. //    conference request and response classes.        //
  28. //    //
  29. /////////////////////////////////////////////////////////////////
  30. #if !defined(__H245RR_H__)
  31. #define __H245RR_H__
  32. #include "api/h245types.h"
  33. class H245ConferenceRequest;
  34. class H245ConferenceResponse;
  35. enum H245SigConfRequestType
  36. {
  37. CFREQ_TERMINAL_LIST = 1,
  38. CFREQ_MAKE_ME_CHAIR = 2,
  39. CFREQ_CANCEL_MAKE_ME_CHAIR = 3,
  40. CFREQ_DROP_TERMINAL = 4,
  41. CFREQ_TERMINAL_ID = 5,
  42. CFREQ_ENTER_H243_PASSWORD = 6,
  43. CFREQ_ENTER_H243_TERMINALID = 7,
  44. CFREQ_ENTER_H243_CONFID = 8
  45. };
  46. enum H245SigConfResponseType
  47. {
  48. CFRESP_MC_TERMINAL_ID = 1,
  49. CFRESP_TERMINAL_ID = 2,
  50. CFRESP_CONFID = 3,
  51. CFRESP_PASSWD = 4,
  52. CFRESP_TERMINAL_LIST = 5,
  53. CFRESP_VIDEO_COMMAND_REJECT = 6,
  54. CFRESP_TERMINAL_DROP_REJECT = 7,
  55. CFRESP_MAKE_ME_CHAIR = 8
  56. };
  57. // values to be passed in H245SigConfResponse::SetMakeMeChair() function
  58. enum H245SigMakeMeChairResp
  59. {
  60. MMCR_GRANTED_CHAIR = 1,
  61. MMCR_DENIED_CHAIR = 2
  62. };
  63. class DLLEXPORT H245SigConfRequest
  64. {
  65. public:
  66. H245SigConfRequest();
  67. ~H245SigConfRequest();
  68. // type is one of enum H245SigConfRequestType.
  69. ProtReturnCode SetType(int type);
  70. ProtReturnCode GetType(int &type);
  71. ProtReturnCode SetTerminalLabel(H245SigTerminalLabel &l);
  72. ProtReturnCode GetTerminalLabel(H245SigTerminalLabel &l);
  73. // assignment operator
  74. H245SigConfRequest& operator=(H245SigConfRequest &);
  75. // for protocol internal use.
  76. H245ConferenceRequest *GetPriv();
  77. ProtReturnCode SetPriv(H245ConferenceRequest *priv);
  78. private:
  79. int type;
  80. H245ConferenceRequest *req;
  81. H245SigTerminalLabel label;
  82. };
  83. class DLLEXPORT H245SigConfResponse
  84. {
  85. public:
  86. H245SigConfResponse();
  87. ~H245SigConfResponse();
  88. // type is one of enum H245SigConfResponseType
  89. ProtReturnCode SetType(int type);
  90. ProtReturnCode GetType(int &type);
  91. // For type = CFRESP_MC_TERMINAL_ID 
  92. // terminal_id is an octet string of length 128.
  93. ProtReturnCode GetMCTerminalID(H245SigTerminalLabel &label,
  94. unsigned char *& terminal_id, int &length);
  95. ProtReturnCode SetMCTerminalID(H245SigTerminalLabel &label,
  96. unsigned char *terminal_id, int length);
  97. // For type = CFRESP_TERMINAL_ID 
  98. // terminal_id is an octet string of length 128.
  99. ProtReturnCode GetTerminalID(H245SigTerminalLabel &label,
  100. unsigned char *& terminal_id, int &length);
  101. ProtReturnCode SetTerminalID(H245SigTerminalLabel &label,
  102. unsigned char *terminal_id, int length);
  103. // For type = CFRESP_CONF_ID 
  104. // conf_id is an octet string of length 32.
  105. ProtReturnCode GetConfID(H245SigTerminalLabel &label,
  106. unsigned char *& terminal_id, int &length);
  107. ProtReturnCode SetConfID(H245SigTerminalLabel &label,
  108. unsigned char *conf_id, int length);
  109. // For type = CFRESP_PASSWD_RESPONSE 
  110. // passwd is an octet string of length 32.
  111. ProtReturnCode GetPasswd(H245SigTerminalLabel &label,
  112. unsigned char *& passwd, int &length);
  113. ProtReturnCode SetPasswd(H245SigTerminalLabel &label,
  114. unsigned char *passwd, int length);
  115. // Methods to manipulate the terminal list. Calls to these
  116. // methods are valid iff type ==  CFRESP_TERMINAL_LIST. 
  117. ProtReturnCode GetTerminalListLength(int &length);
  118. ProtReturnCode GetTerminalList(H245SigTerminalLabel list[],
  119. int &length);
  120. ProtReturnCode AddToTerminalList(H245SigTerminalLabel &tl);
  121. // response is one of H245SigMakeMeChairResp
  122. ProtReturnCode GetMakeMeChairResponse(int &response);
  123. ProtReturnCode SetMakeMeChairResponse(int response);
  124. // assignment operator
  125. H245SigConfResponse& operator=(H245SigConfResponse &);
  126. // for protocol internal use.
  127. H245ConferenceResponse *GetPriv();
  128. ProtReturnCode SetPriv(H245ConferenceResponse *priv);
  129. private:
  130. H245ConferenceResponse *resp;
  131. int type;
  132. unsigned char terminal_id[128];
  133. int terminal_id_length;
  134. unsigned char conf_id[32];
  135. int conf_id_length;
  136. unsigned char passwd[32];
  137. int passwd_length;
  138. H245SigTerminalLabel label;
  139. void *terminal_label_list;
  140. int list_length;
  141. int make_me_chair;
  142. };
  143. #endif // __H245RR_H__