Symbian3/PDK/Source/GUID-3987D040-27F7-5226-96AC-D578ECA4C0A2.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 5 f345bda72bc4
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     6
<!-- Initial Contributors:
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     7
    Nokia Corporation - initial contribution.
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     8
Contributors: 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     9
-->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    10
<!DOCTYPE concept
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    12
<concept xml:lang="en" id="GUID-3987D040-27F7-5226-96AC-D578ECA4C0A2"><title>Callback Interfaces</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>The API uses two types of callback interfaces: change notifications, and progress/completion notifications. </p> <section><title>Change notifications</title> <p>The <xref href="GUID-353A4B43-8C06-3181-B2CD-1DC646D0E726.dita"><apiname>MCalChangeCallBack</apiname></xref> interface is implemented to monitor changes to calendar entries, such as the addition, deletion, and update of entries. </p> <p>Call <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita#GUID-609318A7-43F1-3FC1-952B-146B1EA8115D/GUID-6E8C296A-BFBC-34C9-B448-C706393B05C5"><apiname>CCalSession::StartChangeNotification()</apiname></xref> to request change notifications. The following requests notifications of all changes for entries between 1 Jan 2005 and 1 Jan 2006. </p> <codeblock id="GUID-72CA6019-C6A2-5EE1-802C-C660B8399CFA" xml:space="preserve">// set up notification of all changes on all entries in 2005 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    13
TTime startTime(TDateTime(2005, EJanuary, 0, 0, 0, 0, 0)); // start time
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    14
TTime endTime(startTime + TTimeIntervalYears(1)); // end time 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    15
// assume this object implements MCalChangeCallBack
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    16
session-&gt;StartChangeNotification(this, EChangeEntryAll, ETrue, startTime, endTime);</codeblock> <p>The observer's implementation of <xref href="GUID-353A4B43-8C06-3181-B2CD-1DC646D0E726.dita#GUID-353A4B43-8C06-3181-B2CD-1DC646D0E726/GUID-593A1DB8-C056-3BC4-A66A-F2433CF1371F"><apiname>MCalChangeCallBack::CalChangeNotification()</apiname></xref> is called whenever a change to the calendar entries occurs that matches the specified criteria. </p> <p>You can disable a change notification by using <xref href="GUID-609318A7-43F1-3FC1-952B-146B1EA8115D.dita#GUID-609318A7-43F1-3FC1-952B-146B1EA8115D/GUID-1F42C4AD-FC62-3FAC-A9B3-F1B1BFF482D3"><apiname>CCalSession::StopChangeNotification()</apiname></xref>. </p> </section> <section><title>Progress and completion notifications</title> <p>The <xref href="GUID-1A1D94E6-AD7C-3202-B1BD-A1583FA34A5F.dita"><apiname>MCalProgressCallBack</apiname></xref> interface is used for monitoring the progress and completion of asynchronous tasks, such as the addition, deletion or updating of a calendar entry carried out on the entry view or instance view. <xref href="GUID-1A1D94E6-AD7C-3202-B1BD-A1583FA34A5F.dita#GUID-1A1D94E6-AD7C-3202-B1BD-A1583FA34A5F/GUID-A717C7C7-45BE-3E7F-B054-621751C95787"><apiname>MCalProgressCallBack::Progress()</apiname></xref> reports the percentage completion of the current task. <xref href="GUID-1A1D94E6-AD7C-3202-B1BD-A1583FA34A5F.dita#GUID-1A1D94E6-AD7C-3202-B1BD-A1583FA34A5F/GUID-CDF9D6D4-BE72-3FF3-8E65-2C3D5B5B6230"><apiname>MCalProgressCallBack::Completed()</apiname></xref> is called when the current task is completed. </p> </section> </conbody></concept>