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.

143 lines
3.1 KiB

  1. /******************************************************************************
  2. *
  3. * Copyright (c) 2000 Microsoft Corporation
  4. *
  5. * Module Name:
  6. * srconfig.h
  7. *
  8. * Abstract:
  9. * CSRConfig class definition
  10. *
  11. * Revision History:
  12. * Brijesh Krishnaswami (brijeshk) 04/13/2000
  13. * created
  14. *
  15. *****************************************************************************/
  16. #ifndef _SRCONFIG_H_
  17. #define _SRCONFIG_H_
  18. #include "srdefs.h"
  19. class CSRConfig {
  20. public:
  21. HANDLE m_hFilter;
  22. DWORD m_dwDisableSR;
  23. DWORD m_dwDisableSR_GroupPolicy;
  24. DWORD m_dwFirstRun;
  25. BOOL m_fSafeMode;
  26. DWORD m_dwDSMin;
  27. DWORD m_dwDSMax;
  28. DWORD m_dwRPSessionInterval;
  29. DWORD m_dwRPGlobalInterval;
  30. DWORD m_dwCompressionBurst;
  31. DWORD m_dwTimerInterval;
  32. DWORD m_dwIdleInterval;
  33. WCHAR m_szSystemDrive[MAX_PATH];
  34. WCHAR m_szGuid[MAX_PATH];
  35. BOOL m_fCleanup;
  36. BOOL m_fReset;
  37. DWORD m_dwFifoDisabledNum;
  38. DWORD m_dwDiskPercent;
  39. DWORD m_dwRPLifeInterval;
  40. DWORD m_dwThawInterval;
  41. DWORD m_dwTestBroadcast;
  42. DWORD m_dwCreateFirstRunRp;
  43. DWORD m_dwFreezeThawLogCount;
  44. UINT m_uiTMFreeze;
  45. UINT m_uiTMThaw;
  46. UINT m_uiTMFifoStart;
  47. UINT m_uiTMFifoStop;
  48. UINT m_uiTMEnable;
  49. UINT m_uiTMDisable;
  50. UINT m_uiTMCompressStart;
  51. UINT m_uiTMCompressStop;
  52. // event handles
  53. HANDLE m_hSRInitEvent;
  54. HANDLE m_hSRStopEvent;
  55. HANDLE m_hIdleStartEvent;
  56. HANDLE m_hIdleStopEvent;
  57. HANDLE m_hIdleRequestEvent;
  58. HANDLE m_hIdle;
  59. CSRConfig();
  60. ~CSRConfig();
  61. HANDLE GetFilter() {
  62. return m_hFilter;
  63. }
  64. LPWSTR GetSystemDrive() {
  65. return m_szSystemDrive;
  66. }
  67. DWORD GetFirstRun() {
  68. return m_dwFirstRun;
  69. }
  70. BOOL GetSafeMode() {
  71. return m_fSafeMode;
  72. }
  73. BOOL GetCleanupFlag() {
  74. return m_fCleanup;
  75. }
  76. BOOL GetResetFlag() {
  77. return m_fReset;
  78. }
  79. DWORD GetFifoDisabledNum() {
  80. return m_dwFifoDisabledNum;
  81. }
  82. DWORD GetDisableFlag () {
  83. return m_dwDisableSR;
  84. }
  85. DWORD GetDisableFlag_GroupPolicy () {
  86. return m_dwDisableSR_GroupPolicy;
  87. }
  88. void SetCleanupFlag(BOOL fCleanup) {
  89. m_fCleanup = fCleanup;
  90. }
  91. void SetResetFlag(BOOL fReset) {
  92. m_fReset = fReset;
  93. }
  94. void SetFifoDisabledNum(DWORD dwNum) {
  95. m_dwFifoDisabledNum = dwNum;
  96. }
  97. DWORD GetDSMin (BOOL fSystem)
  98. {
  99. if (fSystem)
  100. return m_dwDSMin * MEGABYTE;
  101. else
  102. return SR_DEFAULT_DSMIN_NONSYSTEM * MEGABYTE;
  103. }
  104. DWORD OpenFilter();
  105. void CloseFilter();
  106. void SetDefaults();
  107. void WriteAll();
  108. void ReadAll();
  109. DWORD Initialize();
  110. DWORD SetFirstRun(DWORD dwValue);
  111. DWORD SetDisableFlag (DWORD dwDisableSR);
  112. DWORD SetMachineGuid();
  113. DWORD AddBackupRegKey();
  114. void RegisterTestMessages();
  115. DWORD SetCreateFirstRunRp(DWORD dwValue);
  116. DWORD GetCreateFirstRunRp();
  117. BOOL IsSystemOnBattery();
  118. };
  119. extern CSRConfig *g_pSRConfig;
  120. #endif