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.

108 lines
3.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1998.
  5. //
  6. // File: FDRIVER.HXX
  7. //
  8. // Contents: Filter Driver
  9. //
  10. // Classes: CFilterDriver, CNonStoredProps
  11. //
  12. // History: 12-Apr-91 BartoszM Created
  13. // 10-June-91 t-WadeR changed to use key repository
  14. //
  15. //----------------------------------------------------------------------------
  16. #pragma once
  17. #include <ciintf.h>
  18. #include <pfilter.hxx>
  19. #include <frmutils.hxx>
  20. class CDocCharacterization;
  21. class CPropertyEnum;
  22. class CFilterOplock;
  23. //+---------------------------------------------------------------------------
  24. //
  25. // Class: CFilterDriver (fdr)
  26. //
  27. // Purpose: Load filters and create word list
  28. //
  29. // History: 12-Apr-91 BartoszM Created.
  30. // 10-June-91 t-WadeR changed to use key repository
  31. // 06-May-93 AmyA changed to handle one file at a time
  32. // 02-Aug-93 AmyA changed to use IFilter interface
  33. // 21-Oct-21 DwightKr Changed _path from CHAR to WCHAR
  34. // Removed WCHAR * _prop
  35. //
  36. // Notes:
  37. //
  38. //----------------------------------------------------------------------------
  39. class CDataRepository;
  40. const cLCIDMax = 5;
  41. class CFilterDriver
  42. {
  43. public:
  44. CFilterDriver ( CDataRepository * drep,
  45. ICiCAdviseStatus * pAdviseStatus,
  46. ICiCFilterClient * pFilterClient,
  47. CCiFrameworkParams & params,
  48. CI_CLIENT_FILTER_CONFIG_INFO const & configInfo,
  49. ULONG & cFilteredBlocks,
  50. CNonStoredProps & NonStoredProps,
  51. ULONG cbBuf );
  52. STATUS FillEntryBuffer( BYTE const * pbDocName, ULONG cbDocName );
  53. LARGE_INTEGER & GetFileSize () { return *((LARGE_INTEGER *) &_llFileSize); }
  54. inline BOOL TooBigForDefault( LONGLONG const ll )
  55. {
  56. return( ll > _params.GetMaxFilesizeFiltered() );
  57. }
  58. private:
  59. void FilterProperty( CStorageVariant const & var,
  60. CFullPropSpec & ps,
  61. CDataRepository & drep,
  62. CDocCharacterization & docChar,
  63. LCID locale );
  64. void FilterObject( CPropertyEnum & propEnum,
  65. CDataRepository & drep,
  66. CDocCharacterization & docChar );
  67. void FilterSecurity( ICiCOpenedDoc * Document,
  68. CDataRepository & drep );
  69. void LogOverflow( BYTE const * pbDocName, ULONG cbDocName );
  70. void ReportFilterEmbeddingFailure( BYTE const * pbDocName, ULONG cbDocName );
  71. void RegisterLocale(LCID locale);
  72. CDataRepository * _drep;
  73. STATUS _status;
  74. XInterface<IFilter> _pIFilter;
  75. LONGLONG _llFileSize;
  76. ULONG & _cFilteredBlocks;
  77. ICiCAdviseStatus * _pAdviseStatus;
  78. ICiCFilterClient * _pFilterClient;
  79. CI_CLIENT_FILTER_CONFIG_INFO const & _configInfo;
  80. CCiFrameworkParams & _params;
  81. CNonStoredProps & _NonStoredProps;
  82. ULONG _cbBuf;
  83. ULONG _attrib;
  84. LCID _alcidSeen[cLCIDMax];
  85. int _cLCIDs;
  86. LCID _lcidSystemDefault;
  87. };