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.

92 lines
2.4 KiB

  1. // SAFIntercomClient.h : Declaration of the CSAFIntercomClient
  2. #ifndef __SAFIntercomClient_H_
  3. #define __SAFIntercomClient_H_
  4. //JP:not in connectivitylib.h//#include "resource.h" // main symbols
  5. #include <MPC_COM.h>
  6. #include <MPC_Utils.h>
  7. #include <rtccore.h>
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CSAFIntercomClient
  10. class ATL_NO_VTABLE CSAFIntercomClient : // Hungarian safi
  11. public IDispatchImpl < ISAFIntercomClient, &IID_ISAFIntercomClient, &LIBID_HelpCenterTypeLib >,
  12. public MPC::ConnectionPointImpl< CSAFIntercomClient, &DIID_DSAFIntercomClientEvents, MPC::CComSafeMultiThreadModel >,
  13. public IRTCEventNotification
  14. {
  15. private:
  16. CComPtr<IRTCClient> m_pRTCClient;
  17. CComPtr<IRTCSession> m_pRTCSession;
  18. DWORD m_dwSinkCookie;
  19. BOOL m_bOnCall;
  20. BOOL m_bRTCInit;
  21. BOOL m_bAdvised;
  22. int m_iSamplingRate;
  23. CComPtr<IDispatch> m_sink_onVoiceConnected;
  24. CComPtr<IDispatch> m_sink_onVoiceDisconnected;
  25. CComPtr<IDispatch> m_sink_onVoiceDisabled;
  26. HRESULT Fire_onVoiceConnected (ISAFIntercomClient * safe);
  27. HRESULT Fire_onVoiceDisconnected (ISAFIntercomClient * safe);
  28. HRESULT Fire_onVoiceDisabled (ISAFIntercomClient * safe);
  29. // Worker functions
  30. HRESULT Init();
  31. HRESULT Cleanup();
  32. public:
  33. CSAFIntercomClient();
  34. ~CSAFIntercomClient();
  35. //DECLARE_PROTECT_FINAL_CONSTRUCT() // TODO: JP: Do we need this here?
  36. BEGIN_COM_MAP(CSAFIntercomClient)
  37. COM_INTERFACE_ENTRY(ISAFIntercomClient)
  38. COM_INTERFACE_ENTRY(IDispatch)
  39. COM_INTERFACE_ENTRY(IRTCEventNotification)
  40. END_COM_MAP()
  41. // ISAFIntercomClient
  42. public:
  43. STDMETHOD(Disconnect)();
  44. STDMETHOD(Connect)(BSTR bstrIP, BSTR bstrKey);
  45. STDMETHOD(RunSetupWizard)();
  46. STDMETHOD(Exit)();
  47. STDMETHOD(put_onVoiceConnected) (/* in */ IDispatch * function);
  48. STDMETHOD(put_onVoiceDisconnected) (/* in */ IDispatch * function);
  49. STDMETHOD(put_onVoiceDisabled) (/* in */ IDispatch * function);
  50. STDMETHOD(put_SamplingRate) (/* in */ LONG newVal);
  51. STDMETHOD(get_SamplingRate) (/* out, retval */ LONG * pVal);
  52. // IRTCEventNotification
  53. STDMETHOD(Event)( RTC_EVENT RTCEvent, IDispatch * pEvent );
  54. HRESULT OnSessionChange(IRTCSession *pSession,
  55. RTC_SESSION_STATE nState,
  56. HRESULT ResCode);
  57. HRESULT onMediaEvent(IRTCMediaEvent * pMedEvent);
  58. };
  59. #endif //__SAFIntercomClient_H_