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.

130 lines
3.1 KiB

  1. // Copyright (c) 2001 Microsoft Corporation
  2. //
  3. // File: InstallationUnitProvider.h
  4. //
  5. // Synopsis: Declares an InstallationUnitProvider
  6. // An InstallationUnitProvider manages the global
  7. // InstallationUnits for each service that can be
  8. // installed.
  9. //
  10. // History: 02/05/2001 JeffJon Created
  11. // 12/17/2001 JeffJon Added the POP3InstallationUnit
  12. #ifndef __CYS_SERVERATIONUNITPROVIDER_H
  13. #define __CYS_SERVERATIONUNITPROVIDER_H
  14. #include "InstallationUnit.h"
  15. #include "ADInstallationUnit.h"
  16. #include "DHCPInstallationUnit.h"
  17. #include "DNSInstallationUnit.h"
  18. #include "ExpressInstallationUnit.h"
  19. #include "FileInstallationUnit.h"
  20. #include "IndexingInstallationUnit.h"
  21. #include "MediaInstallationUnit.h"
  22. #include "POP3InstallationUnit.h"
  23. #include "PrintInstallationUnit.h"
  24. #include "RRASInstallationUnit.h"
  25. #include "TerminalServerInstallationUnit.h"
  26. #include "WebInstallationUnit.h"
  27. #include "WINSInstallationUnit.h"
  28. typedef
  29. std::map<
  30. ServerRole,
  31. InstallationUnit*,
  32. std::less<ServerRole>,
  33. Burnslib::Heap::Allocator<InstallationUnit*> >
  34. InstallationUnitContainerType;
  35. class InstallationUnitProvider
  36. {
  37. public:
  38. static
  39. InstallationUnitProvider&
  40. GetInstance();
  41. static
  42. void
  43. Destroy();
  44. InstallationUnit&
  45. GetCurrentInstallationUnit();
  46. InstallationUnit&
  47. SetCurrentInstallationUnit(ServerRole ServerRole);
  48. InstallationUnit&
  49. GetInstallationUnitForType(ServerRole ServerRole);
  50. DHCPInstallationUnit&
  51. GetDHCPInstallationUnit();
  52. DNSInstallationUnit&
  53. GetDNSInstallationUnit();
  54. WINSInstallationUnit&
  55. GetWINSInstallationUnit();
  56. RRASInstallationUnit&
  57. GetRRASInstallationUnit();
  58. TerminalServerInstallationUnit&
  59. GetTerminalServerInstallationUnit();
  60. FileInstallationUnit&
  61. GetFileInstallationUnit();
  62. IndexingInstallationUnit&
  63. GetIndexingInstallationUnit();
  64. PrintInstallationUnit&
  65. GetPrintInstallationUnit();
  66. MediaInstallationUnit&
  67. GetMediaInstallationUnit();
  68. WebInstallationUnit&
  69. GetWebInstallationUnit();
  70. ExpressInstallationUnit&
  71. GetExpressInstallationUnit();
  72. ADInstallationUnit&
  73. GetADInstallationUnit();
  74. POP3InstallationUnit&
  75. GetPOP3InstallationUnit();
  76. private:
  77. // Constructor
  78. InstallationUnitProvider();
  79. // Destructor
  80. ~InstallationUnitProvider();
  81. void
  82. Init();
  83. // The current installation unit
  84. InstallationUnit* currentInstallationUnit;
  85. // Container for installation units. The map is keyed
  86. // by the ServerRole enum
  87. InstallationUnitContainerType installationUnitContainer;
  88. bool initialized;
  89. // not defined: no copying allowed
  90. InstallationUnitProvider(const InstallationUnitProvider&);
  91. const InstallationUnitProvider& operator=(const InstallationUnitProvider&);
  92. };
  93. #endif // __CYS_SERVERATIONUNITPROVIDER_H