Source code of Windows XP (NT5)
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.

111 lines
3.5 KiB

  1. #include "resource.h" // main symbols
  2. #define typedef__dxj_DirectPlayVoiceServer LPDIRECTPLAYVOICESERVER
  3. /////////////////////////////////////////////////////////////////////////////
  4. // Direct
  5. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  6. //references as template arguments.
  7. class C_dxj_DirectPlayVoiceServerObject :
  8. #ifdef USING_IDISPATCH
  9. public CComDualImpl<I_dxj_DirectPlayVoiceServer, &IID_I_dxj_DirectPlayVoiceServer, &LIBID_DIRECTLib>,
  10. public ISupportErrorInfo,
  11. #else
  12. public I_dxj_DirectPlayVoiceServer,
  13. #endif
  14. public CComObjectRoot
  15. {
  16. public:
  17. C_dxj_DirectPlayVoiceServerObject() ;
  18. virtual ~C_dxj_DirectPlayVoiceServerObject() ;
  19. BEGIN_COM_MAP(C_dxj_DirectPlayVoiceServerObject)
  20. COM_INTERFACE_ENTRY(I_dxj_DirectPlayVoiceServer)
  21. #ifdef USING_IDISPATCH
  22. COM_INTERFACE_ENTRY(IDispatch)
  23. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  24. #endif
  25. END_COM_MAP()
  26. DECLARE_AGGREGATABLE(C_dxj_DirectPlayVoiceServerObject)
  27. #ifdef USING_IDISPATCH
  28. // ISupportsErrorInfo
  29. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  30. #endif
  31. // I_dxj_DirectPlayVoiceServer
  32. public:
  33. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  34. /* [in] */ IUnknown __RPC_FAR *lpdd);
  35. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  36. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  37. HRESULT STDMETHODCALLTYPE Initialize (
  38. /* [in] */ IUnknown __RPC_FAR *DplayObj,
  39. /* [in] */ long lFlags);
  40. HRESULT STDMETHODCALLTYPE StartSession (
  41. /* [in] */ DVSESSIONDESC_CDESC __RPC_FAR *SessionDesc,
  42. /* [in] */ long lFlags);
  43. HRESULT STDMETHODCALLTYPE StopSession (
  44. /* [in] */ long lFlags);
  45. HRESULT STDMETHODCALLTYPE GetSessionDesc (
  46. /* [out][in] */ DVSESSIONDESC_CDESC __RPC_FAR *SessionDesc);
  47. HRESULT STDMETHODCALLTYPE SetSessionDesc (
  48. /* [in] */ DVSESSIONDESC_CDESC __RPC_FAR *ClientConfig);
  49. HRESULT STDMETHODCALLTYPE GetCaps (
  50. /* [out][in] */ DVCAPS_CDESC __RPC_FAR *Caps);
  51. HRESULT STDMETHODCALLTYPE GetCompressionTypeCount (
  52. /* [retval][out] */ long __RPC_FAR *v1);
  53. HRESULT STDMETHODCALLTYPE GetCompressionType (
  54. /* [in] */ long lIndex,
  55. /* [out][in] */ DVCOMPRESSIONINFO_CDESC __RPC_FAR *Data,
  56. /* [in] */ long lFlags);
  57. HRESULT STDMETHODCALLTYPE SetTransmitTargets (
  58. /* [in] */ long playerSourceID,
  59. /* [in] */ SAFEARRAY **playerTargetIDs,
  60. /* [in] */ long lFlags);
  61. HRESULT STDMETHODCALLTYPE GetTransmitTargets (
  62. /* [in] */ long playerSourceID,
  63. /* [in] */ long lFlags,
  64. /* [retval][out] */ SAFEARRAY **ret);
  65. HRESULT STDMETHODCALLTYPE StartServerNotification(
  66. /* [in] */ I_dxj_DPVoiceEvent __RPC_FAR *event);
  67. HRESULT STDMETHODCALLTYPE UnRegisterMessageHandler();
  68. ////////////////////////////////////////////////////////////////////////
  69. //
  70. // note: this is public for the callbacks
  71. DECL_VARIABLE(_dxj_DirectPlayVoiceServer);
  72. private:
  73. HRESULT STDMETHODCALLTYPE FlushBuffer(LONG dwNumMessagesLeft);
  74. public:
  75. DX3J_GLOBAL_LINKS(_dxj_DirectPlayVoiceServer);
  76. DWORD InternalAddRef();
  77. DWORD InternalRelease();
  78. BOOL m_fHandleVoiceClientEvents;
  79. IStream *m_pEventStream;
  80. BOOL m_fInit;
  81. //We need to keep a count of the messages
  82. LONG m_dwMsgCount;
  83. };