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.

253 lines
5.4 KiB

  1. #ifndef ANALISYS_HPP
  2. #define ANALISYS_HPP
  3. #include "AnalisysResults.hpp"
  4. #include "dspecup.hpp"
  5. class CSVDSReader;
  6. struct sChangeList;
  7. class Analisys
  8. {
  9. public:
  10. Analisys(
  11. const CSVDSReader& csvReader409_,
  12. const CSVDSReader& csvReaderIntl_,
  13. const String& ldapPrefix_,
  14. const String& rootContainerDn_,
  15. AnalisysResults &res,
  16. const String &reportName_=L"",
  17. void *caleeStruct_=NULL,
  18. progressFunction stepIt_=NULL,
  19. progressFunction totalSteps_=NULL
  20. );
  21. HRESULT run();
  22. private:
  23. const CSVDSReader& csvReader409;
  24. const CSVDSReader& csvReaderIntl;
  25. String ldapPrefix;
  26. String rootContainerDn;
  27. AnalisysResults& results;
  28. String reportName;
  29. void *caleeStruct;
  30. progressFunction stepIt;
  31. progressFunction totalSteps;
  32. // add entry to result.createContainers if container is not present
  33. // also returns flag isPresent
  34. HRESULT
  35. dealWithContainer(
  36. const long locale,
  37. bool &isPresent);
  38. // add entries to results.conflictingXPObjects or
  39. // results.createXPObject as necessary
  40. HRESULT
  41. dealWithXPObjects(const long locale);
  42. // add entries to results.createW2KObjects and
  43. // and results.objectActions as necessary
  44. HRESULT
  45. dealWithW2KObjects(const long locale);
  46. // adds ordAndGuid to the property if Guid is not already there.
  47. HRESULT
  48. addGuid
  49. (
  50. IDirectoryObject *iDirObj,
  51. const int locale,
  52. const wchar_t *object,
  53. const wchar_t *property,
  54. const wchar_t *ordAndGuid
  55. );
  56. // adds all csv values still not on the property
  57. HRESULT
  58. addAllCsvValues
  59. (
  60. IDirectoryObject *iDirObj,
  61. const long locale,
  62. const wchar_t *object,
  63. const wchar_t *property
  64. );
  65. // adds value to the property if it is not already there.
  66. HRESULT
  67. addValue
  68. (
  69. IDirectoryObject *iDirObj,
  70. const int locale,
  71. const wchar_t *object,
  72. const wchar_t *property,
  73. const wchar_t *value
  74. );
  75. HRESULT
  76. getCsvSingleValue
  77. (
  78. const int locale,
  79. const wchar_t *object,
  80. const wchar_t *property,
  81. String &csvValue
  82. );
  83. HRESULT
  84. replaceW2KSingleValue
  85. (
  86. IDirectoryObject *iDirObj,
  87. const int locale,
  88. const wchar_t *object,
  89. const wchar_t *property,
  90. const wchar_t *value
  91. );
  92. HRESULT
  93. getCsvMultipleValue
  94. (
  95. const int locale,
  96. const wchar_t *object,
  97. const wchar_t *property,
  98. const wchar_t *value,
  99. String &csvValue,
  100. String &XPstart
  101. );
  102. HRESULT
  103. replaceW2KMultipleValue(
  104. IDirectoryObject *iDirObj,
  105. const int locale,
  106. const wchar_t *object,
  107. const wchar_t *property,
  108. const wchar_t *value);
  109. // removes ordAndGuid from the property if Guid is there.
  110. HRESULT
  111. removeGuid(
  112. IDirectoryObject *iDirObj,
  113. const int locale,
  114. const wchar_t *object,
  115. const wchar_t *property,
  116. const wchar_t *ordAndGuid);
  117. // set previousSuccessfulRun reading from ADSI
  118. HRESULT
  119. setPreviousSuccessfullRun();
  120. HRESULT
  121. checkChanges
  122. (
  123. const long locale,
  124. const sChangeList& changes,
  125. IDirectoryObject *iDirObj
  126. );
  127. HRESULT
  128. getADFirstValue
  129. (
  130. IDirectoryObject *iDirObj,
  131. const String &property,
  132. String &value
  133. );
  134. HRESULT
  135. isADStartValuePresent
  136. (
  137. IDirectoryObject *iDirObj,
  138. const String &property,
  139. const String &valueStart,
  140. String &value
  141. );
  142. HRESULT
  143. isADValuePresent
  144. (
  145. IDirectoryObject *iDirObj,
  146. const String &property,
  147. const String &value
  148. );
  149. HRESULT
  150. getADGuid
  151. (
  152. IDirectoryObject *iDirObj,
  153. const String &property,
  154. const String &guidValue,
  155. String &guidFound
  156. );
  157. HRESULT
  158. removeExtraneous
  159. (
  160. IDirectoryObject *iDirObj,
  161. const int locale,
  162. const String &object,
  163. const String &property,
  164. const String &keeper
  165. );
  166. HRESULT
  167. removeExtraneous
  168. (
  169. IDirectoryObject *iDirObj,
  170. const int locale,
  171. const String &object,
  172. const String &property,
  173. const String &keeper,
  174. const String &start1,
  175. const String &start2
  176. );
  177. HRESULT
  178. reportObjects
  179. (
  180. HANDLE file,
  181. const ObjectIdList &list,
  182. const String &header
  183. );
  184. HRESULT
  185. reportContainers
  186. (
  187. HANDLE file,
  188. const LongList &list,
  189. const String &header
  190. );
  191. HRESULT
  192. reportActions
  193. (
  194. HANDLE file,
  195. const ObjectActions &list,
  196. const String &header
  197. );
  198. HRESULT
  199. reportValues
  200. (
  201. HANDLE file,
  202. const SingleValueList &list,
  203. const String &header
  204. );
  205. HRESULT
  206. createReport(const String& reportName);
  207. };
  208. #endif