ReactOS  0.4.14-dev-606-g14ebc0b
CTravelLog Class Reference
Inheritance diagram for CTravelLog:
Collaboration diagram for CTravelLog:

Public Member Functions

 CTravelLog ()
 
 ~CTravelLog ()
 
HRESULT Initialize ()
 
HRESULT FindRelativeEntry (int offset, CTravelEntry **foundEntry)
 
void DeleteChain (CTravelEntry *startHere)
 
void AppendEntry (CTravelEntry *afterEntry, CTravelEntry *newEntry)
 
virtual HRESULT STDMETHODCALLTYPE AddEntry (IUnknown *punk, BOOL fIsLocalAnchor)
 
virtual HRESULT STDMETHODCALLTYPE UpdateEntry (IUnknown *punk, BOOL fIsLocalAnchor)
 
virtual HRESULT STDMETHODCALLTYPE UpdateExternal (IUnknown *punk, IUnknown *punkHLBrowseContext)
 
virtual HRESULT STDMETHODCALLTYPE Travel (IUnknown *punk, int iOffset)
 
virtual HRESULT STDMETHODCALLTYPE GetTravelEntry (IUnknown *punk, int iOffset, ITravelEntry **ppte)
 
virtual HRESULT STDMETHODCALLTYPE FindTravelEntry (IUnknown *punk, LPCITEMIDLIST pidl, ITravelEntry **ppte)
 
virtual HRESULT STDMETHODCALLTYPE GetToolTipText (IUnknown *punk, int iOffset, int idsTemplate, LPWSTR pwzText, DWORD cchText)
 
virtual HRESULT STDMETHODCALLTYPE InsertMenuEntries (IUnknown *punk, HMENU hmenu, int nPos, int idFirst, int idLast, DWORD dwFlags)
 
virtual HRESULT STDMETHODCALLTYPE Clone (ITravelLog **pptl)
 
virtual DWORD STDMETHODCALLTYPE CountEntries (IUnknown *punk)
 
virtual HRESULT STDMETHODCALLTYPE Revert ()
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Attributes

CTravelEntryfListHead
 
CTravelEntryfListTail
 
CTravelEntryfCurrentEntry
 
long fMaximumSize
 
long fCurrentSize
 
unsigned long fEntryCount
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 72 of file travellog.cpp.

Constructor & Destructor Documentation

◆ CTravelLog()

CTravelLog::CTravelLog ( )

Definition at line 220 of file travellog.cpp.

221 {
222  fListHead = NULL;
223  fListTail = NULL;
225  fMaximumSize = 0;
226  fCurrentSize = 0;
227  fEntryCount = 0;
228  TRACE("CTravelLog created\n");
229 }
long fMaximumSize
Definition: travellog.cpp:80
unsigned long fEntryCount
Definition: travellog.cpp:82
CTravelEntry * fListTail
Definition: travellog.cpp:78
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
CTravelEntry * fCurrentEntry
Definition: travellog.cpp:79
long fCurrentSize
Definition: travellog.cpp:81
CTravelEntry * fListHead
Definition: travellog.cpp:77

◆ ~CTravelLog()

CTravelLog::~CTravelLog ( )

Definition at line 231 of file travellog.cpp.

232 {
233  CTravelEntry *anEntry;
235 
236  anEntry = fListHead;
237  while (anEntry != NULL)
238  {
239  next = anEntry->fNextEntry;
240  anEntry->Release();
241  anEntry = next;
242  }
243  TRACE("CTravelLog destroyed\n");
244 }
CTravelEntry * fNextEntry
Definition: travellog.cpp:51
ULONG Release()
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static unsigned __int64 next
Definition: rand_nt.c:6
CTravelEntry * fListHead
Definition: travellog.cpp:77

Member Function Documentation

◆ AddEntry()

HRESULT STDMETHODCALLTYPE CTravelLog::AddEntry ( IUnknown punk,
BOOL  fIsLocalAnchor 
)
virtual

Implements ITravelLog.

Definition at line 344 of file travellog.cpp.

345 {
346  CComObject<CTravelEntry> *newEntry;
347  long itemSize;
348 
349  TRACE("CTravelLog::AddEntry for IUnknown punk=%p, fIsLocalAnchor=%s\n", punk, fIsLocalAnchor ? "TRUE" : "FALSE");
350 
351  if (punk == NULL)
352  return E_INVALIDARG;
353  ATLTRY (newEntry = new CComObject<CTravelEntry>);
354  if (newEntry == NULL)
355  return E_OUTOFMEMORY;
356  newEntry->AddRef();
359  AppendEntry(fCurrentEntry, newEntry);
360  itemSize = newEntry->GetSize();
361  fCurrentSize += itemSize;
362  fCurrentEntry = newEntry;
363  return S_OK;
364 }
#define ATLTRY(x)
Definition: atlcomcli.h:44
void DeleteChain(CTravelEntry *startHere)
Definition: travellog.cpp:290
CTravelEntry * fNextEntry
Definition: travellog.cpp:51
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
CTravelEntry * fCurrentEntry
Definition: travellog.cpp:79
long fCurrentSize
Definition: travellog.cpp:81
#define S_OK
Definition: intsafe.h:59
void AppendEntry(CTravelEntry *afterEntry, CTravelEntry *newEntry)
Definition: travellog.cpp:322

◆ AppendEntry()

void CTravelLog::AppendEntry ( CTravelEntry afterEntry,
CTravelEntry newEntry 
)

Definition at line 322 of file travellog.cpp.

323 {
324  if (afterEntry == NULL)
325  {
326  TRACE("CTravelLog::AppendEntry appending %p after NULL. Resetting head and tail\n", newEntry);
327  fListHead = newEntry;
328  fListTail = newEntry;
329  }
330  else
331  {
332  TRACE("CTravelLog::AppendEntry appending %p after %p\n", newEntry, afterEntry);
333  newEntry->fNextEntry = afterEntry->fNextEntry;
334  afterEntry->fNextEntry = newEntry;
335  newEntry->fPreviousEntry = afterEntry;
336  if (newEntry->fNextEntry == NULL)
337  fListTail = newEntry;
338  else
339  newEntry->fNextEntry->fPreviousEntry = newEntry;
340  }
341  fEntryCount++;
342 }
CTravelEntry * fNextEntry
Definition: travellog.cpp:51
unsigned long fEntryCount
Definition: travellog.cpp:82
CTravelEntry * fListTail
Definition: travellog.cpp:78
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
CTravelEntry * fPreviousEntry
Definition: travellog.cpp:52
CTravelEntry * fListHead
Definition: travellog.cpp:77

Referenced by AddEntry().

◆ Clone()

HRESULT STDMETHODCALLTYPE CTravelLog::Clone ( ITravelLog **  pptl)
virtual

Implements ITravelLog.

Definition at line 602 of file travellog.cpp.

603 {
604  if (pptl == NULL)
605  return E_POINTER;
606  *pptl = NULL;
607  // duplicate the log
609  return E_NOTIMPL;
610 }
_In_ POINTL * pptl
Definition: winddi.h:3741
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114
#define E_POINTER
Definition: winerror.h:2365

◆ CountEntries()

DWORD STDMETHODCALLTYPE CTravelLog::CountEntries ( IUnknown punk)
virtual

Implements ITravelLog.

Definition at line 612 of file travellog.cpp.

613 {
614  if (punk == NULL)
615  return E_INVALIDARG;
616  return fEntryCount;
617 }
unsigned long fEntryCount
Definition: travellog.cpp:82
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416

◆ DeleteChain()

void CTravelLog::DeleteChain ( CTravelEntry startHere)

Definition at line 290 of file travellog.cpp.

291 {
292  CTravelEntry *saveNext;
293  long itemSize;
294 
295  TRACE("CTravelLog::DeleteChain deleting chain starting at %p\n", startHere);
296 
297  long startEntryCount = fEntryCount;
298 
299  if (startHere->fPreviousEntry != NULL)
300  {
301  startHere->fPreviousEntry->fNextEntry = NULL;
302  fListTail = startHere->fPreviousEntry;
303  }
304  else
305  {
306  fListHead = NULL;
307  fListTail = NULL;
308  }
309  while (startHere != NULL)
310  {
311  saveNext = startHere->fNextEntry;
312  itemSize = startHere->GetSize();
313  fCurrentSize -= itemSize;
314  startHere->Release();
315  startHere = saveNext;
316  fEntryCount--;
317  }
318 
319  TRACE("CTravelLog::DeleteChain chain of %d items deleted\n", startEntryCount - fEntryCount);
320 }
long GetSize() const
Definition: travellog.cpp:135
CTravelEntry * fNextEntry
Definition: travellog.cpp:51
unsigned long fEntryCount
Definition: travellog.cpp:82
CTravelEntry * fListTail
Definition: travellog.cpp:78
ULONG Release()
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
CTravelEntry * fPreviousEntry
Definition: travellog.cpp:52
long fCurrentSize
Definition: travellog.cpp:81
CTravelEntry * fListHead
Definition: travellog.cpp:77

Referenced by AddEntry().

◆ FindRelativeEntry()

HRESULT CTravelLog::FindRelativeEntry ( int  offset,
CTravelEntry **  foundEntry 
)

Definition at line 254 of file travellog.cpp.

255 {
256  CTravelEntry *curEntry;
257  int offset = _offset;
258 
259  if (foundEntry == NULL)
260  return E_INVALIDARG;
261 
262  *foundEntry = NULL;
263  curEntry = fCurrentEntry;
264  if (offset < 0)
265  {
266  while (offset < 0 && curEntry != NULL)
267  {
268  curEntry = curEntry->fPreviousEntry;
269  offset++;
270  }
271  }
272  else
273  {
274  while (offset > 0 && curEntry != NULL)
275  {
276  curEntry = curEntry->fNextEntry;
277  offset--;
278  }
279  }
280  if (curEntry == NULL)
281  return E_INVALIDARG;
282 
283  *foundEntry = curEntry;
284 
285  TRACE("CTravelLog::FindRelativeEntry for offset %d, returning %p\n", offset, *foundEntry);
286 
287  return S_OK;
288 }
GLintptr offset
Definition: glext.h:5920
CTravelEntry * fNextEntry
Definition: travellog.cpp:51
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
CTravelEntry * fPreviousEntry
Definition: travellog.cpp:52
CTravelEntry * fCurrentEntry
Definition: travellog.cpp:79
#define S_OK
Definition: intsafe.h:59

Referenced by GetToolTipText(), GetTravelEntry(), and Travel().

◆ FindTravelEntry()

HRESULT STDMETHODCALLTYPE CTravelLog::FindTravelEntry ( IUnknown punk,
LPCITEMIDLIST  pidl,
ITravelEntry **  ppte 
)
virtual

Implements ITravelLog.

Definition at line 414 of file travellog.cpp.

415 {
416  if (ppte == NULL)
417  return E_POINTER;
418  if (punk == NULL || pidl == NULL)
419  return E_INVALIDARG;
420 
422 
423  return E_NOTIMPL;
424 }
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114
#define E_POINTER
Definition: winerror.h:2365

◆ GetToolTipText()

HRESULT STDMETHODCALLTYPE CTravelLog::GetToolTipText ( IUnknown punk,
int  iOffset,
int  idsTemplate,
LPWSTR  pwzText,
DWORD  cchText 
)
virtual

Implements ITravelLog.

Definition at line 426 of file travellog.cpp.

427 {
428  CTravelEntry *destinationEntry;
429  wchar_t tempString[MAX_PATH];
430  wchar_t templateString[200];
431  HRESULT hResult;
432 
433  if (pwzText == NULL)
434  return E_POINTER;
435  if (punk == NULL || cchText == 0)
436  return E_INVALIDARG;
437  hResult = FindRelativeEntry(iOffset, &destinationEntry);
438  if (FAILED_UNEXPECTEDLY(hResult))
439  return hResult;
440  hResult = destinationEntry->GetToolTipText(punk, tempString);
441  if (FAILED_UNEXPECTEDLY(hResult))
442  return hResult;
443  if (iOffset < 0)
444  {
445  if(LoadStringW(_AtlBaseModule.GetResourceInstance(),
446  IDS_BACK, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
448  }
449  else
450  {
451  if(LoadStringW(_AtlBaseModule.GetResourceInstance(),
452  IDS_FORWARD, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
454  }
455  _snwprintf(pwzText, cchText, templateString, tempString);
456 
457  TRACE("CTravelLog::GetToolTipText for IUnknown punk=%p at offset=%d returning L\"%S\"\n", punk, iOffset, pwzText);
458 
459  return S_OK;
460 }
HRESULT FindRelativeEntry(int offset, CTravelEntry **foundEntry)
Definition: travellog.cpp:254
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define IDS_BACK
Definition: resource.h:127
#define E_INVALIDARG
Definition: ddrawi.h:101
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
smooth NULL
Definition: ftsmooth.c:416
_In_ int cchText
Definition: winuser.h:4440
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define MAX_PATH
Definition: compat.h:26
HRESULT GetToolTipText(IUnknown *punk, LPWSTR pwzText) const
Definition: travellog.cpp:124
#define S_OK
Definition: intsafe.h:59
#define IDS_FORWARD
Definition: resource.h:128
#define E_POINTER
Definition: winerror.h:2365

◆ GetTravelEntry()

HRESULT STDMETHODCALLTYPE CTravelLog::GetTravelEntry ( IUnknown punk,
int  iOffset,
ITravelEntry **  ppte 
)
virtual

Implements ITravelLog.

Definition at line 397 of file travellog.cpp.

398 {
399  CTravelEntry *destinationEntry;
400  HRESULT hResult;
401 
402  hResult = FindRelativeEntry(iOffset, &destinationEntry);
403  if (FAILED(hResult))
404  return hResult;
405  hResult = destinationEntry->QueryInterface(IID_PPV_ARG(ITravelEntry, ppte));
406  if (FAILED_UNEXPECTEDLY(hResult))
407  return hResult;
408 
409  TRACE("CTravelLog::GetTravelEntry for IUnknown punk=%p at offset=%d returning %p\n", punk, iOffset, *ppte);
410 
411  return hResult;
412 }
HRESULT FindRelativeEntry(int offset, CTravelEntry **foundEntry)
Definition: travellog.cpp:254
#define IID_PPV_ARG(Itype, ppType)
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)

◆ Initialize()

HRESULT CTravelLog::Initialize ( )

Definition at line 246 of file travellog.cpp.

247 {
248  fMaximumSize = 1024 * 1024; // TODO: change to read this from registry
249  // Software\Microsoft\Windows\CurrentVersion\Explorer\TravelLog
250  // MaxSize
251  return S_OK;
252 }
long fMaximumSize
Definition: travellog.cpp:80
#define S_OK
Definition: intsafe.h:59

◆ InsertMenuEntries()

HRESULT STDMETHODCALLTYPE CTravelLog::InsertMenuEntries ( IUnknown punk,
HMENU  hmenu,
int  nPos,
int  idFirst,
int  idLast,
DWORD  dwFlags 
)
virtual

Implements ITravelLog.

Definition at line 482 of file travellog.cpp.

484 {
485  CTravelEntry *currentItem;
486  MENUITEMINFO menuItemInfo;
487  wchar_t itemTextBuffer[MAX_PATH * 2];
488  HRESULT hResult;
489 
490  TRACE("CTravelLog::InsertMenuEntries for IUnknown punk=%p, nPos=%d, idFirst=%d, idLast=%d\n", punk);
491 
492  // TLMENUF_BACK - include back entries
493  // TLMENUF_INCLUDECURRENT - include current entry, if TLMENUF_CHECKCURRENT then check the entry
494  // TLMENUF_FORE - include next entries
495  // if fore+back, list from oldest to newest
496  // if back, list from newest to oldest
497  // if fore, list from newest to oldest
498 
499  // don't forget to patch ampersands before adding to menu
500  if (punk == NULL)
501  return E_INVALIDARG;
502  if (idLast <= idFirst)
503  return E_INVALIDARG;
504  menuItemInfo.cbSize = sizeof(menuItemInfo);
505  menuItemInfo.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STATE | MIIM_STRING;
506  menuItemInfo.fType = MFT_STRING;
507  menuItemInfo.wID = idFirst;
508  menuItemInfo.fState = MFS_ENABLED;
509  menuItemInfo.dwTypeData = itemTextBuffer;
510  if ((dwFlags & TLMENUF_BACK) != 0)
511  {
512  if ((dwFlags & TLMENUF_FORE) != 0)
513  {
514  currentItem = fCurrentEntry;
515  if (currentItem != NULL)
516  {
517  while (currentItem->fPreviousEntry != NULL)
518  currentItem = currentItem->fPreviousEntry;
519  }
520  while (currentItem != fCurrentEntry)
521  {
522  hResult = currentItem->GetToolTipText(punk, itemTextBuffer);
523  if (SUCCEEDED(hResult))
524  {
525  FixAmpersands(itemTextBuffer);
526  TRACE("CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.dwTypeData, menuItemInfo.wID);
527  if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
528  {
529  nPos++;
530  menuItemInfo.wID++;
531  }
532  }
533  currentItem = currentItem->fNextEntry;
534  }
535  }
536  else
537  {
538  currentItem = fCurrentEntry;
539  if (currentItem != NULL)
540  currentItem = currentItem->fPreviousEntry;
541  while (currentItem != NULL)
542  {
543  hResult = currentItem->GetToolTipText(punk, itemTextBuffer);
544  if (SUCCEEDED(hResult))
545  {
546  FixAmpersands(itemTextBuffer);
547  TRACE("CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.dwTypeData, menuItemInfo.wID);
548  if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
549  {
550  nPos++;
551  menuItemInfo.wID++;
552  }
553  }
554  currentItem = currentItem->fPreviousEntry;
555  }
556  }
557  }
558  if ((dwFlags & TLMENUF_INCLUDECURRENT) != 0)
559  {
560  if (fCurrentEntry != NULL)
561  {
562  hResult = fCurrentEntry->GetToolTipText(punk, itemTextBuffer);
563  if (SUCCEEDED(hResult))
564  {
565  FixAmpersands(itemTextBuffer);
566  if ((dwFlags & TLMENUF_CHECKCURRENT) != 0)
567  menuItemInfo.fState |= MFS_CHECKED;
568  TRACE("CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.dwTypeData, menuItemInfo.wID);
569  if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
570  {
571  nPos++;
572  menuItemInfo.wID++;
573  }
574  menuItemInfo.fState &= ~MFS_CHECKED;
575  }
576  }
577  }
578  if ((dwFlags & TLMENUF_FORE) != 0)
579  {
580  currentItem = fCurrentEntry;
581  if (currentItem != NULL)
582  currentItem = currentItem->fNextEntry;
583  while (currentItem != NULL)
584  {
585  hResult = currentItem->GetToolTipText(punk, itemTextBuffer);
586  if (SUCCEEDED(hResult))
587  {
588  FixAmpersands(itemTextBuffer);
589  TRACE("CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.dwTypeData, menuItemInfo.wID);
590  if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
591  {
592  nPos++;
593  menuItemInfo.wID++;
594  }
595  }
596  currentItem = currentItem->fNextEntry;
597  }
598  }
599  return S_OK;
600 }
#define MFT_STRING
Definition: winuser.h:741
#define MIIM_FTYPE
Definition: winuser.h:724
#define TRUE
Definition: types.h:120
static HMENU hmenu
Definition: win.c:66
CTravelEntry * fNextEntry
Definition: travellog.cpp:51
#define TLMENUF_INCLUDECURRENT
Definition: shlobj.h:2509
#define MFS_ENABLED
Definition: winuser.h:745
#define MIIM_STATE
Definition: winuser.h:716
static void FixAmpersands(wchar_t *buffer)
Definition: travellog.cpp:462
#define TLMENUF_CHECKCURRENT
Definition: shlobj.h:2510
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define MIIM_ID
Definition: winuser.h:717
#define TLMENUF_BACK
Definition: shlobj.h:2511
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
CTravelEntry * fPreviousEntry
Definition: travellog.cpp:52
#define MAX_PATH
Definition: compat.h:26
CTravelEntry * fCurrentEntry
Definition: travellog.cpp:79
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HRESULT GetToolTipText(IUnknown *punk, LPWSTR pwzText) const
Definition: travellog.cpp:124
#define MIIM_STRING
Definition: winuser.h:722
#define S_OK
Definition: intsafe.h:59
#define MFS_CHECKED
Definition: winuser.h:742
#define TLMENUF_FORE
Definition: shlobj.h:2512
LPSTR dwTypeData
Definition: winuser.h:3226
#define InsertMenuItem
Definition: winuser.h:5779
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ Revert()

HRESULT STDMETHODCALLTYPE CTravelLog::Revert ( )
virtual

Implements ITravelLog.

Definition at line 619 of file travellog.cpp.

620 {
621  // remove the current entry?
623  return E_NOTIMPL;
624 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114

◆ Travel()

HRESULT STDMETHODCALLTYPE CTravelLog::Travel ( IUnknown punk,
int  iOffset 
)
virtual

Implements ITravelLog.

Definition at line 380 of file travellog.cpp.

381 {
382  CTravelEntry *destinationEntry;
383  HRESULT hResult;
384 
385  TRACE("CTravelLog::Travel for IUnknown punk=%p at offset=%d\n", punk, iOffset);
386 
387  hResult = FindRelativeEntry(iOffset, &destinationEntry);
388  if (FAILED_UNEXPECTEDLY(hResult))
389  return hResult;
390  fCurrentEntry = destinationEntry;
391  hResult = destinationEntry->Invoke(punk);
392  if (FAILED_UNEXPECTEDLY(hResult))
393  return hResult;
394  return S_OK;
395 }
HRESULT FindRelativeEntry(int offset, CTravelEntry **foundEntry)
Definition: travellog.cpp:254
virtual HRESULT STDMETHODCALLTYPE Invoke(IUnknown *punk)
Definition: travellog.cpp:140
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CTravelEntry * fCurrentEntry
Definition: travellog.cpp:79
#define S_OK
Definition: intsafe.h:59

◆ UpdateEntry()

HRESULT STDMETHODCALLTYPE CTravelLog::UpdateEntry ( IUnknown punk,
BOOL  fIsLocalAnchor 
)
virtual

Implements ITravelLog.

Definition at line 366 of file travellog.cpp.

367 {
368  if (punk == NULL)
369  return E_INVALIDARG;
370  if (fCurrentEntry == NULL)
371  return E_UNEXPECTED;
372  return fCurrentEntry->Update(punk, fIsLocalAnchor);
373 }
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
CTravelEntry * fCurrentEntry
Definition: travellog.cpp:79
#define E_UNEXPECTED
Definition: winerror.h:2456
virtual HRESULT STDMETHODCALLTYPE Update(IUnknown *punk, BOOL fIsLocalAnchor)
Definition: travellog.cpp:160

◆ UpdateExternal()

HRESULT STDMETHODCALLTYPE CTravelLog::UpdateExternal ( IUnknown punk,
IUnknown punkHLBrowseContext 
)
virtual

Implements ITravelLog.

Definition at line 375 of file travellog.cpp.

376 {
377  return E_NOTIMPL;
378 }
#define E_NOTIMPL
Definition: ddrawi.h:99

Member Data Documentation

◆ fCurrentEntry

CTravelEntry* CTravelLog::fCurrentEntry
private

◆ fCurrentSize

long CTravelLog::fCurrentSize
private

Definition at line 81 of file travellog.cpp.

Referenced by AddEntry(), CTravelLog(), and DeleteChain().

◆ fEntryCount

unsigned long CTravelLog::fEntryCount
private

Definition at line 82 of file travellog.cpp.

Referenced by AppendEntry(), CountEntries(), CTravelLog(), and DeleteChain().

◆ fListHead

CTravelEntry* CTravelLog::fListHead
private

Definition at line 77 of file travellog.cpp.

Referenced by AppendEntry(), CTravelLog(), DeleteChain(), and ~CTravelLog().

◆ fListTail

CTravelEntry* CTravelLog::fListTail
private

Definition at line 78 of file travellog.cpp.

Referenced by AppendEntry(), CTravelLog(), and DeleteChain().

◆ fMaximumSize

long CTravelLog::fMaximumSize
private

Definition at line 80 of file travellog.cpp.

Referenced by CTravelLog(), and Initialize().


The documentation for this class was generated from the following file: