|
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 task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-41F1AED1-7BE6-42CF-BC4A-E913A6F2D5E6" xml:lang="en"><title>Deleting |
|
13 an Alarm</title><shortdesc>Introduction to topic for overview page or search</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
14 <context> <p>The <codeph>RASCliSession::AlarmDelete()</codeph> API deletes |
|
15 an alarm from the Alarm Server and returns <codeph>KErrNone</codeph> if successful |
|
16 as shown in the following code fragment:</p><codeblock xml:space="preserve">// RASCliSession::TheAlarmServerSession is the alarm server session |
|
17 // TAlarmId::id is the unique identifier of the alarm the client needs to delete |
|
18 TheAlarmServerSession.AlarmDelete( id );</codeblock><p><b>Deleting an Alarm |
|
19 by Category</b></p> <p>You can delete multiple alarm objects by category and |
|
20 can also specify the type of alarms within this category. The following code |
|
21 fragment illustrates how to delete alarms by category:</p><codeblock xml:space="preserve">// Delete all alarms |
|
22 RArray<TAlarmCategory> categories; |
|
23 CleanupClosePushL( categories ); |
|
24 TheAlarmServerSession.GetAvailableCategoryListL( categories ); |
|
25 const TInt KAlarmCategoriesCount = categories.Count(); |
|
26 for( TInt i = 0; i<KAlarmCategoriesCount; ++i ) |
|
27 { |
|
28 const TAlarmCategory category = categories[i]; |
|
29 TheAlarmServerSession.AlarmDeleteAllByCategory( category, EFalse ); |
|
30 } |
|
31 CleanupStack::PopAndDestroy( &categories );</codeblock></context> |
|
32 </taskbody></task> |