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.

117 lines
3.2 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. INFSCAN
  5. infscan.h
  6. Abstract:
  7. PNF generation and INF Parser class definations
  8. History:
  9. Created July 2001 - JamieHun
  10. --*/
  11. #ifndef _INFSCAN_INFSCAN_H_
  12. #define _INFSCAN_INFSCAN_H_
  13. class InstallScan;
  14. typedef blob<InstallScan> InstallSectionBlob;
  15. typedef list<InstallSectionBlob> InstallSectionBlobList;
  16. typedef map<SafeString,InstallSectionBlob> StringToInstallSectionBlob;
  17. class PnfGen: public JobItem {
  18. protected:
  19. SafeString InfName;
  20. protected:
  21. virtual int Run();
  22. public:
  23. PnfGen(const SafeString & name);
  24. };
  25. class InfScan: public JobItem {
  26. public:
  27. bool ThisIsLayoutInf;
  28. GlobalScan *pGlobalScan;
  29. StringToString LocalInfDescriptions;
  30. StringToString LocalInfHardwareIds;
  31. ParseInfContextMap Infs;
  32. ParseInfContextBlob PrimaryInf;
  33. SafeString FullInfName;
  34. SafeString FileNameOnly;
  35. int FilterAction;
  36. SafeString FilterSection;
  37. SafeString GuidFilterSection;
  38. SafeString FilterGuid;
  39. StringList SourceFiles;
  40. StringSet DriverSourceCheck;
  41. StringSet OtherInstallSections;
  42. StringSet PotentialInstallSections;
  43. StringSet ModifiedHardwareIds;
  44. bool HasErrors;
  45. ReportEntryMap LocalErrorFilters;
  46. ReportEntryMap LocalErrors;
  47. StringToInstallSectionBlob UsedInstallSections;
  48. bool ScanDevices;
  49. bool HasDependentFileChanged;
  50. public:
  51. //
  52. // job callbacks
  53. //
  54. virtual int Run();
  55. virtual int PartialCleanup();
  56. virtual int PreResults();
  57. virtual int Results();
  58. protected:
  59. //
  60. // internal
  61. //
  62. int GenerateFilterInformation();
  63. int CheckSameInfInstallConflict(const SafeString & desc, const SafeString & sect, bool & f);
  64. int CheckSameInfDeviceConflict(const SafeString & hwid, const SafeString & sect, bool & f);
  65. int CheckClassGuid();
  66. int GetCopySections();
  67. int CheckCopySections();
  68. int ProcessCopySections();
  69. int CheckDriverInf(bool CopyElimination = false);
  70. int CheckClassInstall(bool CopyElimination);
  71. int CheckInstallSections(const SafeString & namedSection,DWORD platformMask,const StringList & shadowDecorations,InstallSectionBlobList & sections, bool required,bool CopyElimination);
  72. int CheckModelsSection(const SafeString & section,const StringList & shadowDecorations,DWORD PlatformMask,bool CopyElimination);
  73. int CheckCrossInfInstallConflicts();
  74. int CheckCrossInfDeviceConflicts();
  75. int PrepareCrossInfInstallCheck();
  76. int PrepareCrossInfDeviceCheck();
  77. InstallSectionBlob GetInstallSection(const SafeString & section);
  78. public:
  79. ParseInfContextBlob & Include(const SafeString & val, bool expandPath = true);
  80. void Fail(int err,const StringList & errors);
  81. //
  82. // alternative Fail's
  83. //
  84. void Fail(int err);
  85. void Fail(int err,const SafeString & one);
  86. void Fail(int err,const SafeString & one,const SafeString & two);
  87. void Fail(int err,const SafeString & one,const SafeString & two,const SafeString & three);
  88. BOOL Pedantic();
  89. public:
  90. InfScan(GlobalScan *globalScan,const SafeString & infName);
  91. virtual ~InfScan();
  92. };
  93. #endif //!_INFSCAN_INFSCAN_H_