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.

87 lines
3.7 KiB

  1. // MDSPStorage.h : Declaration of the CMDSPStorage
  2. #ifndef __MDSPSTORAGE_H_
  3. #define __MDSPSTORAGE_H_
  4. #include "resource.h" // main symbols
  5. /////////////////////////////////////////////////////////////////////////////
  6. // CMDSPStorage
  7. class ATL_NO_VTABLE CMDSPStorage :
  8. public CComObjectRootEx<CComSingleThreadModel>,
  9. public CComCoClass<CMDSPStorage, &CLSID_MDSPStorage>,
  10. public IMDSPStorage2, IMDSPObjectInfo, IMDSPObject
  11. {
  12. public:
  13. CMDSPStorage();
  14. ~CMDSPStorage();
  15. DECLARE_REGISTRY_RESOURCEID(IDR_MDSPSTORAGE)
  16. BEGIN_COM_MAP(CMDSPStorage)
  17. COM_INTERFACE_ENTRY(IMDSPStorage)
  18. COM_INTERFACE_ENTRY(IMDSPStorage2)
  19. COM_INTERFACE_ENTRY(IMDSPObjectInfo)
  20. COM_INTERFACE_ENTRY(IMDSPObject)
  21. END_COM_MAP()
  22. // IMDSPStorage
  23. public:
  24. WCHAR m_wcsName[MAX_PATH];
  25. char m_szTmp[MAX_PATH];
  26. HANDLE m_hFile;
  27. BOOL m_bIsDirectory;
  28. STDMETHOD(SetAttributes)(/*[out]*/ DWORD dwAttributes,/*[in]*/ _WAVEFORMATEX *pFormat);
  29. STDMETHOD(EnumStorage)(/*[out]*/ IMDSPEnumStorage **ppEnumStorage);
  30. STDMETHOD(CreateStorage)(/*[in]*/ DWORD dwAttributes, /*[in]*/ _WAVEFORMATEX *pFormat, /*[in]*/ LPWSTR pwszName, /*[out]*/ IMDSPStorage **ppNewStorage);
  31. STDMETHOD(GetRights)(PWMDMRIGHTS *ppRights, UINT *pnRightsCount, /*[in, out]*/BYTE abMac[WMDM_MAC_LENGTH]);
  32. STDMETHOD(GetSize)(/*[out]*/ DWORD *pdwSizeLow, /*[out]*/ DWORD *pdwSizeHigh);
  33. STDMETHOD(GetDate)(/*[out]*/ PWMDMDATETIME pDateTimeUTC);
  34. STDMETHOD(GetName)(/*[out,string,size_is(nMaxChars)]*/ LPWSTR pwszName, /*[in]*/ UINT nMaxChars);
  35. STDMETHOD(GetAttributes)(/*[out]*/ DWORD *pdwAttributes, /*[out]*/ _WAVEFORMATEX *pFormat);
  36. STDMETHOD(GetStorageGlobals)(/*[out]*/ IMDSPStorageGlobals **ppStorageGlobals);
  37. STDMETHOD(SendOpaqueCommand)(OPAQUECOMMAND *pCommand);
  38. // IMDSPStorage2
  39. STDMETHOD(GetStorage)( LPCWSTR pszStorageName, IMDSPStorage** ppStorage );
  40. STDMETHOD(CreateStorage2)( DWORD dwAttributes,
  41. DWORD dwAttributesEx,
  42. _WAVEFORMATEX *pAudioFormat,
  43. _VIDEOINFOHEADER *pVideoFormat,
  44. LPWSTR pwszName,
  45. ULONGLONG qwFileSize,
  46. IMDSPStorage **ppNewStorage);
  47. STDMETHOD(SetAttributes2)( DWORD dwAttributes,
  48. DWORD dwAttributesEx,
  49. _WAVEFORMATEX *pAudioFormat,
  50. _VIDEOINFOHEADER* pVideoFormat );
  51. STDMETHOD(GetAttributes2)( DWORD *pdwAttributes,
  52. DWORD *pdwAttributesEx,
  53. _WAVEFORMATEX *pAudioFormat,
  54. _VIDEOINFOHEADER* pVideoFormat );
  55. // IMDSPObjectInfo
  56. STDMETHOD(GetPlayLength)(/*[out]*/ DWORD *pdwLength);
  57. STDMETHOD(SetPlayLength)(/*[in]*/ DWORD dwLength);
  58. STDMETHOD(GetPlayOffset)(/*[out]*/ DWORD *pdwOffset);
  59. STDMETHOD(SetPlayOffset)(/*[in]*/ DWORD dwOffset);
  60. STDMETHOD(GetTotalLength)(/*[out]*/ DWORD *pdwLength);
  61. STDMETHOD(GetLastPlayPosition)(/*[out]*/ DWORD *pdwLastPos);
  62. STDMETHOD(GetLongestPlayPosition)(/*[out]*/ DWORD *pdwLongestPos);
  63. // IMDSPObject
  64. STDMETHOD(Open)(/*[in]*/ UINT fuMode);
  65. STDMETHOD(Read)(/*[out,size_is(*pdwSize)]*/ BYTE *pData, /*[in,out]*/ DWORD *pdwSize, /*[in, out]*/BYTE abMac[WMDM_MAC_LENGTH]);
  66. STDMETHOD(Write)(/*[in, size_is(dwSize)]*/ BYTE *pData, /*[in]*/ DWORD *pdwSize, /*[in, out]*/BYTE abMac[WMDM_MAC_LENGTH]);
  67. STDMETHOD(Delete)(/* [in] */ UINT fuMode, /*[in]*/ IWMDMProgress *pProgress);
  68. STDMETHOD(Seek)(/*[in]*/ UINT fuFlags, /*[in]*/ DWORD dwOffset);
  69. STDMETHOD(Rename)(/*[in]*/ LPWSTR pwszNewName, /*[in]*/ IWMDMProgress *pProgress);
  70. STDMETHOD(Move)(/*[in]*/ UINT fuMode, /*[in]*/ IWMDMProgress *pProgress, /*[in]*/ IMDSPStorage *pTarget);
  71. STDMETHOD(Close)();
  72. };
  73. #endif //__MDSPSTORAGE_H_