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.

106 lines
2.3 KiB

  1. // Class with the repair phase
  2. // Copyright (c) 2001 Microsoft Corporation
  3. // Jun 2001 lucios
  4. #ifndef REPAIR_HPP
  5. #define REPAIR_HPP
  6. #include "AnalysisResults.hpp"
  7. #include "dspecup.hpp"
  8. // USED IN runCsvOrLdif
  9. enum csvOrLdif {LDIF,CSV};
  10. enum importExport {IMPORT,EXPORT};
  11. class CSVDSReader;
  12. struct sChangeList;
  13. class Repair
  14. {
  15. public:
  16. Repair
  17. (
  18. const CSVDSReader& csvReader409_,
  19. const CSVDSReader& csvReaderIntl_,
  20. const String& domain,
  21. const String& rootContainerDn_,
  22. AnalysisResults& res,
  23. const String& ldiffName_,
  24. const String& csvName_,
  25. const String& saveName_,
  26. const String& logPath_,
  27. const String& completeDcName_,
  28. void *caleeStruct_=NULL,
  29. progressFunction stepIt_=NULL,
  30. progressFunction totalSteps_=NULL
  31. );
  32. HRESULT run();
  33. private:
  34. AnalysisResults& results;
  35. const CSVDSReader& csvReader409;
  36. const CSVDSReader& csvReaderIntl;
  37. const String domain;
  38. const String rootContainerDn;
  39. const String ldiffName;
  40. const String csvName;
  41. const String saveName;
  42. const String logPath;
  43. const String completeDcName;
  44. String csvLog;
  45. String ldifLog;
  46. void *caleeStruct;
  47. progressFunction stepIt;
  48. progressFunction totalSteps;
  49. long csvBuildStep;
  50. long ldiffBuildStep;
  51. long csvRunStep;
  52. long ldiffRunStep;
  53. long ldiffSaveStep;
  54. long csvActions;
  55. long ldiffActions;
  56. HRESULT buildSaveLdif();
  57. HRESULT buildChangeLdif();
  58. HRESULT
  59. makeObjectsCsv(HANDLE file,ObjectIdList &objects);
  60. HRESULT
  61. makeObjectsLdif(HANDLE file,ObjectIdList &objects);
  62. HRESULT buildCsv();
  63. HRESULT
  64. runCsvOrLdif(
  65. csvOrLdif whichExe,
  66. importExport inOut,
  67. const String& file,
  68. const String& extraOptions=L"",
  69. const String& logFileArg=L""
  70. );
  71. HRESULT
  72. getLdifExportedObject (
  73. const long locale,
  74. const String &object,
  75. String &objectLines
  76. );
  77. void setProgress();
  78. };
  79. #endif