|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 // alarmalertwrapper.h |
|
18 |
|
19 #ifndef __ALARM_ALERT_WRAPPER_H__ |
|
20 #define __ALARM_ALERT_WRAPPER_H__ |
|
21 |
|
22 // System includes |
|
23 #include <e32def.h> |
|
24 |
|
25 // User includes |
|
26 #include "alarmcommon.h" |
|
27 |
|
28 // Forward declarations |
|
29 class AlarmAlertWidget; |
|
30 class AlarmAlertObserver; |
|
31 |
|
32 // Class declaration |
|
33 /** |
|
34 * @class AlarmAlert |
|
35 * @brief Wrapper class that clients need to use to |
|
36 * launch alarm alerts |
|
37 */ |
|
38 class AlarmAlert |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * @brief Constructor |
|
44 * @param observer The observer for alarm events |
|
45 */ |
|
46 IMPORT_C AlarmAlert(AlarmAlertObserver *observer); |
|
47 |
|
48 /** |
|
49 * @brief Destructor |
|
50 */ |
|
51 IMPORT_C ~AlarmAlert(); |
|
52 |
|
53 /** |
|
54 * @brief Shows the alarm alert. This is merely a request |
|
55 * and it returns immediately. When the dialog actually |
|
56 * gets shown is decided by the device dialog server. |
|
57 * |
|
58 * AlarmAlertObserver::alertDisplayed is called once the |
|
59 * dialog actually gets shown. |
|
60 * |
|
61 * AlarmAlertObserver::alertCompleted is called if the dialog |
|
62 * is closed by user action |
|
63 * |
|
64 * AlarmAlertObserver::alertCancelled is called in case the |
|
65 * dialog closes unexpectedly or is cancelled in between |
|
66 * |
|
67 * @return true on success, false otherwise |
|
68 */ |
|
69 IMPORT_C bool showAlarmAlert(SAlarmInfo *alarmInfo); |
|
70 |
|
71 /** |
|
72 * @brief Dismisses the alarm alert being shown. This is |
|
73 * merely a request and it returns immediately. |
|
74 * AlarmAlertObserver::alertCancelled is called once the |
|
75 * alert is cancelled successfully |
|
76 * |
|
77 */ |
|
78 IMPORT_C void dismissAlarmAlert(); |
|
79 |
|
80 /** |
|
81 * @brief Updates the alarm alert with the information |
|
82 * provided |
|
83 */ |
|
84 IMPORT_C bool updateAlarmAlert(SAlarmInfo *alarmInfo); |
|
85 |
|
86 private: |
|
87 |
|
88 /** |
|
89 * @var mAlarmWidget |
|
90 * @brief The client side interface for the alarm alert |
|
91 */ |
|
92 AlarmAlertWidget *mAlarmWidget; |
|
93 }; |
|
94 |
|
95 #endif // __ALARM_ALERT_WRAPPER_H__ |