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.

222 lines
4.1 KiB

  1. #pragma once
  2. #include "Parameter.h"
  3. //---------------------------------------------------------------------------
  4. // Migration Class
  5. //---------------------------------------------------------------------------
  6. class CMigration
  7. {
  8. public:
  9. CMigration(CParameterMap& mapParams) :
  10. m_spMigration(__uuidof(Migration))
  11. {
  12. Initialize(mapParams);
  13. }
  14. IUserMigrationPtr CreateUserMigration()
  15. {
  16. return m_spMigration->CreateUserMigration();
  17. }
  18. IGroupMigrationPtr CreateGroupMigration()
  19. {
  20. return m_spMigration->CreateGroupMigration();
  21. }
  22. IComputerMigrationPtr CreateComputerMigration()
  23. {
  24. return m_spMigration->CreateComputerMigration();
  25. }
  26. ISecurityTranslationPtr CreateSecurityTranslation()
  27. {
  28. return m_spMigration->CreateSecurityTranslation();
  29. }
  30. IServiceAccountEnumerationPtr CreateServiceAccountEnumeration()
  31. {
  32. return m_spMigration->CreateServiceAccountEnumeration();
  33. }
  34. IReportGenerationPtr CreateReportGeneration()
  35. {
  36. return m_spMigration->CreateReportGeneration();
  37. }
  38. protected:
  39. CMigration() {}
  40. void Initialize(CParameterMap& mapParams);
  41. protected:
  42. IMigrationPtr m_spMigration;
  43. };
  44. //---------------------------------------------------------------------------
  45. // User Migration Class
  46. //---------------------------------------------------------------------------
  47. class CUserMigration
  48. {
  49. public:
  50. CUserMigration(CMigration& rMigration, CParameterMap& mapParams) :
  51. m_spUser(rMigration.CreateUserMigration())
  52. {
  53. Initialize(mapParams);
  54. }
  55. protected:
  56. CUserMigration() {}
  57. void Initialize(CParameterMap& mapParams);
  58. protected:
  59. IUserMigrationPtr m_spUser;
  60. };
  61. //---------------------------------------------------------------------------
  62. // Group Migration Class
  63. //---------------------------------------------------------------------------
  64. class CGroupMigration
  65. {
  66. public:
  67. CGroupMigration(CMigration& rMigration, CParameterMap& mapParams) :
  68. m_spGroup(rMigration.CreateGroupMigration())
  69. {
  70. Initialize(mapParams);
  71. }
  72. protected:
  73. CGroupMigration() {}
  74. void Initialize(CParameterMap& mapParams);
  75. protected:
  76. IGroupMigrationPtr m_spGroup;
  77. };
  78. //---------------------------------------------------------------------------
  79. // Computer Migration Class
  80. //---------------------------------------------------------------------------
  81. class CComputerMigration
  82. {
  83. public:
  84. CComputerMigration(CMigration& rMigration, CParameterMap& mapParams) :
  85. m_spComputer(rMigration.CreateComputerMigration())
  86. {
  87. Initialize(mapParams);
  88. }
  89. protected:
  90. CComputerMigration() {}
  91. void Initialize(CParameterMap& mapParams);
  92. protected:
  93. IComputerMigrationPtr m_spComputer;
  94. };
  95. //---------------------------------------------------------------------------
  96. // Security Translation Class
  97. //---------------------------------------------------------------------------
  98. class CSecurityTranslation
  99. {
  100. public:
  101. CSecurityTranslation(CMigration& rMigration, CParameterMap& mapParams) :
  102. m_spSecurity(rMigration.CreateSecurityTranslation())
  103. {
  104. Initialize(mapParams);
  105. }
  106. protected:
  107. CSecurityTranslation() {}
  108. void Initialize(CParameterMap& mapParams);
  109. protected:
  110. ISecurityTranslationPtr m_spSecurity;
  111. };
  112. //---------------------------------------------------------------------------
  113. // Service Enumeration Class
  114. //---------------------------------------------------------------------------
  115. class CServiceEnumeration
  116. {
  117. public:
  118. CServiceEnumeration(CMigration& rMigration, CParameterMap& mapParams) :
  119. m_spService(rMigration.CreateServiceAccountEnumeration())
  120. {
  121. Initialize(mapParams);
  122. }
  123. protected:
  124. CServiceEnumeration() {}
  125. void Initialize(CParameterMap& mapParams);
  126. protected:
  127. IServiceAccountEnumerationPtr m_spService;
  128. };
  129. //---------------------------------------------------------------------------
  130. // Report Generation Class
  131. //---------------------------------------------------------------------------
  132. class CReportGeneration
  133. {
  134. public:
  135. CReportGeneration(CMigration& rMigration, CParameterMap& mapParams) :
  136. m_spReport(rMigration.CreateReportGeneration())
  137. {
  138. Initialize(mapParams);
  139. }
  140. protected:
  141. CReportGeneration() {}
  142. void Initialize(CParameterMap& mapParams);
  143. protected:
  144. IReportGenerationPtr m_spReport;
  145. };