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.

139 lines
3.3 KiB

  1. // Copyright (c) 2001 Microsoft Corporation
  2. //
  3. // File: ExpressRebootPage.h
  4. //
  5. // Synopsis: Declares the ExpressRebootPage that shows
  6. // the progress of the changes being made to
  7. // the server after the reboot fromt the
  8. // express path
  9. //
  10. // History: 05/11/2001 JeffJon Created
  11. #ifndef __CYS_EXPRESSREBOOTPAGE_H
  12. #define __CYS_EXPRESSREBOOTPAGE_H
  13. #include "CYSWizardPage.h"
  14. class ExpressRebootPage : public CYSWizardPage
  15. {
  16. public:
  17. // These messages are sent to the page when an operation has finished.
  18. // The page will update the UI with the appropriate icons
  19. static const UINT CYS_OPERATION_FINISHED_SUCCESS;
  20. static const UINT CYS_OPERATION_FINISHED_FAILED;
  21. // These messages are sent to the page when all the operations have
  22. // completed. An appropriate dialog will be shown
  23. static const UINT CYS_OPERATION_COMPLETE_SUCCESS;
  24. static const UINT CYS_OPERATION_COMPLETE_FAILED;
  25. // This enum can be used to index the array above. The order must be identical
  26. // to the order in which the operations are processed
  27. typedef enum
  28. {
  29. CYS_OPERATION_SET_STATIC_IP = 0,
  30. CYS_OPERATION_SERVER_DHCP,
  31. CYS_OPERATION_SERVER_AD,
  32. CYS_OPERATION_SERVER_DNS,
  33. CYS_OPERATION_SET_DNS_FORWARDER,
  34. CYS_OPERATION_ACTIVATE_DHCP_SCOPE,
  35. CYS_OPERATION_AUTHORIZE_DHCP_SERVER,
  36. CYS_OPERATION_CREATE_TAPI_PARTITION,
  37. CYS_OPERATION_END
  38. } CYS_OPERATION_TYPES;
  39. typedef void (*ThreadProc) (ExpressRebootPage& page);
  40. // Constructor
  41. ExpressRebootPage();
  42. // Destructor
  43. virtual
  44. ~ExpressRebootPage();
  45. // Accessors
  46. bool
  47. SetForwarder() const { return setForwarder; }
  48. bool
  49. WasDHCPInstallAttempted() const { return dhcpInstallAttempted; }
  50. // PropertyPage overrides
  51. virtual
  52. void
  53. OnInit();
  54. virtual
  55. bool
  56. OnSetActive();
  57. virtual
  58. bool
  59. OnMessage(
  60. UINT message,
  61. WPARAM wparam,
  62. LPARAM lparam);
  63. virtual
  64. int
  65. Validate();
  66. String
  67. GetIPAddressString() const;
  68. private:
  69. void
  70. ClearOperationStates();
  71. typedef enum
  72. {
  73. // Neither the check nor the current operation
  74. // indicator will be shown for this state
  75. OPERATION_STATE_UNKNOWN = 0,
  76. // The check will be shown for this state
  77. OPERATION_STATE_FINISHED_SUCCESS,
  78. // The red minus will be shown for this state
  79. OPERATION_STATE_FINISHED_FAILED
  80. } OperationStateType;
  81. void
  82. SetOperationState(
  83. OperationStateType state,
  84. CYS_OPERATION_TYPES checkID,
  85. CYS_OPERATION_TYPES currentID);
  86. void
  87. SetCancelState(bool enable) const;
  88. void
  89. SetDHCPStatics();
  90. bool dhcpInstallAttempted;
  91. bool setForwarder;
  92. bool threadDone;
  93. String ipaddressString;
  94. // not defined: no copying allowed
  95. ExpressRebootPage(const ExpressRebootPage&);
  96. const ExpressRebootPage& operator=(const ExpressRebootPage&);
  97. };
  98. #endif // __CYS_EXPRESSREBOOTPAGE_H