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.

80 lines
1.7 KiB

  1. // Copyright (c) 1997-2001 Microsoft Corporation
  2. //
  3. // File: InstallationUnit.cpp
  4. //
  5. // Synopsis: Defines an InstallationUnit
  6. // An InstallationUnit represents a single
  7. // entity that can be installed. (i.e. DHCP, IIS, etc.)
  8. //
  9. // History: 02/03/2001 JeffJon Created
  10. #include "pch.h"
  11. #include "InstallationUnit.h"
  12. // It should match the values in the InstallationReturnType
  13. // The values of the enum are used to index this array
  14. extern String installReturnTypeStrings[] =
  15. {
  16. String(L"INSTALL_SUCCESS"),
  17. String(L"INSTALL_FAILURE"),
  18. String(L"INSTALL_SUCCESS_REBOOT"),
  19. String(L"INSTALL_NO_CHANGES")
  20. };
  21. // Finish page help string
  22. static PCWSTR FINISH_PAGE_HELP = L"cys.chm::/cys_topnode.htm";
  23. InstallationUnit::InstallationUnit(unsigned int serviceNameID,
  24. unsigned int serviceDescriptionID,
  25. const String finishPageHelpString,
  26. InstallationUnitType newInstallType) :
  27. nameID(serviceNameID),
  28. descriptionID(serviceDescriptionID),
  29. finishHelp(finishPageHelpString),
  30. installationUnitType(newInstallType),
  31. name(),
  32. description()
  33. {
  34. }
  35. String
  36. InstallationUnit::GetServiceName()
  37. {
  38. LOG_FUNCTION(InstallationUnit::GetServiceName);
  39. if (name.empty())
  40. {
  41. name = String::load(nameID);
  42. }
  43. return name;
  44. }
  45. String
  46. InstallationUnit::GetServiceDescription()
  47. {
  48. LOG_FUNCTION(InstallationUnit::GetServiceDescription);
  49. if (description.empty())
  50. {
  51. description = String::load(descriptionID);
  52. }
  53. return description;
  54. }
  55. String
  56. InstallationUnit::GetFinishHelp()
  57. {
  58. LOG_FUNCTION(InstallationUnit::GetFinishHelp);
  59. String result = finishHelp;
  60. LOG(result);
  61. return result;
  62. }