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.

63 lines
1.8 KiB

  1. #ifndef TRACK_INC_
  2. #define TRACK_INC_
  3. #include "urltrack.h"
  4. typedef struct _LRecord
  5. {
  6. struct _LRecord *pNext;
  7. LPTSTR pthisUrl; // URL name of this document
  8. DWORD Context; // browsing from
  9. BOOL fuseCache;
  10. FILETIME ftIn;
  11. }LRecord;
  12. class CUrlTrackingStg : public IUrlTrackingStg
  13. {
  14. public:
  15. CUrlTrackingStg ();
  16. ~CUrlTrackingStg (void);
  17. // IUnknown methods
  18. virtual STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppvObj);
  19. virtual STDMETHODIMP_(ULONG) AddRef(void);
  20. virtual STDMETHODIMP_(ULONG) Release(void);
  21. // IUrlTrackingStg methods
  22. STDMETHODIMP OnLoad(LPCTSTR lpUrl, BRMODE ContextMode, BOOL fUseCache);
  23. STDMETHODIMP OnUnload(LPCTSTR lpUrl);
  24. protected:
  25. LPINTERNET_CACHE_ENTRY_INFO QueryCacheEntry (LPCTSTR lpUrl);
  26. HANDLE OpenLogFile (LPCTSTR lpFileName);
  27. HRESULT UpdateLogFile(LRecord* pNode, SYSTEMTIME* pst);
  28. LRecord* AddNode();
  29. void DeleteAllNode();
  30. void DeleteFirstNode();
  31. void DeleteCurrentNode(LRecord *pThis);
  32. LRecord* FindCurrentNode(LPCTSTR lpUrl);
  33. void cleanup();
  34. void ReadTrackingPrefix();
  35. BOOL ConvertToPrefixedURL(LPCTSTR lpszUrl, LPTSTR *lplpPrefixedUrl);
  36. HRESULT WininetWorkAround(LPCTSTR lpszUrl, LPCTSTR lpOldFile, LPTSTR lpFile);
  37. void DetermineAppModule();
  38. private:
  39. DWORD _cRef;
  40. HANDLE _hFile; // handle to log file
  41. LRecord *_pRecords; // link list of tracked items
  42. LPTSTR _lpPfx;
  43. BOOL _fModule:1;
  44. BOOL _fScreenSaver:1;
  45. };
  46. #endif // TRACK_INC_