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.

125 lines
2.6 KiB

  1. // Copyright (c) 2001 Microsoft Corporation
  2. //
  3. // File: DHCPInstallationUnit.h
  4. //
  5. // Synopsis: Declares a DHCPInstallationUnit
  6. // This object has the knowledge for installing the
  7. // DHCP service
  8. //
  9. // History: 02/05/2001 JeffJon Created
  10. #ifndef __CYS_DHCPINSTALLATIONUNIT_H
  11. #define __CYS_DHCPINSTALLATIONUNIT_H
  12. #include "NetworkInterface.h"
  13. #include "resource.h"
  14. #include "ExpressPathInstallationUnitBase.h"
  15. extern PCWSTR CYS_DHCP_FINISH_PAGE_HELP;
  16. class DHCPInstallationUnit : public ExpressPathInstallationUnitBase
  17. {
  18. public:
  19. // Constructor
  20. DHCPInstallationUnit();
  21. // Destructor
  22. virtual
  23. ~DHCPInstallationUnit();
  24. // Installation Unit overrides
  25. virtual
  26. InstallationReturnType
  27. InstallService(HANDLE logfileHandle, HWND hwnd);
  28. virtual
  29. UnInstallReturnType
  30. UnInstallService(HANDLE logfileHandle, HWND hwnd);
  31. virtual
  32. bool
  33. GetMilestoneText(String& message);
  34. virtual
  35. String
  36. GetFinishText();
  37. virtual
  38. bool
  39. GetUninstallMilestoneText(String& message);
  40. InstallationReturnType
  41. ExpressPathInstall(HANDLE logfileHandle, HWND hwnd);
  42. virtual
  43. String
  44. GetServiceDescription();
  45. virtual
  46. void
  47. ServerRoleLinkSelected(int linkIndex, HWND hwnd);
  48. virtual
  49. void
  50. FinishLinkSelected(int inkIndex, HWND hwnd);
  51. // Other accessibly functions
  52. bool
  53. AuthorizeDHCPServer(const String& dnsName) const;
  54. // Data accessors
  55. void
  56. SetStartIPAddress(DWORD ipaddress);
  57. DWORD
  58. GetStartIPAddress(const NetworkInterface& nic);
  59. void
  60. SetEndIPAddress(DWORD ipaddress);
  61. DWORD
  62. GetEndIPAddress(const NetworkInterface& nic);
  63. String
  64. GetStartIPAddressString(const NetworkInterface& nic);
  65. String
  66. GetEndIPAddressString(const NetworkInterface& nic);
  67. protected:
  68. void
  69. CreateUnattendFileTextForExpressPath(
  70. const NetworkInterface& nic,
  71. String& unattendFileText);
  72. private:
  73. enum DHCPRoleResult
  74. {
  75. DHCP_SUCCESS,
  76. DHCP_INSTALL_FAILURE,
  77. DHCP_CONFIG_FAILURE
  78. };
  79. void
  80. CalculateScope(const NetworkInterface& nic);
  81. DHCPRoleResult dhcpRoleResult;
  82. bool isExpressPathInstall;
  83. bool scopeCalculated;
  84. DWORD startIPAddress;
  85. DWORD endIPAddress;
  86. unsigned int installedDescriptionID;
  87. };
  88. #endif // __CYS_DHCPINSTALLATIONUNIT_H