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.

104 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1990-1998, Microsoft Corporation All rights reserved.
  3. Module Name:
  4. tlog.h
  5. Abstract:
  6. This module implements the travel log functionality for file open
  7. and save as dialogs.
  8. Revision History:
  9. 02-20-98 arulk created
  10. --*/
  11. #ifndef _TLOG_H_
  12. #define _TLOG_H_
  13. #ifdef __cplusplus
  14. #include "comdlg32.h"
  15. #include <shellapi.h>
  16. #include <shlobj.h>
  17. #include <shsemip.h>
  18. #include <shellp.h>
  19. #include <commctrl.h>
  20. //
  21. // Defines for Travel Log.
  22. //
  23. #define TRAVEL_BACK 0x0001
  24. #define TRAVEL_FORWARD 0x0002
  25. //--------------------------------------------------------------------
  26. //Travel Log Link Class Definition
  27. //--------------------------------------------------------------------
  28. class TLogLink
  29. {
  30. public:
  31. TLogLink();
  32. TLogLink(LPITEMIDLIST pidl);
  33. ~TLogLink();
  34. UINT AddRef();
  35. UINT Release();
  36. TLogLink *GetNextLink() { return _ptllNext;};
  37. TLogLink *GetPrevLink() { return _ptllPrev;};
  38. void SetNextLink(TLogLink* ptllNext);
  39. HRESULT GetPidl(LPITEMIDLIST* ppidl);
  40. HRESULT SetPidl(LPITEMIDLIST pidl);
  41. BOOL CanTravel(int iDir);
  42. private:
  43. UINT _cRef;
  44. LPITEMIDLIST _pidl;
  45. TLogLink * _ptllPrev;
  46. TLogLink * _ptllNext;
  47. };
  48. //------------------------------------------------------------------------
  49. //Travel Log Class Definition
  50. //------------------------------------------------------------------------
  51. class TravelLog
  52. {
  53. public:
  54. friend HRESULT Create_TravelLog(TravelLog *pptlog);
  55. TravelLog();
  56. ~TravelLog();
  57. UINT AddRef();
  58. UINT Release();
  59. HRESULT AddEntry(LPITEMIDLIST pidl);
  60. BOOL CanTravel(int iDir);
  61. HRESULT Travel(int iDir);
  62. HRESULT GetCurrent(LPITEMIDLIST *ppidl);
  63. private:
  64. UINT _cRef;
  65. TLogLink *_ptllCurrent;
  66. TLogLink *_ptllRoot;
  67. };
  68. #endif //_cplusplus
  69. #ifdef _cplusplus
  70. extern "C" {
  71. #endif //_cplusplus
  72. HRESULT Create_TravelLog(TravelLog **pptlog);
  73. #ifdef _cplusplus
  74. extern "C"
  75. };
  76. #endif //_cplusplus
  77. #endif //_TLOG_H_