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

IP电话/视频会议

开发平台:

WINDOWS

  1. /*
  2.  * $Revision: 1.2 $
  3.  * $Date: 1997/10/31 14:53:11 $
  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 : h245ind.h    //
  20. //                                                             //
  21. // Description: The classes for H.245 Indications.    //
  22. //    //
  23. //    //
  24. // 05_May_1997 Created    //
  25. // 28_May_1997 Added FunctionNotSupported class.    //
  26. // 28_Oct_1997 Added the missing methods for Misc Indication   //
  27. //    //
  28. /////////////////////////////////////////////////////////////////
  29. #if !defined(__H245IND_H__)
  30. #define __H245IND_H__
  31. #include "api/h245types.h"
  32. class H245IndicationMessage;
  33. // The types of indications that can be sent or got.
  34. enum H245SigIndicationType
  35. {
  36. IND_INVALID = 0,
  37. IND_NONSTD = 1,
  38. IND_MISC = 10,
  39. IND_USER_INPUT = 14,
  40. IND_H2250_MAX_SKEW = 15,
  41. IND_MC_LOCATION = 16,
  42. IND_CONFERENCE = 17,
  43. IND_FUNC_NOT_SUPP = 19
  44. };
  45. enum H245SigConfIndicationType
  46. {
  47. CONF_IND_INVALID = 0,
  48. CONF_IND_SBE_NUMBER,
  49. CONF_IND_TERM_NUM_ASSIGN,
  50. CONF_IND_TERM_JOINED,
  51. CONF_IND_TERM_LEFT,
  52. CONF_IND_SEEN_BY_ONE,
  53. CONF_IND_CANCEL_SEEN_BY_ONE,
  54. CONF_IND_SEEN_BY_ALL,
  55. CONF_IND_CANCEL_SEEN_BY_ALL,
  56. CONF_IND_TERM_YOU_ARE_SEEING,
  57. CONF_IND_REQ_FLOOR
  58. };
  59. enum H245SigUIIndicationType
  60. {
  61. UI_IND_INVALID = 0,
  62. UI_IND_NONSTD,
  63. UI_IND_ALPHA_NUMERIC
  64. };
  65. enum H245SigMiscIndicationType
  66. {
  67. MISC_IND_INVALID = 0,
  68. MISC_IND_LC_ACTIVE,
  69. MISC_IND_LC_INACTIVE,
  70. MISC_IND_MPOINT,
  71. MISC_IND_CANCEL_MPOINT,
  72. MISC_IND_MZERO_COMM,
  73. MISC_IND_CANCEL_MZERO_COMM,
  74. MISC_IND_MSEC_STATUS,
  75. MISC_IND_CANCEL_MSEC_STATUS,
  76. MISC_IND_VID_IND_RDY_TO_ACTIVE,
  77. MISC_IND_VID_TEMP_S_TRADEOFF, 
  78. MISC_IND_VID_NOT_DEC_MBS
  79. };
  80. enum H245SigFuncNotSuppType
  81. {
  82. FNSP_IND_INVALID = 0,
  83. FNSP_SYNTAX_ERROR = 1,
  84. FNSP_SEMANTIC_ERROR = 2,
  85. FNSP_UNKNOWN = 3
  86. };
  87. class DLLEXPORT H245SigIndication
  88. {
  89. public:
  90. virtual ~H245SigIndication();
  91. // return the type of this message. type is from H245SigIndicationType.
  92. ProtReturnCode GetIndicationType(int &type);
  93. // To allocate a new instance of the appropriate indication message.
  94. static ProtReturnCode Factory(H245SigIndication *&, int type);
  95. H245SigIndication& operator=(H245SigIndication &);
  96. public:
  97. // For Protocol internal use.
  98. virtual H245IndicationMessage *GetPriv() = 0;
  99. virtual ProtReturnCode SetPriv(H245IndicationMessage *msg) = 0;
  100. protected:
  101. // protected constructor. type is from H245SigIndicationType.
  102. H245SigIndication(int type);
  103. H245IndicationMessage *message;
  104. int  type;
  105. };
  106. class DLLEXPORT H245SigNonStdIndication: public H245SigIndication
  107. {
  108. public: 
  109. H245SigNonStdIndication();
  110. ~H245SigNonStdIndication();
  111. // Get and set parameters.
  112. ProtReturnCode GetNonStd(H245SigNonStdParam &non_std);
  113. ProtReturnCode SetNonStd(H245SigNonStdParam &non_std);
  114. public:
  115. // For Protocol internal use.
  116. H245IndicationMessage *GetPriv();
  117. ProtReturnCode SetPriv(H245IndicationMessage *msg);
  118. private:
  119. H245NonStandardParameter *nsp;
  120. };
  121. class DLLEXPORT H245SigConfIndication : public H245SigIndication
  122. {
  123. public : 
  124. // type is one of H245SigConfIndicationType.
  125. H245SigConfIndication();
  126. ~H245SigConfIndication();
  127. // Get and set the type of conference indication.
  128. ProtReturnCode GetType(int &type);
  129. ProtReturnCode SetType(int type);
  130. // Get and Set the TerminalLabel, valid only for the following
  131. // cases of H245SigConfIndicationTypes.
  132. // - CONF_IND_TERM_NUM_ASSIGN
  133. // - CONF_IND_TERM_JOINED
  134. // - CONF_IND_TERM_LEFT
  135. // - CONF_IND_TERM_YOU_ARE_SEEING
  136. ProtReturnCode GetTerminalLabel(int &mcu_number, int &terminal_number);
  137. ProtReturnCode SetTerminalLabel(int mcu_number, int terminal_number);
  138. public:
  139. // For Protocol internal use.
  140. H245IndicationMessage *GetPriv();
  141. ProtReturnCode SetPriv(H245IndicationMessage *msg);
  142. private:
  143. unsigned short mcu_number;
  144. unsigned short terminal_number;
  145. int conf_type;
  146. };
  147. class DLLEXPORT H245SigMaxSkewIndication :public  H245SigIndication
  148. {
  149. public:
  150. H245SigMaxSkewIndication();
  151. ~H245SigMaxSkewIndication();
  152. // Get and set the parameters..
  153. ProtReturnCode GetLCs(int &logchan1, int &logchan2);
  154. ProtReturnCode SetLCs(int logchan1, int logchan2);
  155. ProtReturnCode GetMaxSkew(int &max_skew);
  156. ProtReturnCode SetMaxSkew(int max_skew);
  157. public:
  158. // For Protocol internal use.
  159. H245IndicationMessage *GetPriv();
  160. ProtReturnCode SetPriv(H245IndicationMessage *msg);
  161. private:
  162. unsigned short lc1;
  163. unsigned short lc2;
  164. unsigned short skew;
  165. };
  166. class DLLEXPORT H245SigMCLocIndication :public  H245SigIndication
  167. {
  168. public: 
  169. H245SigMCLocIndication();
  170. ~H245SigMCLocIndication();
  171. // Get and set the parameters.
  172. ProtReturnCode GetSignalAddr(struct sockaddr *signal_addr);
  173. ProtReturnCode SetSignalAddr(struct sockaddr *signal_addr);
  174. public:
  175. // For Protocol internal use.
  176. H245IndicationMessage *GetPriv();
  177. ProtReturnCode SetPriv(H245IndicationMessage *msg);
  178. private:
  179. H245TransportAddress *addr;
  180. };
  181. class DLLEXPORT H245SigUIIndication :public  H245SigIndication
  182. {
  183. public:
  184. H245SigUIIndication();
  185. ~H245SigUIIndication();
  186. // type is one of H245SigUIIndicationType
  187. ProtReturnCode GetType(int &type);
  188. ProtReturnCode SetType(int type);
  189. // Get and set parameters.
  190. ProtReturnCode GetNonStd(H245SigNonStdParam &non_std);
  191. ProtReturnCode SetNonStd(H245SigNonStdParam &non_std);
  192. ProtReturnCode GetAlphaNumeric(char *& alpha_numeric);
  193. ProtReturnCode SetAlphaNumeric(char * alpha_numeric);
  194. public:
  195. // For Protocol internal use.
  196. H245IndicationMessage *GetPriv();
  197. ProtReturnCode SetPriv(H245IndicationMessage *msg);
  198. private:
  199. H245NonStandardParameter *nsp;
  200. char *an;
  201. int ui_type;
  202. };
  203. class DLLEXPORT H245SigMiscIndication :public  H245SigIndication
  204. {
  205. public:
  206. H245SigMiscIndication();
  207. ~H245SigMiscIndication();
  208. // type is one of H245SigMiscIndicationType
  209. ProtReturnCode GetType(int &type);
  210. ProtReturnCode SetType(int type);
  211. ProtReturnCode GetLC(int &lc_num);
  212. ProtReturnCode SetLC(int lc_num);
  213. // if the type is MISC_IND_VID_TEMP_S_TRADEOFF, then use the 
  214. // following methods to provide or retrieve a value.
  215. ProtReturnCode SetVideoTST(int value);
  216. ProtReturnCode GetVideoTST(int &value);
  217. // if the type is , MISC_IND_VID_NOT_DEC_MBS then use the following 
  218. // methods to provide or retrieve the values.
  219. ProtReturnCode SetVideoMBs(int first_mb, int num_mbs, int temporal_ref);
  220. ProtReturnCode GetVideoMBs(int &first_mb, int &num_mbs, 
  221. int &temporal_ref);
  222. public:
  223. // For Protocol internal use.
  224. H245IndicationMessage *GetPriv();
  225. ProtReturnCode SetPriv(H245IndicationMessage *msg);
  226. private:
  227. int misc_type;
  228. unsigned short lc;
  229. unsigned short tradeoff;
  230. unsigned short first_mb;
  231. unsigned short number_of_mbs;
  232. unsigned short temporal_reference;
  233. };
  234. class DLLEXPORT H245SigFuncNotSupp : public H245SigIndication
  235. {
  236. public:
  237. H245SigFuncNotSupp();
  238. ~H245SigFuncNotSupp();
  239. // type is one of H245SigFuncNotSuppType
  240. ProtReturnCode GetType(int &type);
  241. ProtReturnCode SetType(int type);
  242. public:
  243. // For Protocol internal use.
  244. H245IndicationMessage *GetPriv();
  245. ProtReturnCode SetPriv(H245IndicationMessage *msg);
  246. private:
  247. int fnsp_type;
  248. };
  249. #endif