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.

168 lines
2.5 KiB

  1. // Copyright (c) 1997-1999 Microsoft Corporation
  2. //
  3. // Tab state
  4. //
  5. // 3-11-98 sburns
  6. #ifndef STATE_HPP_INCLUDED
  7. #define STATE_HPP_INCLUDED
  8. extern TCHAR const c_szWizardFilename[];
  9. String
  10. CheckPreconditions();
  11. // Returns the dc role change status of the machine.
  12. DSROLE_OPERATION_STATE
  13. GetDsRoleChangeState();
  14. // Return false if the machine is undergoing a DC upgrade, true otherwise.
  15. // 388578
  16. bool
  17. IsUpgradingDc();
  18. // Singleton state of the UI.
  19. class State
  20. {
  21. public:
  22. static
  23. void
  24. Delete();
  25. static
  26. State&
  27. GetInstance();
  28. static
  29. void
  30. Init();
  31. static
  32. void
  33. Refresh();
  34. bool
  35. ChangesNeedSaving() const;
  36. bool
  37. IsMachineDc() const;
  38. bool
  39. IsMemberOfWorkgroup() const;
  40. bool
  41. IsNetworkingInstalled() const;
  42. void
  43. SetIsMemberOfWorkgroup(bool yesNo);
  44. String
  45. GetComputerDomainDnsName() const;
  46. void
  47. SetComputerDomainDnsName(const String& newName);
  48. bool
  49. ComputerDomainDnsNameWasChanged() const;
  50. String
  51. GetFullComputerName() const;
  52. String
  53. GetNetbiosComputerName() const;
  54. String
  55. GetShortComputerName() const;
  56. void
  57. SetShortComputerName(const String& name);
  58. bool
  59. WasShortComputerNameChanged() const;
  60. bool
  61. WasNetbiosComputerNameChanged() const;
  62. String
  63. GetOriginalShortComputerName() const;
  64. String
  65. GetDomainName() const;
  66. void
  67. SetDomainName(const String& name);
  68. bool
  69. WasMembershipChanged() const;
  70. bool
  71. GetSyncDNSNames() const;
  72. void
  73. SetSyncDNSNames(bool yesNo);
  74. bool
  75. SyncDNSNamesWasChanged() const;
  76. bool
  77. SaveChanges(HWND dialog);
  78. // indicates that changes have been made in this session.
  79. bool
  80. ChangesMadeThisSession() const;
  81. void
  82. SetChangesMadeThisSession(bool yesNo);
  83. // indicates that changes have been made in this or prior sessions, or
  84. // the computer name has been changed by some other means than ourselves.
  85. bool
  86. NeedsReboot() const;
  87. private:
  88. // Init() actually builds the instance
  89. State();
  90. // Delete destroys the instance
  91. ~State();
  92. // not implemented: no copying allowed
  93. State(const State&);
  94. const State& operator=(const State&);
  95. bool
  96. DoSaveDomainChange(HWND dialog);
  97. bool
  98. DoSaveWorkgroupChange(HWND dialog);
  99. bool
  100. DoSaveNameChange(HWND dialog);
  101. void
  102. SetFullComputerName();
  103. };
  104. #endif // STATE_HPP_INCLUDED