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.

131 lines
2.7 KiB

  1. // Copyright (c) 1997-2001 Microsoft Corporation
  2. //
  3. // File: FileInstallationUnit.h
  4. //
  5. // Synopsis: Declares a FileInstallationUnit
  6. // This object has the knowledge for installing the
  7. // disk quotas and such
  8. //
  9. // History: 02/06/2001 JeffJon Created
  10. #ifndef __CYS_FILEINSTALLATIONUNIT_H
  11. #define __CYS_FILEINSTALLATIONUNIT_H
  12. #include "InstallationUnit.h"
  13. typedef enum
  14. {
  15. QUOTA_SIZE_KB,
  16. QUOTA_SIZE_MB,
  17. QUOTA_SIZE_GB
  18. } QuotaSizeType;
  19. class FileInstallationUnit : public InstallationUnit
  20. {
  21. public:
  22. // Constructor
  23. FileInstallationUnit();
  24. // Destructor
  25. virtual
  26. ~FileInstallationUnit();
  27. // Installation Unit overrides
  28. virtual
  29. InstallationReturnType
  30. InstallService(HANDLE logfileHandle, HWND hwnd);
  31. virtual
  32. bool
  33. IsServiceInstalled();
  34. virtual
  35. bool
  36. GetFinishText(String& message);
  37. virtual
  38. String
  39. GetServiceDescription();
  40. void
  41. SetSpaceQuotaSize(QuotaSizeType size);
  42. QuotaSizeType
  43. GetSpaceQuotaSize() const { return spaceQuotaSize; }
  44. void
  45. SetLevelQuotaSize(QuotaSizeType size);
  46. QuotaSizeType
  47. GetLevelQuotaSize() const { return levelQuotaSize; }
  48. void
  49. SetSpaceQuotaValue(LONGLONG value);
  50. LONGLONG
  51. GetSpaceQuotaValue() const { return spaceQuotaValue; }
  52. void
  53. SetLevelQuotaValue(LONGLONG value);
  54. LONGLONG
  55. GetLevelQuotaValue() const { return levelQuotaValue; }
  56. void
  57. SetDefaultQuotas(bool value);
  58. bool
  59. GetDefaultQuotas() const { return setDefaultQuotas; }
  60. void
  61. SetDenyUsersOverQuota(bool value);
  62. bool
  63. GetDenyUsersOverQuota() const { return denyUsersOverQuota; }
  64. void
  65. SetEventDiskSpaceLimit(bool value);
  66. bool
  67. GetEventDiskSpaceLimit() const { return eventDiskSpaceLimit; }
  68. void
  69. SetEventWarningLevel(bool value);
  70. bool
  71. GetEventWarningLevel() const { return eventWarningLevel; }
  72. void
  73. SetInstallIndexingService(bool value);
  74. bool
  75. GetInstallIndexingService() const { return installIndexingService; }
  76. private:
  77. void
  78. WriteDiskQuotas(HANDLE logfileHandle);
  79. void
  80. ConvertValueBySizeType(
  81. LONGLONG value,
  82. QuotaSizeType sizeType,
  83. LONGLONG& newValue);
  84. QuotaSizeType spaceQuotaSize;
  85. QuotaSizeType levelQuotaSize;
  86. LONGLONG spaceQuotaValue;
  87. LONGLONG levelQuotaValue;
  88. bool setDefaultQuotas;
  89. bool denyUsersOverQuota;
  90. bool eventDiskSpaceLimit;
  91. bool eventWarningLevel;
  92. bool installIndexingService;
  93. };
  94. #endif // __CYS_FILEINSTALLATIONUNIT_H