Symbian3/PDK/Source/GUID-131A9070-AF80-5BC5-91D2-0F1C7019ABF2.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    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
       
    13 TCalRRule rrule = TCalRRule(EWeekly);
       
    14 // set interval between each instance 
       
    15 rrule.SetInterval(1);
       
    16 // set the start Time 
       
    17 TCalTime startTime; 
       
    18 startTime.SetTimeLocalL(TDateTime(2005, EJuly, 26, 0, 0, 0, 0)); 
       
    19 rpt.SetDtStart(startTime); 
       
    20 // set the end Time 
       
    21 TCalTime endTime; 
       
    22 endTime.SetTimeLocalL(TDateTime(2007, EAugust, 28, 14, 0, 0, 0)); 
       
    23 rrule.SetUntil(endTime); 
       
    24 // set the repeat rule in the calendar entry 
       
    25 entry-&gt;SetRRuleL(rrule); 
       
    26 // You can set the time zone rules for the entry’s repeat rules
       
    27 entry-&gt;SetTzRulesL(*tzrule); // tzrule object is of CTzRules type</codeblock> </conbody></concept>