Symbian3/PDK/Source/GUID-131A9070-AF80-5BC5-91D2-0F1C7019ABF2.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-131A9070-AF80-5BC5-91D2-0F1C7019ABF2"><title>Setting the Repeat Rule</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>For an event to occur repetitively, such as a weekly progress meeting, you need to set a repeat rule. You can set the repeat frequency as daily, weekly, monthly by day (for example every Monday of first week), monthly by date (for example 25th of every month), yearly by day (for example every Monday of first week of October) and yearly by date, to a calendar entry. </p> <p>A repeat rule can be set by passing a <xref href="GUID-010934C4-DC1F-37F3-8121-E497B0BC9CDE.dita"><apiname>TCalRRule</apiname></xref> to <xref href="GUID-725D11A2-8805-3466-98DB-EF5CDEAF2801.dita#GUID-725D11A2-8805-3466-98DB-EF5CDEAF2801/GUID-C66CEE4B-6B7C-3AA4-896F-AE3724C915E2"><apiname>CCalEntry::SetRRule()</apiname></xref>. TCalRRule allows you to set any of the following iCal properties: </p> <ul><li id="GUID-F0CB6D79-2C62-54AE-B35B-74DE497B9C1F"><p>FREQ (rule type) </p> </li> <li id="GUID-1D3E64A0-777E-568F-B40D-1B74E1AE8690"><p>DTSTART (start date) </p> </li> <li id="GUID-C3175B30-5E80-5E7C-AD36-A3C7328259AF"><p>UNTIL (end date) </p> </li> <li id="GUID-A4B90BAF-7DD4-595B-8A78-7B094D132744"><p>COUNT (number of instances) </p> </li> <li id="GUID-D91E2EE3-AE9F-5216-9262-D629BC5E71E1"><p>INTERVAL (interval between instances) </p> </li> <li id="GUID-A7409FBA-83D0-5613-86E2-BC47F070E2A6"><p>BYDAY </p> </li> <li id="GUID-EB9505F8-FA10-510A-9CC4-B4CB7A972708"><p>BYMONTHDAY </p> </li> <li id="GUID-CED46A8A-3954-5783-9E87-9087B0C8CFE7"><p>BYYEARDAY </p> </li> <li id="GUID-32ABB85D-B7B3-59E8-89DB-473EB2A15F14"><p>WKST (start day of week) </p> </li> </ul> <p>You can set the repeat rule as follows: </p> <codeblock id="GUID-A5F8B566-F148-5660-A138-19813157C69C" xml:space="preserve">// set the repeat definition type
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
TCalRRule rrule = TCalRRule(EWeekly);
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
// set interval between each instance 
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
rrule.SetInterval(1);
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
    16
// set the 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
    17
TCalTime startTime; 
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
    18
startTime.SetTimeLocalL(TDateTime(2005, EJuly, 26, 0, 0, 0, 0)); 
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
    19
rpt.SetDtStart(startTime); 
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
    20
// set the 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
    21
TCalTime endTime; 
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
    22
endTime.SetTimeLocalL(TDateTime(2007, EAugust, 28, 14, 0, 0, 0)); 
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
    23
rrule.SetUntil(endTime); 
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
    24
// set the repeat rule in the calendar entry 
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
    25
entry-&gt;SetRRuleL(rrule); 
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
    26
// You can set the time zone rules for the entry’s repeat rules
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
    27
entry-&gt;SetTzRulesL(*tzrule); // tzrule object is of CTzRules type</codeblock> </conbody></concept>