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.

78 lines
3.2 KiB

  1. /*****************************************************************************
  2. * ftpeidl.h
  3. *****************************************************************************/
  4. #ifndef _FTPEIDL_H
  5. #define _FTPEIDL_H
  6. #include "cowsite.h"
  7. /*****************************************************************************
  8. *
  9. * CFtpEidl
  10. *
  11. * The stuff that tracks the state of an enumeration.
  12. *
  13. *****************************************************************************/
  14. class CFtpEidl : public IEnumIDList
  15. , public CObjectWithSite
  16. {
  17. public:
  18. //////////////////////////////////////////////////////
  19. // Public Interfaces
  20. //////////////////////////////////////////////////////
  21. // *** IUnknown ***
  22. virtual STDMETHODIMP_(ULONG) AddRef(void);
  23. virtual STDMETHODIMP_(ULONG) Release(void);
  24. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  25. // *** IEnumIDList ***
  26. virtual STDMETHODIMP Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched);
  27. virtual STDMETHODIMP Skip(ULONG celt);
  28. virtual STDMETHODIMP Reset(void);
  29. virtual STDMETHODIMP Clone(IEnumIDList **ppenum);
  30. public:
  31. CFtpEidl();
  32. ~CFtpEidl(void);
  33. // Friend Functions
  34. friend HRESULT CFtpEidl_Create(CFtpDir * pfd, CFtpFolder * pff, HWND hwndOwner, DWORD shcontf, IEnumIDList ** ppenum);
  35. protected:
  36. // Private Member Variables
  37. int m_cRef;
  38. BITBOOL m_fInited : 1; // Have we been inited?
  39. BITBOOL m_fDead : 1; // Is this enumerator dead because we had to do a redirect (because password was needed or was invalid).
  40. BITBOOL m_fErrorDisplayed : 1; // Only show one error per enum. This is how we keep track.
  41. DWORD m_nIndex; // Current Item in the list
  42. DWORD m_shcontf; // Filter flags
  43. CFtpPidlList * m_pflHfpl; // Where the cache lives
  44. CFtpDir * m_pfd; // My FtpDir
  45. CFtpFolder * m_pff; // My FtpDir
  46. IMalloc * m_pm; // Today's itemid allocator
  47. HWND m_hwndOwner; // My UI window
  48. // CAN DO: Someday we could implement hiden files: int m_cHiddenFiles;
  49. // Public Member Functions
  50. BOOL _fFilter(DWORD shcontf, DWORD dwFAFLFlags);
  51. HRESULT _Init(void);
  52. LPITEMIDLIST _NextOne(DWORD * pdwIndex);
  53. HRESULT _PopulateItem(HINTERNET hint0, HINTPROCINFO * phpi);
  54. HRESULT _AddFindDataToPidlList(LPCITEMIDLIST pidl);
  55. HRESULT _HandleSoftLinks(HINTERNET hint, LPITEMIDLIST pidl, LPWIRESTR pwCurrentDir, DWORD cchSize);
  56. BOOL _IsNavigationItem(LPWIN32_FIND_DATA pwfd);
  57. static HRESULT _PopulateItemCB(HINTERNET hint0, HINTPROCINFO * phpi, LPVOID pvCFtpEidl, BOOL * pfReleaseHint) {return ((CFtpEidl *)pvCFtpEidl)->_PopulateItem(hint0, phpi);};
  58. // Friend Functions
  59. friend HRESULT CFtpEidl_Create(CFtpDir * pfd, CFtpFolder * pff, HWND hwndOwner, DWORD shcontf, CFtpEidl ** ppfe);
  60. friend HRESULT CFtpEidl_Create(CFtpDir * pfd, CFtpFolder * pff, HWND hwndOwner, DWORD shcontf, DWORD dwIndex, IEnumIDList ** ppenum);
  61. };
  62. #endif // _FTPEIDL_H