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.

63 lines
2.3 KiB

  1. /* Copyright 1996 Microsoft */
  2. #ifndef _ACLHIST_H_
  3. #define _ACLHIST_H_
  4. // Enum options
  5. enum
  6. {
  7. ACEO_ALTERNATEFORMS = ACEO_FIRSTUNUSED, // return alternate forms of the url
  8. };
  9. class CACLHistory
  10. : public IEnumACString
  11. {
  12. public:
  13. //////////////////////////////////////////////////////
  14. // Public Interfaces
  15. //////////////////////////////////////////////////////
  16. // *** IUnknown ***
  17. virtual STDMETHODIMP_(ULONG) AddRef(void);
  18. virtual STDMETHODIMP_(ULONG) Release(void);
  19. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  20. // *** IEnumString ***
  21. virtual STDMETHODIMP Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched);
  22. virtual STDMETHODIMP Skip(ULONG celt);
  23. virtual STDMETHODIMP Reset(void);
  24. virtual STDMETHODIMP Clone(IEnumString **ppenum);
  25. // *** IEnumACString ***
  26. virtual STDMETHODIMP NextItem(LPOLESTR pszUrl, ULONG cchMax, ULONG* pulSortIndex);
  27. virtual STDMETHODIMP SetEnumOptions(DWORD dwOptions);
  28. virtual STDMETHODIMP GetEnumOptions(DWORD *pdwOptions);
  29. protected:
  30. // Constructor / Destructor (protected so we can't create on stack)
  31. CACLHistory(void);
  32. ~CACLHistory(void);
  33. // Instance creator
  34. friend HRESULT CACLHistory_CreateInstance(IUnknown *punkOuter, IUnknown **ppunk, LPCOBJECTINFO poi);
  35. // Private variables
  36. DWORD _cRef; // COM reference count
  37. IUrlHistoryStg* _puhs; // URL History storage
  38. IEnumSTATURL* _pesu; // URL enumerator
  39. LPOLESTR _pwszAlternate; // Alternate string
  40. FILETIME _ftAlternate; // Last visited time for _pwszAlternate
  41. HDSA _hdsaAlternateData; // Contains alternate mappings
  42. DWORD _dwOptions; // Options flag
  43. // Private functions
  44. HRESULT _Next(LPOLESTR* ppsz, ULONG cch, FILETIME* pftLastVisited);
  45. void _CreateAlternateData(void);
  46. void _CreateAlternateItem(LPCTSTR pszUrl);
  47. void _SetAlternateItem(LPCTSTR pszUrl);
  48. void _AddAlternateDataItem(LPCTSTR pszProtocol, LPCTSTR pszDomain, BOOL fMoveSlashes);
  49. void _ReadAndSortHistory(void);
  50. static int _FreeAlternateDataItem(LPVOID p, LPVOID d);
  51. };
  52. #endif // _ACLHIST_H_