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.

132 lines
5.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ResourceEntry.h
  7. //
  8. // Description:
  9. // ResourceEntry implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 14-JUN-2000
  13. // Geoffrey Pease (GPease) 15-JUN-2000
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. class
  18. CResourceEntry
  19. {
  20. private: // data
  21. // Pointer to the callback interface.
  22. IClusCfgCallback * m_pcccCallback;
  23. // The locale id
  24. LCID m_lcid;
  25. // IResourceEntry
  26. typedef struct _SDependencyEntry {
  27. CLSID clsidType;
  28. EDependencyFlags dfFlags;
  29. BOOL fDependencyMet;
  30. } DependencyEntry;
  31. typedef struct _SDependentEntry {
  32. ULONG idxResource;
  33. EDependencyFlags dfFlags;
  34. } DependentEntry;
  35. BOOL m_fConfigured:1; // Configured flag
  36. BSTR m_bstrName; // Name of the resource
  37. IClusCfgManagedResourceCfg * m_pccmrcResource; // Config interface to resource instance
  38. CLSID m_clsidType; // Resource type
  39. CLSID m_clsidClassType; // Resource class type
  40. EDependencyFlags m_dfFlags; // Dependency flags set on resource
  41. ULONG m_cAllocedDependencies; // Alloced dependencies
  42. ULONG m_cDependencies; // Count of dependencies
  43. DependencyEntry * m_rgDependencies; // Dependencies list
  44. ULONG m_cAllocedDependents; // Alloced dependents
  45. ULONG m_cDependents; // Count of dependents
  46. DependentEntry * m_rgDependents; // Dependents list
  47. CGroupHandle * m_groupHandle; // Group handle reference object
  48. HRESOURCE m_hResource; // Resource handle
  49. CClusPropList m_cplPrivProps; // Private Properties list
  50. CClusPropList m_cplCommonProps; // Common Properties list
  51. STDMETHOD( HrInit )( IClusCfgCallback * pcccCallback, LCID lcidIn );
  52. public: // methods
  53. CResourceEntry( void );
  54. ~CResourceEntry( void );
  55. // IUnknown
  56. //STDMETHOD( QueryInterface )( REFIID riid, LPVOID *ppv );
  57. //STDMETHOD_( ULONG, AddRef )( void );
  58. //STDMETHOD_( ULONG, Release )( void );
  59. static HRESULT S_HrCreateInstance( CResourceEntry ** ppcreOut, IClusCfgCallback * pcccCallback, LCID lcidIn);
  60. STDMETHOD( SendStatusReport )(
  61. LPCWSTR pcszNodeNameIn
  62. , CLSID clsidTaskMajorIn
  63. , CLSID clsidTaskMinorIn
  64. , ULONG ulMinIn
  65. , ULONG ulMaxIn
  66. , ULONG ulCurrentIn
  67. , HRESULT hrStatusIn
  68. , LPCWSTR pcszDescriptionIn
  69. , FILETIME * pftTimeIn
  70. , LPCWSTR pcszReferenceIn
  71. );
  72. // IResourceEntry
  73. STDMETHOD( SetName )( BSTR bstrIn );
  74. STDMETHOD( GetName )( BSTR * pbstrOut );
  75. STDMETHOD( SetAssociatedResource )( IClusCfgManagedResourceCfg * pccmrcIn );
  76. STDMETHOD( GetAssociatedResource )( IClusCfgManagedResourceCfg ** ppccmrcOut );
  77. STDMETHOD( SetType )( const CLSID * pclsidIn );
  78. STDMETHOD( GetType )( CLSID * pclsidOut );
  79. STDMETHOD( GetTypePtr )( const CLSID ** ppclsidOut );
  80. STDMETHOD( SetClassType )( const CLSID * pclsidIn );
  81. STDMETHOD( GetClassType )( CLSID * pclsidOut );
  82. STDMETHOD( GetClassTypePtr )( const CLSID ** ppclsidOut );
  83. STDMETHOD( SetFlags )( EDependencyFlags dfIn );
  84. STDMETHOD( GetFlags )( EDependencyFlags * pdfOut );
  85. STDMETHOD( AddTypeDependency )( const CLSID * pclsidIn, EDependencyFlags dfIn );
  86. STDMETHOD( GetCountOfTypeDependencies )( ULONG * pcOut );
  87. STDMETHOD( GetTypeDependency )( ULONG idxIn, CLSID * pclsidOut, EDependencyFlags * dfOut );
  88. STDMETHOD( GetTypeDependencyPtr )( ULONG idxIn, const CLSID ** ppclsidOut, EDependencyFlags * dfOut );
  89. STDMETHOD( AddDependent )( ULONG idxIn, EDependencyFlags dfFlagsIn );
  90. STDMETHOD( GetCountOfDependents )( ULONG * pcOut );
  91. STDMETHOD( GetDependent )( ULONG idxIn, ULONG * pidxOut, EDependencyFlags * pdfOut );
  92. STDMETHOD( ClearDependents )( void );
  93. STDMETHOD( SetGroupHandle )( CGroupHandle * pghIn );
  94. STDMETHOD( GetGroupHandle )( CGroupHandle ** ppghOut );
  95. STDMETHOD( SetHResource )( HRESOURCE hResourceIn );
  96. STDMETHOD( GetHResource )( HRESOURCE * phResourceOut );
  97. STDMETHOD( SetConfigured )( BOOL fConfiguredIn );
  98. STDMETHOD( IsConfigured )( void );
  99. STDMETHOD( StoreClusterResourceControl )( DWORD dwClusCtlIn, CClusPropList & rcplIn );
  100. STDMETHOD( Configure )( void );
  101. }; // class CResourceEntry