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.

84 lines
2.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ManagedDevice.h
  7. //
  8. // Description:
  9. // CManagedDevice implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 22-NOV-1999
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. class CEnumManageableResources;
  17. class
  18. CManagedDevice:
  19. public IExtendObjectManager,
  20. public IClusCfgManagedResourceInfo,
  21. public IGatherData // Private Interface
  22. {
  23. friend class CEnumManageableResources;
  24. private:
  25. // IUnknown
  26. LONG m_cRef;
  27. // Async/IClusCfgManagedResourceInfo
  28. BSTR m_bstrUID; // Unique Identifier
  29. BSTR m_bstrName; // Display Name
  30. BOOL m_fHasNameChanged:1; // Indicates the user changed the name
  31. BSTR m_bstrType; // Display Type Name
  32. BOOL m_fIsManaged:1; // If the user wants to manage this device...
  33. BOOL m_fIsQuorumDevice:1; // If the user wants this device to be the quorum...
  34. BOOL m_fIsQuorumCapable:1; // If the device supports quorum...
  35. BOOL m_fIsQuorumJoinable:1; // Does the quorum capable device allow join.
  36. SDriveLetterMapping m_dlmDriveLetterMapping; // Drive letter representations hosted on this device.
  37. // IExtendObjectManager
  38. private: // Methods
  39. CManagedDevice( );
  40. ~CManagedDevice();
  41. STDMETHOD( Init )( void );
  42. public: // Methods
  43. static HRESULT
  44. S_HrCreateInstance( IUnknown ** ppunkOut );
  45. // IUnknown
  46. STDMETHOD( QueryInterface )( REFIID riid, LPVOID *ppv );
  47. STDMETHOD_( ULONG, AddRef )( void );
  48. STDMETHOD_( ULONG, Release )( void );
  49. // IClusCfgManagedResourceInfo
  50. STDMETHOD( GetUID )( BSTR * pbstrUIDOut );
  51. STDMETHOD( GetName )( BSTR * pbstrNameOut );
  52. STDMETHOD( SetName )( LPCWSTR pcszNameIn );
  53. STDMETHOD( IsManaged )( void );
  54. STDMETHOD( SetManaged )( BOOL fIsManagedIn );
  55. STDMETHOD( IsQuorumDevice )( void );
  56. STDMETHOD( SetQuorumedDevice )( BOOL fIsQuorumDeviceIn );
  57. STDMETHOD( IsQuorumCapable )( void );
  58. STDMETHOD( GetDriveLetterMappings )( SDriveLetterMapping * pdlmDriveLetterMappingsOut );
  59. STDMETHOD( SetDriveLetterMappings )( SDriveLetterMapping dlmDriveLetterMappingsIn );
  60. STDMETHOD( IsDeviceJoinable )( void );
  61. STDMETHOD( SetDeviceJoinable )( BOOL fIsJoinableIn );
  62. // IGatherData
  63. STDMETHOD( Gather )( OBJECTCOOKIE cookieParentIn, IUnknown * punkIn );
  64. // IExtendOjectManager
  65. STDMETHOD( FindObject )(
  66. OBJECTCOOKIE cookieIn
  67. , REFCLSID rclsidTypeIn
  68. , LPCWSTR pcszNameIn
  69. , LPUNKNOWN * ppunkOut
  70. );
  71. }; // class CManagedDevice