Source code of Windows XP (NT5)
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.

73 lines
1.5 KiB

  1. //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  2. //
  3. // enum.h
  4. //
  5. // The definition of the cdf enumerator.
  6. //
  7. // History:
  8. //
  9. // 3/17/97 edwardp Created.
  10. //
  11. ////////////////////////////////////////////////////////////////////////////////
  12. //
  13. // Check for previous includes of this file.
  14. //
  15. #ifndef _ENUM_H_
  16. #define _ENUM_H_
  17. //
  18. // Class definition for the cdf enumerator class.
  19. //
  20. class CCdfEnum : public IEnumIDList
  21. {
  22. //
  23. // Methods
  24. //
  25. public:
  26. // Constructor
  27. CCdfEnum(IXMLElementCollection* pIXMLElementCollection,
  28. DWORD fEnumerateFlags, PCDFITEMIDLIST pcdfidlFolder);
  29. // IUnknown
  30. STDMETHODIMP QueryInterface(REFIID, void **);
  31. STDMETHODIMP_(ULONG) AddRef(void);
  32. STDMETHODIMP_(ULONG) Release(void);
  33. // IEnumIDList
  34. STDMETHODIMP Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched);
  35. STDMETHODIMP Skip(ULONG celt);
  36. STDMETHODIMP Reset(void);
  37. STDMETHODIMP Clone(IEnumIDList **ppenum);
  38. private:
  39. // Destructor
  40. ~CCdfEnum(void);
  41. // Helper methods
  42. LPITEMIDLIST NextCdfidl(void);
  43. HRESULT GetNextCdfElement(IXMLElement** ppIXMLElement,PULONG pnIndex);
  44. inline BOOL IsCorrectType(IXMLElement* pIXMLElement);
  45. //
  46. // Member variables.
  47. //
  48. private:
  49. ULONG m_cRef;
  50. IXMLElementCollection* m_pIXMLElementCollection;
  51. DWORD m_fEnumerate;
  52. ULONG m_nCurrentItem;
  53. PCDFITEMIDLIST m_pcdfidlFolder;
  54. BOOL m_fReturnedFolderPidl;
  55. };
  56. #endif _ENUM_H_