Requesting Log Engine Notifications

This tutorial describes how to request notification from Log Engine.


The Log Engine records events so that other applications can react to them in ways which are not part of its own specification. A typical reaction to an event might be refreshing the screen of the device or causing it to beep, but that is not Log Engine functionality. The Log Engine notifies other applications of a change to its database. It provides two interfaces which you implement to set up notification of changes:


  1. Implement MLogClientChangeObserver

    MLogClientChangeObserver concerns changes which are global to the database and it has a single member function to be implemented:
    1. Implement HandleLogClientChangeEventL of MLogClientChangeObserver

      Its arguments are:
      • TUid aChangeType the UID of the type of event which occurred

      • TInt aChangeParameter1

      • TInt aChangeParameter2

      • TInt aChangeParameter3

      The last three arguments are context-specific: their meaning is specific to the type of event that occurred.
  2. Implement MLogViewChangeObserver MLogViewChangeObserver concerns changes which are specific to a database view and it has three member functions to be implemented:
    1. HandleLogViewChangeEventAddedL
    2. HandleLogViewChangeEventChangedL
    3. HandleLogViewChangeEventDeletedL
    Each of them has the same arguments:
    1. TLogId aId
    2. TInt aViewIndex
    3. TInt aChangeIndex
    4. TInt aTotalChangeCount

Next actions

A change to a view typically occurs as part of a sequence of changes, and the position of the change event record in the view typically reflects this fact.

The argument aId is the Id of the log event in the database. The argument aViewIndex is the position in the view where the event record was added, changed or deleted. The argument aChangeIndex is the index of the event in the sequence of changes. The argument aTotalChangeCount is the total number of events in the sequence of changes

Related concepts

Related tasks