Symbian3/SDK/Source/GUID-BE65B3A7-04E8-5406-B46A-09E2608E0F1F.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 7 51a74ef9ed63
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-BE65B3A7-04E8-5406-B46A-09E2608E0F1F" xml:lang="en"><title>Requesting
Log Engine Notifications </title><shortdesc>This tutorial describes how to request notification from Log Engine. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context id="GUID-026E70FC-4181-56D2-810A-F9D70BE9A2E7"><p>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: </p> <ul>
<li id="GUID-7CE07F32-E2D1-5E2B-A491-4B3DC5CC5F31"><p> <xref href="GUID-37519930-C95E-3FF1-A32D-D42D0A9E710F.dita"><apiname>MLogClientChangeObserver</apiname></xref>  </p> </li>
<li id="GUID-5D5CFA78-7B04-56CD-B919-D0703F1696EF"><p> <xref href="GUID-7DE036FC-7ECE-38FE-8BC0-7B0CA2B3B195.dita"><apiname>MLogViewChangeObserver</apiname></xref>  </p> </li>
</ul> </context>
<steps id="GUID-5E3B8D4C-C912-5E74-8744-44FE6427754F">
<step id="GUID-81E579ED-7379-5ED9-AAD8-F49A0AE50F06"><cmd>Implement <xref href="GUID-37519930-C95E-3FF1-A32D-D42D0A9E710F.dita"><apiname>MLogClientChangeObserver</apiname></xref>  </cmd>
<info> <xref href="GUID-37519930-C95E-3FF1-A32D-D42D0A9E710F.dita"><apiname>MLogClientChangeObserver</apiname></xref> concerns changes which
are global to the database and it has a single member function to be implemented: </info>
<substeps id="GUID-E55DB2B7-A71E-4EB6-8A69-4F4BB5EABE9B">
<substep id="GUID-E509EE1B-92F6-4C45-BFC6-8370BA3FE4AA"><cmd>Implement <xref href="GUID-539F45CB-1182-38EE-A15C-BCD9093AC24F.dita"><apiname>HandleLogClientChangeEventL</apiname></xref> of <xref href="GUID-37519930-C95E-3FF1-A32D-D42D0A9E710F.dita"><apiname>MLogClientChangeObserver</apiname></xref></cmd>
<info>Its arguments are: </info>
<info><ul>
<li id="GUID-393080A5-BAF1-5461-AF2A-46F413C56383"><p> <xref href="GUID-530281E6-29FC-33F2-BC9B-610FBA389444.dita"><apiname>TUid</apiname></xref> aChangeType
the UID of the type of event which occurred </p> </li>
<li id="GUID-73B0B616-C029-52EF-AF31-53996B639051"><p> <xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> aChangeParameter1 </p> </li>
<li id="GUID-34CF35D8-6078-587B-A8C1-00337F5C3C31"><p> <xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> aChangeParameter2 </p> </li>
<li id="GUID-800AC30F-DF6F-55CF-9455-D49C25F253D0"><p> <xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> aChangeParameter3 </p> </li>
</ul></info>
<info>The last three arguments are context-specific: their meaning is specific
to the type of event that occurred. </info>
</substep>
</substeps>
</step>
<step id="GUID-75C55B15-FA43-5E6D-9967-6B6086BCA32B"><cmd/>
<info>Implement <xref href="GUID-7DE036FC-7ECE-38FE-8BC0-7B0CA2B3B195.dita"><apiname>MLogViewChangeObserver</apiname></xref>  </info>
<info> <xref href="GUID-7DE036FC-7ECE-38FE-8BC0-7B0CA2B3B195.dita"><apiname>MLogViewChangeObserver</apiname></xref> concerns changes which are
specific to a database view and it has three member functions to be implemented: </info>
<substeps id="GUID-5645F222-5B4C-4B28-8AC2-F28256821883">
<substep id="GUID-DB5501DF-E345-426E-B13D-5B3CEF840A28"><cmd/>
<info><xref href="GUID-A41FB471-60EC-3786-8CCC-BD35048ED38A.dita"><apiname>HandleLogViewChangeEventAddedL</apiname></xref></info>
</substep>
<substep id="GUID-D68B3B48-8D28-4086-B5FE-B22D622A741C"><cmd/>
<info><xref href="GUID-D799F87B-C0CE-3129-A526-A3B06469B328.dita"><apiname>HandleLogViewChangeEventChangedL</apiname></xref></info>
</substep>
<substep id="GUID-0698E95C-F370-49B5-B43E-176BF5C5F713"><cmd/>
<info><xref href="GUID-6C1A90CC-BA78-3B37-A39C-DC6D1F714654.dita"><apiname>HandleLogViewChangeEventDeletedL</apiname></xref></info>
</substep>
</substeps>
<info>Each of them has the same arguments: </info>
<substeps id="GUID-368850E6-5B7F-4ADB-99ED-F1843BE1340C">
<substep id="GUID-649209D5-146A-445B-B7FF-E67F061148B8"><cmd/>
<info><xref href="GUID-271367A8-DD4F-3A82-AD88-F3E94F2AA980.dita"><apiname>TLogId</apiname></xref> aId </info>
</substep>
<substep id="GUID-982974D3-2D00-40EB-9A32-1F7588390CAA"><cmd/>
<info><xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> aViewIndex</info>
</substep>
<substep id="GUID-46F2D7CB-5016-4F08-94DA-12BFFDDD535F"><cmd/>
<info><xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> aChangeIndex </info>
</substep>
<substep id="GUID-DF50A88D-DE13-4693-9376-CF6143D8FC7C"><cmd/>
<info><xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> aTotalChangeCount</info>
</substep>
</substeps>
</step>
</steps>
<postreq id="GUID-33582208-BB45-4C81-BF20-886CC5EC7EB7"><p>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. 
</p><p>The argument <codeph>aId</codeph> is the Id of the log event in the database.
The argument <codeph>aViewIndex</codeph> is the position in the view
where the event record was added, changed or deleted. The argument
<codeph>aChangeIndex</codeph> is the index of the event in the sequence of
changes. The argument <codeph>aTotalChangeCount</codeph> is the total number
of events in the sequence of changes  
</p></postreq>
</taskbody><related-links>
<link href="GUID-E4A950EA-5671-5755-B3EF-5D6B90E19AE6.dita"><linktext>Maintaining
Log Events</linktext></link>
<link href="GUID-2022F702-9899-5798-8932-D70119C7177D.dita"><linktext>Setting Up
A Log Engine Client</linktext></link>
<link href="GUID-55ECBCF5-FC29-5A4A-A3C6-1CB1C0D562CE.dita"><linktext>Displaying
Log Events</linktext></link>
<link href="GUID-BCB0E50F-B22E-5964-BB68-BEE1870D9C79.dita"><linktext>Configuring
Log Engine </linktext></link>
</related-links></task>