|
1 /* |
|
2 * Copyright (c) 2007-2009 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: ESMR service alarm information handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRALARMINFOHANDLER_H |
|
20 #define CESMRALARMINFOHANDLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 //<cmail> |
|
24 #include "esmrdef.h" |
|
25 #include "tesmralarminfo.h" |
|
26 //</cmail> |
|
27 |
|
28 class CCalEntry; |
|
29 |
|
30 /** |
|
31 * CESMRAlarmInfoHandler is responsible for handling |
|
32 * alarm related issues for calendar entry. |
|
33 * |
|
34 * @lib esmrservices.lib |
|
35 */ |
|
36 NONSHARABLE_CLASS(CESMRAlarmInfoHandler) : |
|
37 public CBase |
|
38 { |
|
39 public: // Construction and destruction |
|
40 /** |
|
41 * Two-phased constructor. Creates and initializes |
|
42 * CESMRAlarmInfoHandler object. Ownership transferred to caller. |
|
43 * |
|
44 * @return Pointer to esmr recurrence handler object. |
|
45 */ |
|
46 IMPORT_C static CESMRAlarmInfoHandler* NewL(); |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. Creates and initializes |
|
50 * CESMRAlarmInfoHandler object. Ownership transferred to caller and |
|
51 * created object is left to cleanup stack. |
|
52 |
|
53 * @return Pointer to esmr recurrence handler object. |
|
54 */ |
|
55 IMPORT_C static CESMRAlarmInfoHandler* NewLC(); |
|
56 |
|
57 /** |
|
58 * C++ Destructor. |
|
59 */ |
|
60 IMPORT_C ~CESMRAlarmInfoHandler(); |
|
61 |
|
62 public: // Interface |
|
63 /** |
|
64 * Reads alarm information from resource file. |
|
65 * |
|
66 * @param aResourceFile Alarm inforamtion resource file name. |
|
67 * @param aResouceId Resource id containing alarm info table. |
|
68 */ |
|
69 IMPORT_C void ReadFromResourceL( |
|
70 const TDesC& aResourceFile, |
|
71 TInt aResouceId ); |
|
72 |
|
73 /** |
|
74 * Fetches alarm information object matching alarm information |
|
75 * in entry. |
|
76 * |
|
77 * @param aEntry Reference to calendar entry. |
|
78 * @param aAlarmInfo On return contains fetched alarm information |
|
79 * object. |
|
80 * @error KErrNotFound Alarm info object cannot be resolved. |
|
81 */ |
|
82 IMPORT_C void GetAlarmInfoObjectL( |
|
83 const CCalEntry& aEntry, |
|
84 TESMRAlarmInfo& aAlarmInfo ); |
|
85 |
|
86 /** |
|
87 * Fetches absolute alarm time from calendar entry. Absolute alarm |
|
88 * time is returned in local time. |
|
89 * |
|
90 * @param aEntry Reference to calendar entry. |
|
91 * @param aAbsoluteAlarmTime On return contains absolute alarm time. |
|
92 * @error KErrNotFound Absolute alarm cannot resolved. |
|
93 */ |
|
94 IMPORT_C void GetAbsoluteAlarmTimeL( |
|
95 CCalEntry& aEntry, |
|
96 TTime& aAbsoluteAlarmTime ); |
|
97 |
|
98 private: // Implementation |
|
99 CESMRAlarmInfoHandler(); |
|
100 void ConstructL(); |
|
101 |
|
102 private: |
|
103 /// Own: Alarm information objects |
|
104 RArray<TESMRAlarmInfo> iAlarmInfos; |
|
105 }; |
|
106 |
|
107 #endif // CESMRALARMINFOHANDLER_H |
|
108 |
|
109 // EOF |