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.

118 lines
2.6 KiB

  1. /******************************************************************
  2. QuotaSettings.H -- WMI provider class definition
  3. Description: Quota Settings Provider for the volumes that Supports
  4. Disk Quotas, class Definition
  5. Copyright (c) 2000-2001 Microsoft Corporation, All Rights Reserved
  6. ******************************************************************/
  7. #ifndef _CQUOTASETTINGS_H_
  8. #define _CQUOTASETTINGS_H_
  9. // Defining bit values for the property, which will be used for defining the bitmap of properties required.
  10. #define QUOTASETTINGS_ALL_PROPS 0xFFFFFFFF
  11. #define QUOTASETTINGS_PROP_VolumePath 0x00000001
  12. #define QUOTASETTINGS_PROP_State 0x00000002
  13. #define QUOTASETTINGS_PROP_DefaultLimit 0x00000004
  14. #define QUOTASETTINGS_PROP_DefaultWarningLimit 0x00000008
  15. #define QUOTASETTINGS_PROP_QuotaExceededNotification 0x00000010
  16. #define QUOTASETTINGS_PROP_WarningExceededNotification 0x00000020
  17. #define QUOTASETTINGS_PROP_Caption 0x00000040
  18. class CQuotaSettings : public Provider
  19. {
  20. private:
  21. HRESULT EnumerateAllVolumes (
  22. MethodContext *pMethodContext,
  23. DWORD &PropertiesReq
  24. );
  25. HRESULT LoadDiskQuotaVolumeProperties (
  26. LPCWSTR a_VolumeName,
  27. LPCWSTR a_Caption,
  28. DWORD dwPropertiesReq,
  29. CInstancePtr pInstance
  30. );
  31. HRESULT SetDiskQuotaVolumeProperties (
  32. const CInstance &Instance,
  33. IDiskQuotaControlPtr pIQuotaControl
  34. );
  35. HRESULT CheckParameters (
  36. const CInstance &a_Instance
  37. );
  38. void SetRequiredProperties (
  39. CFrameworkQuery *Query,
  40. DWORD &dwPropertiesReq
  41. );
  42. HRESULT PutVolumeDetails (
  43. LPCWSTR a_VolumeName,
  44. MethodContext *pMethodContext,
  45. DWORD dwPropertiesReq
  46. );
  47. protected:
  48. // Reading Functions
  49. //============================
  50. HRESULT EnumerateInstances (
  51. MethodContext *pMethodContext,
  52. long lFlags = 0L
  53. ) ;
  54. HRESULT GetObject (
  55. CInstance *pInstance,
  56. long lFlags,
  57. CFrameworkQuery &Query
  58. ) ;
  59. HRESULT ExecQuery (
  60. MethodContext *pMethodContext,
  61. CFrameworkQuery& Query,
  62. long lFlags = 0
  63. ) ;
  64. // Writing Functions
  65. //============================
  66. HRESULT PutInstance (
  67. const CInstance& Instance,
  68. long lFlags = 0L
  69. ) ;
  70. public:
  71. // Constructor/destructor
  72. //=======================
  73. CQuotaSettings (
  74. LPCWSTR lpwszClassName,
  75. LPCWSTR lpwszNameSpace
  76. ) ;
  77. virtual ~CQuotaSettings () ;
  78. private:
  79. DskCommonRoutines m_CommonRoutine;
  80. };
  81. #endif