Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

496 lines
14 KiB

  1. /*++
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. callevnt.h
  5. Abstract:
  6. Author:
  7. mquinton 09-04-98
  8. Notes:
  9. Revision History:
  10. --*/
  11. #ifndef __CALLEVNT_H_
  12. #define __CALLEVNT_H_
  13. class CCallStateEvent :
  14. public CTAPIComObjectRoot<CCallStateEvent, CComMultiThreadModelNoCS>,
  15. public CComDualImpl<ITCallStateEvent, &IID_ITCallStateEvent, &LIBID_TAPI3Lib>,
  16. public CObjectSafeImpl
  17. {
  18. public:
  19. CCallStateEvent(){}
  20. void
  21. FinalRelease();
  22. static HRESULT FireEvent(
  23. ITCallInfo * pCall,
  24. CALL_STATE state,
  25. CALL_STATE_EVENT_CAUSE cause,
  26. CTAPI * pTapi,
  27. long lCallbackInstance
  28. );
  29. DECLARE_MARSHALQI(CCallStateEvent)
  30. DECLARE_QI()
  31. DECLARE_TRACELOG_CLASS(CCallStateEvent)
  32. BEGIN_COM_MAP(CCallStateEvent)
  33. COM_INTERFACE_ENTRY(IDispatch)
  34. COM_INTERFACE_ENTRY(ITCallStateEvent)
  35. COM_INTERFACE_ENTRY(IObjectSafety)
  36. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  37. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  38. END_COM_MAP()
  39. protected:
  40. ITCallInfo * m_pCall;
  41. CALL_STATE m_CallState;
  42. CALL_STATE_EVENT_CAUSE m_CallStateEventCause;
  43. long m_lCallbackInstance;
  44. #if DBG
  45. PWSTR m_pDebug;
  46. #endif
  47. public:
  48. STDMETHOD(get_Call)(ITCallInfo ** ppCallInfo);
  49. STDMETHOD(get_State)(CALL_STATE * pCallState);
  50. STDMETHOD(get_Cause)(CALL_STATE_EVENT_CAUSE * pCEC);
  51. STDMETHOD(get_CallbackInstance)(long * plCallbackInstance);
  52. };
  53. class CCallNotificationEvent :
  54. public CTAPIComObjectRoot<CCallNotificationEvent, CComMultiThreadModelNoCS>,
  55. public CComDualImpl<ITCallNotificationEvent, &IID_ITCallNotificationEvent, &LIBID_TAPI3Lib>,
  56. public CObjectSafeImpl
  57. {
  58. public:
  59. CCallNotificationEvent(){}
  60. void
  61. FinalRelease();
  62. static HRESULT FireEvent(
  63. ITCallInfo * pCall,
  64. CALL_NOTIFICATION_EVENT CallNotificationEvent,
  65. CTAPI * pTapi,
  66. long lCallbackInstance
  67. );
  68. DECLARE_MARSHALQI(CCallNotificationEvent)
  69. DECLARE_QI()
  70. DECLARE_TRACELOG_CLASS(CCallNotificationEvent)
  71. BEGIN_COM_MAP(CCallNotificationEvent)
  72. COM_INTERFACE_ENTRY(IDispatch)
  73. COM_INTERFACE_ENTRY(ITCallNotificationEvent)
  74. COM_INTERFACE_ENTRY(IObjectSafety)
  75. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  76. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  77. END_COM_MAP()
  78. protected:
  79. ITCallInfo * m_pCall;
  80. CALL_NOTIFICATION_EVENT m_CallNotificationEvent;
  81. long m_lCallbackInstance;
  82. #if DBG
  83. PWSTR m_pDebug;
  84. #endif
  85. public:
  86. STDMETHOD(get_Call)(ITCallInfo ** ppCall);
  87. STDMETHOD(get_Event)(CALL_NOTIFICATION_EVENT * pCallNotificationEvent);
  88. STDMETHOD(get_CallbackInstance)(long * plCallbackInstance);
  89. };
  90. class CCallMediaEvent :
  91. public CTAPIComObjectRoot<CCallMediaEvent, CComMultiThreadModelNoCS>,
  92. public CComDualImpl<ITCallMediaEvent, &IID_ITCallMediaEvent, &LIBID_TAPI3Lib>,
  93. public CObjectSafeImpl
  94. {
  95. public:
  96. CCallMediaEvent(){}
  97. void
  98. FinalRelease();
  99. static HRESULT FireEvent(
  100. ITCallInfo * pCall,
  101. CALL_MEDIA_EVENT Event,
  102. CALL_MEDIA_EVENT_CAUSE Cause,
  103. CTAPI * pTapi,
  104. ITTerminal * pTerminal,
  105. ITStream * pStream,
  106. HRESULT hr
  107. );
  108. DECLARE_MARSHALQI(CCallMediaEvent)
  109. DECLARE_QI()
  110. DECLARE_TRACELOG_CLASS(CCallMediaEvent)
  111. BEGIN_COM_MAP(CCallMediaEvent)
  112. COM_INTERFACE_ENTRY(IDispatch)
  113. COM_INTERFACE_ENTRY(ITCallMediaEvent)
  114. COM_INTERFACE_ENTRY(IObjectSafety)
  115. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  116. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  117. END_COM_MAP()
  118. protected:
  119. ITCallInfo * m_pCall;
  120. CALL_MEDIA_EVENT m_Event;
  121. CALL_MEDIA_EVENT_CAUSE m_Cause;
  122. HRESULT m_hr;
  123. ITTerminal * m_pTerminal;
  124. ITStream * m_pStream;
  125. #if DBG
  126. PWSTR m_pDebug;
  127. #endif
  128. public:
  129. STDMETHOD(get_Call)(ITCallInfo ** ppCallInfo);
  130. STDMETHOD(get_Event)(CALL_MEDIA_EVENT * pCallMediaEvent);
  131. STDMETHOD(get_Cause)(CALL_MEDIA_EVENT_CAUSE * pCause);
  132. STDMETHOD(get_Error)(HRESULT * phrError);
  133. STDMETHOD(get_Terminal)(ITTerminal ** ppTerminal);
  134. STDMETHOD(get_Stream)(ITStream ** ppStream);
  135. };
  136. class CCallInfoChangeEvent :
  137. public CTAPIComObjectRoot<CCallInfoChangeEvent, CComMultiThreadModelNoCS>,
  138. public CComDualImpl<ITCallInfoChangeEvent, &IID_ITCallInfoChangeEvent, &LIBID_TAPI3Lib>,
  139. public CObjectSafeImpl
  140. {
  141. public:
  142. CCallInfoChangeEvent(){}
  143. void
  144. FinalRelease();
  145. static HRESULT FireEvent(
  146. ITCallInfo * pCall,
  147. CALLINFOCHANGE_CAUSE Cause,
  148. CTAPI * pTapi,
  149. long lCallbackInstance
  150. );
  151. DECLARE_MARSHALQI(CCallInfoChangeEvent)
  152. DECLARE_QI()
  153. DECLARE_TRACELOG_CLASS(CCallInfoChangeEvent)
  154. BEGIN_COM_MAP(CCallInfoChangeEvent)
  155. COM_INTERFACE_ENTRY(IDispatch)
  156. COM_INTERFACE_ENTRY(ITCallInfoChangeEvent)
  157. COM_INTERFACE_ENTRY(IObjectSafety)
  158. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  159. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  160. END_COM_MAP()
  161. protected:
  162. ITCallInfo * m_pCall;
  163. CALLINFOCHANGE_CAUSE m_Cause;
  164. long m_lCallbackInstance;
  165. #if DBG
  166. PWSTR m_pDebug;
  167. #endif
  168. public:
  169. STDMETHOD(get_Call)( ITCallInfo ** ppCallInfo);
  170. STDMETHOD(get_Cause)( CALLINFOCHANGE_CAUSE * pCallMediaCause );
  171. STDMETHOD(get_CallbackInstance)( long * plCallbackInstance );
  172. };
  173. class CQOSEvent :
  174. public CTAPIComObjectRoot<CQOSEvent, CComMultiThreadModelNoCS>,
  175. public CComDualImpl<ITQOSEvent, &IID_ITQOSEvent, &LIBID_TAPI3Lib>,
  176. public CObjectSafeImpl
  177. {
  178. protected:
  179. ITCallInfo * m_pCall;
  180. long m_lMediaMode;
  181. QOS_EVENT m_QosEvent;
  182. public:
  183. CQOSEvent(){}
  184. void
  185. FinalRelease();
  186. static HRESULT FireEvent(
  187. ITCallInfo * pCall,
  188. QOS_EVENT QosEvent,
  189. long lMediaMode,
  190. CTAPI * pTapi
  191. );
  192. DECLARE_MARSHALQI(CQOSEvent)
  193. DECLARE_QI()
  194. DECLARE_TRACELOG_CLASS(CQOSEvent)
  195. BEGIN_COM_MAP(CQOSEvent)
  196. COM_INTERFACE_ENTRY(IDispatch)
  197. COM_INTERFACE_ENTRY(ITQOSEvent)
  198. COM_INTERFACE_ENTRY(IObjectSafety)
  199. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  200. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  201. END_COM_MAP()
  202. STDMETHOD(get_Call)(ITCallInfo ** ppCall );
  203. STDMETHOD(get_Event)(QOS_EVENT * pQosEvent );
  204. STDMETHOD(get_MediaType)(long * plMediaType );
  205. };
  206. class CDigitDetectionEvent :
  207. public CTAPIComObjectRoot<CDigitDetectionEvent, CComMultiThreadModelNoCS>,
  208. public CComDualImpl<ITDigitDetectionEvent, &IID_ITDigitDetectionEvent, &LIBID_TAPI3Lib>,
  209. public CObjectSafeImpl
  210. {
  211. public:
  212. CDigitDetectionEvent(){}
  213. void
  214. FinalRelease();
  215. static HRESULT FireEvent(
  216. ITCallInfo * pCall,
  217. unsigned char ucDigit,
  218. TAPI_DIGITMODE DigitMode,
  219. long lTickCount,
  220. CTAPI * pTapi,
  221. long lCallbackInstance
  222. );
  223. DECLARE_MARSHALQI(CDigitDetectionEvent)
  224. DECLARE_QI()
  225. DECLARE_TRACELOG_CLASS(CDigitDetectionEvent)
  226. BEGIN_COM_MAP(CDigitDetectionEvent)
  227. COM_INTERFACE_ENTRY(IDispatch)
  228. COM_INTERFACE_ENTRY(ITDigitDetectionEvent)
  229. COM_INTERFACE_ENTRY(IObjectSafety)
  230. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  231. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  232. END_COM_MAP()
  233. protected:
  234. ITCallInfo * m_pCall;
  235. unsigned char m_Digit;
  236. TAPI_DIGITMODE m_DigitMode;
  237. long m_lTickCount;
  238. long m_lCallbackInstance;
  239. #if DBG
  240. PWSTR m_pDebug;
  241. #endif
  242. public:
  243. STDMETHOD(get_Call)( ITCallInfo ** ppCallInfo );
  244. STDMETHOD(get_Digit)( unsigned char * pucDigit );
  245. STDMETHOD(get_DigitMode)( TAPI_DIGITMODE * pDigitMode );
  246. STDMETHOD(get_TickCount)( long * plTickCount );
  247. STDMETHOD(get_CallbackInstance)( long * plCallbackInstance );
  248. };
  249. class CDigitGenerationEvent :
  250. public CTAPIComObjectRoot<CDigitGenerationEvent, CComMultiThreadModelNoCS>,
  251. public CComDualImpl<ITDigitGenerationEvent, &IID_ITDigitGenerationEvent, &LIBID_TAPI3Lib>,
  252. public CObjectSafeImpl
  253. {
  254. public:
  255. CDigitGenerationEvent(){}
  256. void
  257. FinalRelease();
  258. static HRESULT FireEvent(
  259. ITCallInfo * pCall,
  260. long lGenerationTermination,
  261. long lTickCount,
  262. long lCallbackInstance,
  263. CTAPI * pTapi
  264. );
  265. DECLARE_MARSHALQI(CDigitGenerationEvent)
  266. DECLARE_QI()
  267. DECLARE_TRACELOG_CLASS(CDigitGenerationEvent)
  268. BEGIN_COM_MAP(CDigitGenerationEvent)
  269. COM_INTERFACE_ENTRY2(IDispatch, ITDigitGenerationEvent)
  270. COM_INTERFACE_ENTRY(ITDigitGenerationEvent)
  271. COM_INTERFACE_ENTRY(IObjectSafety)
  272. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  273. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  274. END_COM_MAP()
  275. protected:
  276. ITCallInfo * m_pCall;
  277. long m_lGenerationTermination;
  278. long m_lTickCount;
  279. long m_lCallbackInstance;
  280. #if DBG
  281. PWSTR m_pDebug;
  282. #endif
  283. public:
  284. STDMETHOD(get_Call)( ITCallInfo ** ppCallInfo );
  285. STDMETHOD(get_GenerationTermination)( long * plGenerationTermination );
  286. STDMETHOD(get_TickCount)( long * plTickCount );
  287. STDMETHOD(get_CallbackInstance)( long * plCallbackInstance );
  288. };
  289. class CDigitsGatheredEvent :
  290. public CTAPIComObjectRoot<CDigitsGatheredEvent, CComMultiThreadModelNoCS>,
  291. public CComDualImpl<ITDigitsGatheredEvent, &IID_ITDigitsGatheredEvent, &LIBID_TAPI3Lib>,
  292. public CObjectSafeImpl
  293. {
  294. public:
  295. CDigitsGatheredEvent(){}
  296. void
  297. FinalRelease();
  298. static HRESULT FireEvent(
  299. ITCallInfo * pCall,
  300. BSTR pDigits,
  301. TAPI_GATHERTERM GatherTermination,
  302. long lTickCount,
  303. long lCallbackInstance,
  304. CTAPI * pTapi
  305. );
  306. DECLARE_MARSHALQI(CDigitsGatheredEvent)
  307. DECLARE_QI()
  308. DECLARE_TRACELOG_CLASS(CDigitGatheredEvent)
  309. BEGIN_COM_MAP(CDigitsGatheredEvent)
  310. COM_INTERFACE_ENTRY2(IDispatch, ITDigitsGatheredEvent)
  311. COM_INTERFACE_ENTRY(ITDigitsGatheredEvent)
  312. COM_INTERFACE_ENTRY(IObjectSafety)
  313. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  314. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  315. END_COM_MAP()
  316. protected:
  317. ITCallInfo * m_pCall;
  318. BSTR m_pDigits;
  319. TAPI_GATHERTERM m_GatherTermination;
  320. long m_lTickCount;
  321. long m_lCallbackInstance;
  322. #if DBG
  323. PWSTR m_pDebug;
  324. #endif
  325. public:
  326. STDMETHOD(get_Call)( ITCallInfo ** ppCallInfo );
  327. STDMETHOD(get_Digits)( BSTR * ppDigits );
  328. STDMETHOD(get_GatherTermination)( TAPI_GATHERTERM * pGenerationTermination );
  329. STDMETHOD(get_TickCount)( long * plTickCount );
  330. STDMETHOD(get_CallbackInstance)( long * plCallbackInstance );
  331. };
  332. class CToneDetectionEvent :
  333. public CTAPIComObjectRoot<CToneDetectionEvent, CComMultiThreadModelNoCS>,
  334. public CComDualImpl<ITToneDetectionEvent, &IID_ITToneDetectionEvent, &LIBID_TAPI3Lib>,
  335. public CObjectSafeImpl
  336. {
  337. public:
  338. CToneDetectionEvent(){}
  339. void
  340. FinalRelease();
  341. static HRESULT FireEvent(
  342. ITCallInfo * pCall,
  343. long lAppSpecific,
  344. long lTickCount,
  345. long lCallbackInstance,
  346. CTAPI * pTapi
  347. );
  348. DECLARE_MARSHALQI(CToneDetectionEvent)
  349. DECLARE_QI()
  350. DECLARE_TRACELOG_CLASS(CToneDetectionEvent)
  351. BEGIN_COM_MAP(CToneDetectionEvent)
  352. COM_INTERFACE_ENTRY2(IDispatch, ITToneDetectionEvent)
  353. COM_INTERFACE_ENTRY(ITToneDetectionEvent)
  354. COM_INTERFACE_ENTRY(IObjectSafety)
  355. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  356. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  357. END_COM_MAP()
  358. protected:
  359. ITCallInfo * m_pCall;
  360. long m_lAppSpecific;
  361. long m_lTickCount;
  362. long m_lCallbackInstance;
  363. #if DBG
  364. PWSTR m_pDebug;
  365. #endif
  366. public:
  367. STDMETHOD(get_Call)( ITCallInfo ** ppCallInfo );
  368. STDMETHOD(get_AppSpecific)( long * plAppSpecific );
  369. STDMETHOD(get_TickCount)( long * plTickCount );
  370. STDMETHOD(get_CallbackInstance)( long * plCallbackInstance );
  371. };
  372. #endif