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.

118 lines
3.2 KiB

  1. #ifndef _ENUMERATORS_
  2. #define _ENUMERATORS_
  3. #include <cachenod.h>
  4. #include <array.hxx>
  5. // Class CStatData
  6. #define SDFLAG_OUTOFMEMORY 1
  7. class CStatData
  8. {
  9. public:
  10. // Public member functions
  11. CStatData(FORMATETC* foretc, DWORD dwAdvf, IAdviseSink* pAdvSink,
  12. DWORD dwConnID);
  13. ~CStatData();
  14. const CStatData& operator=(const CStatData& rStatData);
  15. // Public member variables
  16. unsigned long m_ulFlags;
  17. FORMATETC m_foretc;
  18. DWORD m_dwAdvf;
  19. IAdviseSink* m_pAdvSink;
  20. DWORD m_dwConnID;
  21. };
  22. // Class CEnumStatData
  23. #define CENUMSDFLAG_OUTOFMEMORY 1
  24. class CEnumStatData : public IEnumSTATDATA, public CPrivAlloc,
  25. public CThreadCheck
  26. {
  27. public:
  28. // Public constructor
  29. static LPENUMSTATDATA CreateEnumStatData(CArray<CCacheNode>* pCacheArray);
  30. // Public IUnknown methods
  31. STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR* ppv);
  32. STDMETHOD_(ULONG, AddRef)(void);
  33. STDMETHOD_(ULONG, Release)(void);
  34. // Public IEnumSTATDATA methods
  35. STDMETHOD(Next)(ULONG celt, STATDATA* rgelt, ULONG* pceltFetched);
  36. STDMETHOD(Skip)(ULONG celt);
  37. STDMETHOD(Reset)(void);
  38. STDMETHOD(Clone)(LPENUMSTATDATA* ppenum);
  39. private:
  40. // Private constructor
  41. CEnumStatData(CArray<CCacheNode>* pCacheArray);
  42. // Private copy constructor
  43. CEnumStatData(CEnumStatData& EnumStatData);
  44. // Private Destructor
  45. ~CEnumStatData();
  46. // Private member variables
  47. unsigned long m_ulFlags; // flags
  48. ULONG m_refs; // reference count
  49. ULONG m_index; // current index
  50. CArray<CStatData>* m_pSDArray; // internal array of statdata structures
  51. };
  52. // Class CFormatEtc
  53. #define FEFLAG_OUTOFMEMORY 1
  54. class CFormatEtc
  55. {
  56. public:
  57. // Public member functions
  58. CFormatEtc(FORMATETC* foretc);
  59. ~CFormatEtc();
  60. const CFormatEtc& operator=(const CFormatEtc& rFormatEtc);
  61. // Public member variables
  62. unsigned long m_ulFlags;
  63. FORMATETC m_foretc;
  64. };
  65. // Class CEnumFormatEtc
  66. #define CENUMFEFLAG_OUTOFMEMORY 1
  67. class CEnumFormatEtc : public IEnumFORMATETC, public CPrivAlloc,
  68. public CThreadCheck
  69. {
  70. public:
  71. // Public constructor
  72. static LPENUMFORMATETC CreateEnumFormatEtc(CArray<CCacheNode>* pCacheArray);
  73. // Public IUnknown methods
  74. STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppv);
  75. STDMETHOD_(ULONG, AddRef)(void);
  76. STDMETHOD_(ULONG, Release)(void);
  77. // Public IEnumFORMATETC methods
  78. STDMETHOD(Next)(ULONG celt, FORMATETC* rgelt, ULONG* pceltFetched);
  79. STDMETHOD(Skip)(ULONG celt);
  80. STDMETHOD(Reset)(void);
  81. STDMETHOD(Clone)(LPENUMFORMATETC* ppenum);
  82. private:
  83. // Private constructor
  84. CEnumFormatEtc(CArray<CCacheNode>* pCacheArray);
  85. // Private copy constructor
  86. CEnumFormatEtc(CEnumFormatEtc& EnumFormatEtc);
  87. // Private Destructor
  88. ~CEnumFormatEtc();
  89. // Private member variables
  90. unsigned long m_ulFlags; // flags
  91. ULONG m_refs; // reference count
  92. ULONG m_index; // current index
  93. CArray<CFormatEtc>* m_pFEArray; // internal array of FormatEtc structures
  94. };
  95. #endif // _ENUMERATORS_