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.

115 lines
4.5 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ResourceEntry.h
  7. //
  8. // Description:
  9. // ResourceEntry implementation.
  10. //
  11. // Maintained By:
  12. // Geoffrey Pease (GPease) 15-JUN-2000
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. class
  17. CResourceEntry
  18. {
  19. private: // data
  20. // IUnknown
  21. LONG m_cRef; // Reference counter
  22. // IResourceEntry
  23. typedef struct _SDependencyEntry {
  24. CLSID clsidType;
  25. EDependencyFlags dfFlags;
  26. BOOL fDependencyMet;
  27. } DependencyEntry;
  28. typedef struct _SDependentEntry {
  29. ULONG idxResource;
  30. EDependencyFlags dfFlags;
  31. } DependentEntry;
  32. BOOL m_fConfigured:1; // Configured flag
  33. BSTR m_bstrName; // Name of the resource
  34. IClusCfgManagedResourceCfg * m_pccmrcResource; // Config interface to resource instance
  35. CLSID m_clsidType; // Resource type
  36. CLSID m_clsidClassType; // Resource class type
  37. EDependencyFlags m_dfFlags; // Dependency flags set on resource
  38. ULONG m_cAllocedDependencies; // Alloced dependencies
  39. ULONG m_cDependencies; // Count of dependencies
  40. DependencyEntry * m_rgDependencies; // Dependencies list
  41. ULONG m_cAllocedDependents; // Alloced dependents
  42. ULONG m_cDependents; // Count of dependents
  43. DependentEntry * m_rgDependents; // Dependents list
  44. CGroupHandle * m_groupHandle; // Group handle reference object
  45. HRESOURCE m_hResource; // Resource handle
  46. DWORD m_cbAllocedPropList; // Alloced property list count bytes
  47. DWORD m_cbPropList; // Count bytes of list
  48. CLUSPROP_LIST * m_pPropList; // Property list
  49. public: // methods
  50. CResourceEntry( void );
  51. ~CResourceEntry( void );
  52. // IUnknown
  53. //STDMETHOD( QueryInterface )( REFIID riid, LPVOID *ppv );
  54. //STDMETHOD_( ULONG, AddRef )( void );
  55. //STDMETHOD_( ULONG, Release )( void );
  56. // IResourceEntry
  57. STDMETHOD( SetName )( BSTR bstrIn );
  58. STDMETHOD( GetName )( BSTR * pbstrOut );
  59. STDMETHOD( SetAssociatedResource )( IClusCfgManagedResourceCfg * pccmrcIn );
  60. STDMETHOD( GetAssociatedResource )( IClusCfgManagedResourceCfg ** ppccmrcOut );
  61. STDMETHOD( SetType )( const CLSID * pclsidIn );
  62. STDMETHOD( GetType )( CLSID * pclsidOut );
  63. STDMETHOD( GetTypePtr )( const CLSID ** ppclsidOut );
  64. STDMETHOD( SetClassType )( const CLSID * pclsidIn );
  65. STDMETHOD( GetClassType )( CLSID * pclsidOut );
  66. STDMETHOD( GetClassTypePtr )( const CLSID ** ppclsidOut );
  67. STDMETHOD( SetFlags )( EDependencyFlags dfIn );
  68. STDMETHOD( GetFlags )( EDependencyFlags * pdfOut );
  69. STDMETHOD( AddTypeDependency )( const CLSID * pclsidIn, EDependencyFlags dfIn );
  70. STDMETHOD( GetCountOfTypeDependencies )( ULONG * pcOut );
  71. STDMETHOD( GetTypeDependency )( ULONG idxIn, CLSID * pclsidOut, EDependencyFlags * dfOut );
  72. STDMETHOD( GetTypeDependencyPtr )( ULONG idxIn, const CLSID ** ppclsidOut, EDependencyFlags * dfOut );
  73. STDMETHOD( AddDependent )( ULONG idxIn, EDependencyFlags dfFlagsIn );
  74. STDMETHOD( GetCountOfDependents )( ULONG * pcOut );
  75. STDMETHOD( GetDependent )( ULONG idxIn, ULONG * pidxOut, EDependencyFlags * pdfOut );
  76. STDMETHOD( ClearDependents )( void );
  77. STDMETHOD( SetGroupHandle )( CGroupHandle * pghIn );
  78. STDMETHOD( GetGroupHandle )( CGroupHandle ** ppghOut );
  79. STDMETHOD( SetHResource )( HRESOURCE hResourceIn );
  80. STDMETHOD( GetHResource )( HRESOURCE * phResourceOut );
  81. STDMETHOD( SetConfigured )( BOOL fConfiguredIn );
  82. STDMETHOD( IsConfigured )( void );
  83. STDMETHOD( StoreClusterResourceControl )( DWORD dwClusCtlIn,
  84. LPVOID pvInBufferIn,
  85. DWORD cbInBufferIn
  86. );
  87. STDMETHOD( Configure )( void );
  88. }; // class CResourceEntry