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.

80 lines
2.7 KiB

  1. // Device.h : Declaration of the CDevice
  2. #ifndef __DEVICE_H_
  3. #define __DEVICE_H_
  4. #include "resource.h" // main symbols
  5. /////////////////////////////////////////////////////////////////////////////
  6. // CDevice
  7. class ATL_NO_VTABLE CWMDMDevice :
  8. public CComObjectRootEx<CComMultiThreadModel>,
  9. public CComCoClass<CWMDMDevice, &CLSID_WMDMDevice>,
  10. public IWMDMDevice2,
  11. public IWMDMDeviceControl
  12. {
  13. public:
  14. CWMDMDevice();
  15. ~CWMDMDevice();
  16. BEGIN_COM_MAP(CWMDMDevice)
  17. COM_INTERFACE_ENTRY(IWMDMDevice)
  18. COM_INTERFACE_ENTRY(IWMDMDevice2)
  19. COM_INTERFACE_ENTRY(IWMDMDeviceControl)
  20. END_COM_MAP()
  21. public:
  22. //IWMDMDevice
  23. STDMETHOD(GetName)(LPWSTR pwszName,
  24. UINT nMaxChars);
  25. STDMETHOD(GetManufacturer)(LPWSTR pwszName,
  26. UINT nMaxChars);
  27. STDMETHOD(GetVersion)(DWORD *pdwVersion);
  28. STDMETHOD(GetType)(DWORD *pdwType);
  29. STDMETHOD(GetSerialNumber)(PWMDMID pSerialNumber, BYTE abMac[WMDM_MAC_LENGTH]);
  30. STDMETHOD(GetPowerSource)(DWORD *pdwPowerSource,
  31. DWORD *pdwPercentRemaining);
  32. STDMETHOD(GetStatus)(DWORD *pdwStatus);
  33. STDMETHOD(GetDeviceIcon)(ULONG *hIcon);
  34. STDMETHOD(SendOpaqueCommand)(OPAQUECOMMAND *pCommand);
  35. //IWMDMDevice2
  36. STDMETHOD(GetStorage)( LPCWSTR pszStorageName, IWMDMStorage** ppStorage );
  37. STDMETHOD(GetFormatSupport2)( DWORD dwFlags,
  38. _WAVEFORMATEX **ppAudioFormatEx,
  39. UINT *pnAudioFormatCount,
  40. _VIDEOINFOHEADER **ppVideoFormatEx,
  41. UINT *pnVideoFormatCount,
  42. WMFILECAPABILITIES **ppFileType,
  43. UINT *pnFileTypeCount);
  44. STDMETHOD(GetSpecifyPropertyPages)( ISpecifyPropertyPages** ppSpecifyPropPages,
  45. IUnknown*** pppUnknowns,
  46. ULONG* pcUnks );
  47. STDMETHOD(GetPnPName)( LPWSTR pwszPnPName, UINT nMaxChars );
  48. //IWMDMDeviceControl
  49. STDMETHOD(GetCapabilities)(DWORD *pdwCapabilitiesMask);
  50. STDMETHOD(Play)();
  51. STDMETHOD(Record)(_WAVEFORMATEX *pFormat);
  52. STDMETHOD(Pause)();
  53. STDMETHOD(Resume)();
  54. STDMETHOD(Stop)();
  55. STDMETHOD(Seek)(UINT fuMode, int nOffset);
  56. STDMETHOD(EnumStorage)(IWMDMEnumStorage **ppEnumStorage);
  57. STDMETHOD(GetFormatSupport)(_WAVEFORMATEX **ppFormatEx,
  58. UINT *pnFormatCount,
  59. LPWSTR **pppwszMimeType,
  60. UINT *pnMimeTypeCount);
  61. void SetContainedPointer(IMDSPDevice *pDevice, WORD wSPIndex);
  62. private:
  63. IMDSPDevice *m_pDevice;
  64. WORD m_wSPIndex;
  65. };
  66. #endif //__DEVICE_H_