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.

110 lines
2.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1998.
  5. //
  6. // File: QCAT.HXX
  7. //
  8. // Contents: Query catalog -- downlevel catalog w/o CI support
  9. //
  10. // History: 18-Aug-94 KyleP Extracted from CiCat
  11. //
  12. //----------------------------------------------------------------------------
  13. #pragma once
  14. #include <catalog.hxx>
  15. #include <spropmap.hxx>
  16. class CPidMapper;
  17. //+---------------------------------------------------------------------------
  18. //
  19. // Class: CQCat
  20. //
  21. // Purpose: Catalog for downlevel media used by content index
  22. //
  23. // History: 10-Mar-92 BartoszM Created
  24. //
  25. //----------------------------------------------------------------------------
  26. class CQCat: public PCatalog
  27. {
  28. friend class CUpdate;
  29. public:
  30. CQCat( WCHAR const * pwcName=0 );
  31. virtual ~CQCat ();
  32. // Tell the world we are a real catalog ...
  33. BOOL IsNullCatalog()
  34. {
  35. return FALSE;
  36. }
  37. //
  38. // The following are implemented.
  39. //
  40. PROPID PropertyToPropId ( CFullPropSpec const & ps, BOOL fCreate = FALSE )
  41. {
  42. return _propMapper.PropertyToPropId( ps, fCreate);
  43. }
  44. //
  45. // The following are CI-Specific and will return an error.
  46. //
  47. unsigned WorkIdToPath ( WORKID wid, CFunnyPath & funnyPath );
  48. WORKID PathToWorkId ( const CLowerFunnyPath & lcaseFunnyPath, const BOOL fCreate );
  49. CRWStore * ComputeRelevantWords(ULONG cRows,ULONG cRW,
  50. WORKID *pwid,PARTITIONID partid);
  51. CRWStore * RetrieveRelevantWords(BOOL fAcquire,PARTITIONID partid);
  52. PStorage& GetStorage ();
  53. unsigned ReserveUpdate( WORKID wid );
  54. void Update( unsigned iHint, WORKID wid, PARTITIONID partid, USN usn, ULONG flags );
  55. void DisableUsnUpdate( PARTITIONID partid );
  56. void EnableUsnUpdate( PARTITIONID partid );
  57. void UpdateDocuments ( WCHAR const* rootPath=0, ULONG flag=UPD_FULL );
  58. void SetPartition( PARTITIONID PartId );
  59. PARTITIONID GetPartition() const;
  60. WCHAR * GetDriveName();
  61. SCODE CreateContentIndex();
  62. void EmptyContentIndex();
  63. void PidMapToPidRemap( const CPidMapper & pidMap,
  64. CPidRemapper & pidRemap );
  65. NTSTATUS CiState( CI_STATE & state );
  66. void FlushScanStatus() {}
  67. CCiRegParams * GetRegParams() { return & _regParams; }
  68. CScopeFixup * GetScopeFixup() { Win4Assert( !"not implemented" ); return 0; }
  69. protected:
  70. PROPID StandardPropertyToPropId ( CFullPropSpec const & ps )
  71. {
  72. return _propMapper.StandardPropertyToPropId( ps );
  73. }
  74. CCiRegParams _regParams;
  75. private:
  76. //
  77. // This array will hold the mapping of GUID\DISPID and GUID\Name to pid.
  78. // "Real" pids are allocated sequentially, and are good only for the life
  79. // of the catalog object.
  80. //
  81. CStandardPropMapper _propMapper;
  82. };