Symbian3/SDK/Source/GUID-7BB38C3E-BEA9-545B-AEC2-5E9078D0B8A2.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-7BB38C3E-BEA9-545B-AEC2-5E9078D0B8A2.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,19 @@
+<?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 concept
+  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
+<concept xml:lang="en" id="GUID-7BB38C3E-BEA9-545B-AEC2-5E9078D0B8A2"><title>Setting the Alarm</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>You can assign an alarm to a calendar entry. <xref href="GUID-211D3640-9862-3F78-98FC-9793578117A9.dita"><apiname>CCalAlarm</apiname></xref> specifies the alarm type and the time prior to the scheduled event at which to activate the alarm. </p> <p>The following shows how to create and initialise a <xref href="GUID-211D3640-9862-3F78-98FC-9793578117A9.dita"><apiname>CCalAlarm</apiname></xref> object, and use it to set an alarm on an entry. </p> <codeblock id="GUID-08DD6D0C-FE99-5642-876B-9C05EF7010CD" xml:space="preserve">// Set the alarm to a calendar entry 
+CCalAlarm* alarm = CCalAlarm::NewL(); // pointer to alarm 
+alarm-&gt;SetTimeOffset(5); //alarm is set to occur 5 minutes prior to the event 
+// set the name of alarm to ‘Buzzing Alarm’ 
+_LIT(KAlarmSoundName, "Buzzing Alarm"); 
+alarm-&gt;SetAlarmSoundNameL(KAlarmSoundName); 
+// set the alarm
+entry-&gt;SetAlarmL(alarm);</codeblock> <p>If no alarm sound is set, the default alarm sound is used. </p> <p>To clear an already set alarm from an entry, pass NULL to <xref href="GUID-725D11A2-8805-3466-98DB-EF5CDEAF2801.dita#GUID-725D11A2-8805-3466-98DB-EF5CDEAF2801/GUID-101A8DC7-85F6-358C-B5C3-28C366A06113"><apiname>CCalEntry::SetAlarmL()</apiname></xref>. </p> </conbody></concept>
\ No newline at end of file