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.

79 lines
1.7 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1996 - 2000
  3. Module Name:
  4. mountmed.h
  5. Abstract:
  6. This component is an object representing a mounting media, i.e. a media in the process of mounting.
  7. Author:
  8. Ran Kalach [rankala] 28-Sep-2000
  9. Revision History:
  10. --*/
  11. #ifndef _MOUNTMED_
  12. #define _MOUNTMED_
  13. #include "wsbcltbl.h"
  14. /*++
  15. Class Name:
  16. CMountingMedia
  17. Class Description:
  18. An object representing a media in the process of mounting.
  19. It is collectable but not persistable.
  20. --*/
  21. class CMountingMedia :
  22. public CComObjectRoot,
  23. public IMountingMedia,
  24. public IWsbCollectable,
  25. public CComCoClass<CMountingMedia, &CLSID_CMountingMedia>
  26. {
  27. public:
  28. CMountingMedia() {}
  29. BEGIN_COM_MAP(CMountingMedia)
  30. COM_INTERFACE_ENTRY(IMountingMedia)
  31. COM_INTERFACE_ENTRY(IWsbCollectable)
  32. END_COM_MAP()
  33. DECLARE_REGISTRY_RESOURCEID(IDR_CMountingMedia)
  34. // CComObjectRoot
  35. public:
  36. STDMETHOD(FinalConstruct)(void);
  37. void FinalRelease(void);
  38. // IWsbCollectable
  39. public:
  40. STDMETHOD(CompareTo)(IN IUnknown* pCollectable, OUT SHORT* pResult);
  41. STDMETHOD(IsEqual)(IN IUnknown* pCollectable);
  42. // IMountingMedia
  43. public:
  44. STDMETHOD(Init)(IN REFGUID mediaId, IN BOOL bReadOnly);
  45. STDMETHOD(GetMediaId)(OUT GUID *pMediaId);
  46. STDMETHOD(SetMediaId)(IN REFGUID MediaId);
  47. STDMETHOD(WaitForMount)(IN DWORD dwTimeout);
  48. STDMETHOD(MountDone) (void);
  49. STDMETHOD(SetIsReadOnly)(IN BOOL bReadOnly);
  50. STDMETHOD(IsReadOnly)(void);
  51. protected:
  52. GUID m_mediaId;
  53. HANDLE m_mountEvent;
  54. BOOL m_bReadOnly;
  55. };
  56. #endif // _MOUNTMED_