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.

84 lines
2.0 KiB

  1. //+--------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: expiter.hxx
  7. //
  8. // Contents: CExposedIterator header file
  9. //
  10. // Classes: CExposedIterator
  11. //
  12. //---------------------------------------------------------------
  13. #ifndef __EXPITER_HXX__
  14. #define __EXPITER_HXX__
  15. #include "h/dfmsp.hxx"
  16. class CDirectStream;
  17. //+--------------------------------------------------------------
  18. //
  19. // Class: CExposedIterator (ei)
  20. //
  21. // Purpose: Iterator for wrapped DocFiles
  22. //
  23. // Interface: See below
  24. //
  25. //---------------------------------------------------------------
  26. interface CExposedIterator : public IEnumSTATSTG
  27. {
  28. public:
  29. CExposedIterator(CExposedDocFile *ppdf, CDfName *pKey);
  30. ~CExposedIterator(void);
  31. // From IUnknown
  32. STDMETHOD(QueryInterface)(REFIID iid, void **ppvObj);
  33. STDMETHOD_(ULONG,AddRef)(void);
  34. STDMETHOD_(ULONG,Release)(void);
  35. // New methods
  36. STDMETHOD(Next)(ULONG celt, STATSTG FAR *rgelt,
  37. ULONG *pceltFetched);
  38. #ifndef _UNICODE
  39. SCODE Next(ULONG celt, STATSTGW FAR *rgelt, ULONG *pceltFetched);
  40. #endif
  41. STDMETHOD(Skip)(ULONG celt);
  42. STDMETHOD(Reset)(void);
  43. STDMETHOD(Clone)(IEnumSTATSTG **ppenm);
  44. inline SCODE Validate(void) const;
  45. private:
  46. CDfName _dfnKey;
  47. LONG _cReferences;
  48. ULONG _sig;
  49. CExposedDocFile *_ppdf;
  50. };
  51. // DocFileIter signatures
  52. #define CEXPOSEDITER_SIG LONGSIG('E', 'D', 'F', 'I')
  53. #define CEXPOSEDITER_SIGDEL LONGSIG('E', 'd', 'F', 'i')
  54. //+--------------------------------------------------------------
  55. //
  56. // Member: CExposedIterator::Validate, public
  57. //
  58. // Synopsis: Validates the signature
  59. //
  60. // Returns: Returns STG_E_INVALIDHANDLE if the signature
  61. // doesn't match
  62. //
  63. //---------------------------------------------------------------
  64. inline SCODE CExposedIterator::Validate(void) const
  65. {
  66. return (this == NULL ||
  67. _sig != CEXPOSEDITER_SIG) ? STG_E_INVALIDHANDLE : S_OK;
  68. }
  69. #endif