|
1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __ASALTALARMALERTOBSERVERT_H__ |
|
17 #define __ASALTALARMALERTOBSERVERT_H__ |
|
18 |
|
19 // System includes |
|
20 #include <e32std.h> |
|
21 #include <asshddefs.h> |
|
22 |
|
23 // |
|
24 // ----> MASAltAlarmAlertObserver (header) |
|
25 // |
|
26 /** |
|
27 * Mixin class which represents an observer of command instructions |
|
28 * from the Alarm Alert Server (which runs in the EikSrv thread). |
|
29 */ |
|
30 class MASAltAlarmAlertObserver |
|
31 { |
|
32 // |
|
33 public: // FROM MASAltAlarmAlertObserver |
|
34 // |
|
35 enum TAcknowledgeType |
|
36 { |
|
37 /** |
|
38 * Dismiss the currently notifying alarm |
|
39 */ |
|
40 EAcknowledgeCurrentAlarm = 0, |
|
41 |
|
42 /** |
|
43 * Dismiss the currently notifying alarm, and any others that |
|
44 * are awaiting notification. |
|
45 */ |
|
46 EAcknowledgeAllAlarms |
|
47 }; |
|
48 |
|
49 // |
|
50 public: // FROM MASAltAlarmAlertObserver |
|
51 // |
|
52 |
|
53 /** |
|
54 * Stop any sound calculations for the current alarm. This effectively initates |
|
55 * a callback to the Alarm Alert Server informing it to stop playing sound |
|
56 * for the current alarm. |
|
57 * If the given alarm is not playing sound, the silence operation is ignored. |
|
58 * |
|
59 * @param aAlarmId Alarm Id of the alarm to silence. |
|
60 */ |
|
61 virtual void ASAltSilenceCurrentAlarm(TAlarmId aAlarmId) = 0; |
|
62 |
|
63 /** |
|
64 * Dismiss the current alarm |
|
65 * |
|
66 * @param aType The type of alarm to dismiss (just the currently playing alarm with the given |
|
67 * alarm id, or all alarms that may be alerting). |
|
68 * @param aAlarmId If aType is EAcknowledgeCurrentAlarm, Alarm Id of the alarm to acknowledge. |
|
69 */ |
|
70 virtual void ASAltAcknowledgeAlarm(TAcknowledgeType aType, TAlarmId aAlarmId) = 0; |
|
71 |
|
72 /** |
|
73 * Snooze the current alarm, preventing any sound from taking place. The alarm |
|
74 * notification furniture will also be removed from display. |
|
75 * |
|
76 * @param aTimeWhenAlarmToReAwaken Time that the alarm snooze will reawaken. |
|
77 * @param aAlarmId Alarm Id of the alarm to snooze. |
|
78 * @return KErrNone if no error |
|
79 */ |
|
80 virtual TInt ASAltSnoozeAlarmUntil(const TTime& aTimeWhenAlarmToReAwaken, TAlarmId aAlarmId) = 0; |
|
81 |
|
82 /** |
|
83 * Silence all alarm sounds until the specified time. Note that no sound will |
|
84 * occur for any alarms until the resumption time is reached. |
|
85 * |
|
86 * @param aTimeWhenSoundsShouldResume The time when the sound should start playing again |
|
87 */ |
|
88 virtual void ASAltQuietPeriodUntil(const TTime& aTimeWhenSoundsShouldResume) = 0; |
|
89 |
|
90 /** |
|
91 * Pause the alarm sound until the specified time. The alarm state does not change. |
|
92 * |
|
93 * @param aTimeWhenSoundSoundResume The time when the sound should start playing again |
|
94 * @param aAlarmId Alarm Id of the alarm that will have sound paused. |
|
95 */ |
|
96 virtual void ASAltPauseSoundUntil(const TTime& aTimeWhenSoundSoundResume, TAlarmId aAlarmId) = 0; |
|
97 |
|
98 }; |
|
99 |
|
100 #endif |