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.

78 lines
2.4 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. INFSCAN
  5. installscan.h
  6. Abstract:
  7. Install section scanning class
  8. History:
  9. Created July 2001 - JamieHun
  10. --*/
  11. #ifndef _INFSCAN_INSTALLSCAN_H_
  12. #define _INFSCAN_INSTALLSCAN_H_
  13. typedef int (InstallScan::*RecurseKeywordCallback)(ParseInfContextBlob & TheInf,const SafeString & sect,const SafeString & keyword,const SafeString & val);
  14. class InstallScan {
  15. public:
  16. GlobalScan *pGlobalScan;
  17. InfScan *pInfScan;
  18. DWORD PlatformMask;
  19. SafeString Section;
  20. ParseInfContextList InfSearchList;
  21. StringSet Included;
  22. StringSet HWIDs;
  23. TargetDirectoryEntry *pTargetDirectory;
  24. public:
  25. bool NotDeviceInstall;
  26. bool HasDependentFileChanged;
  27. InstallScan();
  28. ~InstallScan();
  29. public:
  30. int ScanInstallSection();
  31. void AddHWIDs(const StringSet & hwids);
  32. void GetHWIDs(StringSet & hwids);
  33. protected:
  34. int Layouts();
  35. int Include(const SafeString & name);
  36. int RecurseKeyword(const SafeString & sect,const SafeString & keyword,RecurseKeywordCallback callback, int & count);
  37. int IncludeCallback(ParseInfContextBlob & TheInf,const SafeString & sect,const SafeString & keyword,const SafeString & value);
  38. int NeedsCallback(ParseInfContextBlob & TheInf,const SafeString & sect,const SafeString & keyword,const SafeString & value);
  39. int CopyFilesCallback(ParseInfContextBlob & TheInf,const SafeString & sect,const SafeString & keyword,const SafeString & value);
  40. int CheckSingleCopyFile(ParseInfContextBlob & TheInf,TargetDirectoryEntry *pTargDir,const SafeString & sect,const SafeString & keyword,const SafeString & section);
  41. int CheckInstallSubSection(const SafeString & sect);
  42. int CheckCopyFiles(const SafeString & section);
  43. int QuerySourceFile(ParseInfContextBlob & TheInf,const SafeString & section,const SafeString & source,SourceDisksFilesList & Target);
  44. LONG GetLineCount(const SafeString & section);
  45. bool DoesSectionExist(const SafeString & section);
  46. public:
  47. //
  48. // redirected
  49. //
  50. void Fail(int err,const StringList & errors);
  51. void Fail(int err);
  52. void Fail(int err,const SafeString & one);
  53. void Fail(int err,const SafeString & one,const SafeString & two);
  54. void Fail(int err,const SafeString & one,const SafeString & two,const SafeString & three);
  55. BOOL Pedantic();
  56. };
  57. #endif //!_INFSCAN_INSTALLSCAN_H_