|
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-A8EE55C2-0636-44E2-8B2B-05EA8D4A96A4" xml:lang="en"><title>Obtaining |
|
13 Alarm ID or Category List</title><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
14 <context> <p>To retrieve a list of all alarms maintained within the |
|
15 Alarm Server's queue, use <codeph>GetAlarmIdListL</codeph> as shown in the |
|
16 following code fragment:</p><codeblock xml:space="preserve">RArray<TAlarmId> alarmIds; |
|
17 CleanupClosePushL( alarmIds ); |
|
18 TheAlarmServerSession.GetAlarmIdListL( alarmIds );</codeblock><p>You can retrieve |
|
19 a list of all categories utilized within the alarm server using <codeph>GetAvailableCategoryListL</codeph>, |
|
20 as shown in the following code fragment:</p><codeblock xml:space="preserve">RArray<TAlarmCategory> categories; |
|
21 TheAlarmServerSession.GetAvailableCategoryListL( categories );</codeblock><p>Use <codeph>GetAlarmIdListForCategoryL</codeph> to |
|
22 retrieve an array containing all, for example, Clock alarms, as shown in the |
|
23 following code fragment:</p><codeblock xml:space="preserve">//Get alarms with category |
|
24 KASCliCategoryClockRArray<TAlarmId> alarms; |
|
25 CleanupClosePushL( alarms ); |
|
26 TheAlarmServerSession.GetAlarmIdListForCategoryL( KASCliCategoryClock, alarms );</codeblock><p>You |
|
27 can also retrieve a list of alarm IDs associated with alarms in a given state |
|
28 using <codeph>GetAlarmIdListByStateL</codeph>, as shown in the following code |
|
29 fragment:</p><codeblock xml:space="preserve">RArray<TAlarmId> alarmIds; |
|
30 TheAlarmServerSession.GetAlarmIdListByStateL( EAlarmStateSnoozed, alarmIds );</codeblock></context> |
|
31 </taskbody></task> |