Obtaining Alarm ID or Category List

Context

To retrieve a list of all alarms maintained within the Alarm Server's queue, use GetAlarmIdListL as shown in the following code fragment:

RArray<TAlarmId> alarmIds;
CleanupClosePushL( alarmIds );
TheAlarmServerSession.GetAlarmIdListL( alarmIds );

You can retrieve a list of all categories utilized within the alarm server using GetAvailableCategoryListL, as shown in the following code fragment:

RArray<TAlarmCategory> categories;
TheAlarmServerSession.GetAvailableCategoryListL( categories );

Use GetAlarmIdListForCategoryL to retrieve an array containing all, for example, Clock alarms, as shown in the following code fragment:

//Get alarms with category 
KASCliCategoryClockRArray<TAlarmId> alarms;
CleanupClosePushL( alarms );
TheAlarmServerSession.GetAlarmIdListForCategoryL( KASCliCategoryClock, alarms );

You can also retrieve a list of alarm IDs associated with alarms in a given state using GetAlarmIdListByStateL, as shown in the following code fragment:

RArray<TAlarmId> alarmIds;
TheAlarmServerSession.GetAlarmIdListByStateL( EAlarmStateSnoozed, alarmIds );