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.

90 lines
2.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1992 - 1993, Microsoft Corporation.
  4. //
  5. // File: genflt.hxx
  6. //
  7. // Contents: C and Gen filter
  8. //
  9. // Classes: GenIFilter
  10. //
  11. // History: 07-Oct-93 AmyA Created
  12. //
  13. //----------------------------------------------------------------------------
  14. #pragma once
  15. class CFullPropSpec;
  16. //+---------------------------------------------------------------------------
  17. //
  18. // Class: GenIFilter
  19. //
  20. // Purpose: C and Gen Filter
  21. //
  22. // History: 07-Oct-93 AmyA Created
  23. //
  24. //----------------------------------------------------------------------------
  25. class GenIFilter: public GenIFilterBase
  26. {
  27. enum FilterState
  28. {
  29. FilterContents,
  30. FilterProp,
  31. FilterNextProp, // current property text exhausted
  32. FilterValue,
  33. FilterNextValue,
  34. FilterDone
  35. };
  36. public:
  37. GenIFilter();
  38. ~GenIFilter();
  39. SCODE STDMETHODCALLTYPE Init( ULONG grfFlags,
  40. ULONG cAttributes,
  41. FULLPROPSPEC const * aAttributes,
  42. ULONG * pFlags );
  43. SCODE STDMETHODCALLTYPE GetChunk( STAT_CHUNK * pStat );
  44. SCODE STDMETHODCALLTYPE GetText( ULONG * pcwcBuffer,
  45. WCHAR * awcBuffer );
  46. SCODE STDMETHODCALLTYPE GetValue( VARIANT ** ppPropValue );
  47. SCODE STDMETHODCALLTYPE BindRegion( FILTERREGION origPos,
  48. REFIID riid,
  49. void ** ppunk );
  50. SCODE STDMETHODCALLTYPE GetClassID(CLSID * pClassID);
  51. SCODE STDMETHODCALLTYPE IsDirty();
  52. SCODE STDMETHODCALLTYPE Load(LPCWSTR pszFileName, DWORD dwMode);
  53. SCODE STDMETHODCALLTYPE Save(LPCWSTR pszFileName, BOOL fRemember);
  54. SCODE STDMETHODCALLTYPE SaveCompleted(LPCWSTR pszFileName);
  55. SCODE STDMETHODCALLTYPE GetCurFile(LPWSTR * ppszFileName);
  56. private:
  57. FilterState _state;
  58. IFilter * _pTextFilt; // Base text IFilter
  59. IPersistFile * _pPersFile; // Base text IPersistFile
  60. GenParser _genParse; // C++ parser
  61. LCID _locale; // Locale (cached from text filter)
  62. ULONG _ulLastTextChunkID; // Id of last text chunk
  63. ULONG _ulChunkID; // Current chunk id
  64. ULONG _cAttrib; // Count of attributes. 0 --> All
  65. CFullPropSpec * _pAttrib; // Attributes
  66. CFilterTextStream* _pTextStream; // Source text stream for C++ parser
  67. };