views:

69

answers:

1

I have been using CLogViewRecent and MLogViewChangeObserver to monitor call log on S60 5th edition phones.

MLogViewChangeObserver has three functions:

virtual void HandleLogViewChangeEventAddedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);
virtual void HandleLogViewChangeEventChangedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);
virtual void HandleLogViewChangeEventDeletedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);

However, only the first two get called regularly, while HandleLogViewChangeEventDeletedL gets called only sometimes.

E.g. HandleLogViewChangeEventDeletedL is not called when I choose "Clear List" from the menu in "Received calls" list in Call log application.

Can anyone point to the reason why this is happening, and how to correct this?

Thank you.

+2  A: 

Reading the Symbian^3 logcli source, "list cleared" is an event different from "event deleted". It's not reflected in the MLogViewChangeObserver callback mixin, only in MLogViewChangeObserverInternal as HandleLogViewChangeEventLogClearedL(). That's why it's happening. Sorry, cannot offer you a workaround, short of implementing your own logsrv client that handles ELogChangeTypeLogCleared change types the way you want.

Maybe you could describe what you are trying to achieve on the big picture level so it could be possible to offer other alternatives.

laalto
Thank you for point me to the source code. My application needs to be in sync with call log, so when call log gets deleted, my internal call list should be cleared too.
Bojan Milankovic