Symbian3/SDK/Source/GUID-41F1AED1-7BE6-42CF-BC4A-E913A6F2D5E6.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
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-41F1AED1-7BE6-42CF-BC4A-E913A6F2D5E6" xml:lang="en"><title>Deleting
an Alarm</title><shortdesc>Introduction to topic for overview page or search</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context>       <p>The <codeph>RASCliSession::AlarmDelete()</codeph> API deletes
an alarm from the Alarm Server and returns <codeph>KErrNone</codeph> if successful
as shown in the following code fragment:</p><codeblock xml:space="preserve">// RASCliSession::TheAlarmServerSession is the alarm server session 
// TAlarmId::id is the unique identifier of the alarm the client needs to delete 
TheAlarmServerSession.AlarmDelete( id );</codeblock><p><b>Deleting an Alarm
by Category</b></p> <p>You can delete multiple alarm objects by category and
can also specify the type of alarms within this category. The following code
fragment illustrates how to delete alarms by category:</p><codeblock xml:space="preserve">// Delete all alarms
RArray&lt;TAlarmCategory&gt; categories;
CleanupClosePushL( categories );
TheAlarmServerSession.GetAvailableCategoryListL( categories );
const TInt KAlarmCategoriesCount = categories.Count();
for( TInt i = 0; i&lt;KAlarmCategoriesCount; ++i )
    {
    const TAlarmCategory category = categories[i];
    TheAlarmServerSession.AlarmDeleteAllByCategory( category, EFalse );
    }
CleanupStack::PopAndDestroy( &amp;categories );</codeblock></context>
</taskbody></task>