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.

61 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 DeleteFirstNode();
  30. void DeleteCurrentNode(LRecord *pThis);
  31. LRecord* FindCurrentNode(LPCTSTR lpUrl);
  32. void ReadTrackingPrefix();
  33. BOOL ConvertToPrefixedURL(LPCTSTR lpszUrl, LPTSTR *lplpPrefixedUrl);
  34. HRESULT WininetWorkAround(LPCTSTR lpszUrl, LPCTSTR lpOldFile, LPTSTR lpFile);
  35. void DetermineAppModule();
  36. private:
  37. DWORD _cRef;
  38. HANDLE _hFile; // handle to log file
  39. LRecord *_pRecords; // link list of tracked items
  40. LPTSTR _lpPfx;
  41. BOOL _fModule:1;
  42. BOOL _fScreenSaver:1;
  43. };
  44. #endif // TRACK_INC_