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.

91 lines
2.3 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. // History: 12-Mar-92 DrewB Created
  13. //
  14. //---------------------------------------------------------------
  15. #ifndef __EXPITER_HXX__
  16. #define __EXPITER_HXX__
  17. #include <dfmsp.hxx>
  18. #include <lock.hxx>
  19. #include <dfbasis.hxx>
  20. #include <peiter.hxx>
  21. #include <astgconn.hxx>
  22. class CDFBasis;
  23. class CDirectStream;
  24. //+--------------------------------------------------------------
  25. //
  26. // Class: CExposedIterator (ei)
  27. //
  28. // Purpose: Iterator for wrapped DocFiles
  29. //
  30. // Interface: See below
  31. //
  32. // History: 12-Mar-92 DrewB Created
  33. //
  34. //---------------------------------------------------------------
  35. interface CExposedIterator
  36. : public IEnumSTATSTG, public PExposedIterator
  37. #ifdef ASYNC
  38. , public CAsyncConnectionContainer
  39. #endif
  40. {
  41. public:
  42. CExposedIterator(CPubDocFile *ppdf,
  43. CDfName *pdfnKey,
  44. CDFBasis *pdfb,
  45. CPerContext *ppc);
  46. ~CExposedIterator(void);
  47. // From IUnknown
  48. STDMETHOD(QueryInterface)(REFIID iid, void **ppvObj);
  49. STDMETHOD_(ULONG,AddRef)(void);
  50. STDMETHOD_(ULONG,Release)(void);
  51. // New methods
  52. STDMETHOD(Next)(ULONG celt, STATSTG FAR *rgelt, ULONG *pceltFetched);
  53. STDMETHOD(Skip)(ULONG celt);
  54. STDMETHOD(Reset)(void);
  55. STDMETHOD(Clone)(IEnumSTATSTG **ppenm);
  56. inline SCODE Validate(void) const;
  57. };
  58. SAFE_INTERFACE_PTR(SafeCExposedIterator, CExposedIterator);
  59. // DocFileIter signatures
  60. #define CEXPOSEDITER_SIG LONGSIG('E', 'D', 'F', 'I')
  61. #define CEXPOSEDITER_SIGDEL LONGSIG('E', 'd', 'F', 'i')
  62. //+--------------------------------------------------------------
  63. //
  64. // Member: CExposedIterator::Validate, public
  65. //
  66. // Synopsis: Validates the signature
  67. //
  68. // Returns: Returns STG_E_INVALIDHANDLE if the signature doesn't match
  69. //
  70. // History: 12-Mar-92 DrewB Created
  71. //
  72. //---------------------------------------------------------------
  73. inline SCODE CExposedIterator::Validate(void) const
  74. {
  75. return (this == NULL || _sig != CEXPOSEDITER_SIG) ? STG_E_INVALIDHANDLE :
  76. S_OK;
  77. }
  78. #endif