|
1 /* |
|
2 * Copyright (c) 2002 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: Helper tool to get alarm and repeat data of Calendar note. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CALENNOTEDATAUTIL_H |
|
19 #define CALENNOTEDATAUTIL_H |
|
20 |
|
21 // INCLUDE |
|
22 #include <e32base.h> |
|
23 #include <calcommon.h> |
|
24 #include <calrrule.h> |
|
25 // DATA TYPES |
|
26 enum TCalenRepeatIndex |
|
27 { |
|
28 ERepeatNotRepeated, |
|
29 ERepeatDaily, |
|
30 ERepeatWorkdays, |
|
31 ERepeatWeekly, |
|
32 ERepeatBiWeekly, |
|
33 ERepeatMonthly, // Monthly By Date |
|
34 ERepeatYearly, // Yearly By Date |
|
35 ERepeatOther |
|
36 }; |
|
37 |
|
38 // FORWARD DECLARATIONS |
|
39 class CCalEntry; |
|
40 |
|
41 // CLASS DEFINITIONS |
|
42 |
|
43 /** |
|
44 * Helper class for getting Calendar note data |
|
45 * This class is wrapping that casts from Agenda entry to Calendar Note. |
|
46 */ |
|
47 NONSHARABLE_CLASS( CalenNoteDataUtil ) |
|
48 { |
|
49 public: // New function |
|
50 |
|
51 enum TRepeatQueryType |
|
52 { |
|
53 ESave = 1, |
|
54 EDelete, |
|
55 EEdit |
|
56 }; |
|
57 |
|
58 /** |
|
59 * Return index of repeat type |
|
60 * @param : aEntry : Agenda note's entry |
|
61 * @return : repeat type index |
|
62 **/ |
|
63 IMPORT_C static TCalenRepeatIndex RepeatIndexL(const CCalEntry& aEntry); |
|
64 |
|
65 /** |
|
66 * If note has alarm, alarm time is set to aAlarmDateTime |
|
67 * and return ETrue. aAlarmDateTime has dd/mm/yy, hh:mm part, |
|
68 * E.g. 15/Sep/2002, 13:00. |
|
69 * If note has no alarm, aAlarmDateTime is not changed |
|
70 * and return EFalse. |
|
71 * @param : aEntry : Agenda note's entry |
|
72 * @return : ETrue : Note has alarm |
|
73 * EFalse: Note has no alarm |
|
74 **/ |
|
75 IMPORT_C static TBool GetAlarmDateTimeL(const CCalEntry& aEntry, TTime& aAlarmDateTime); |
|
76 |
|
77 IMPORT_C static TBool ShowRepeatTypeQueryL( CalCommon::TRecurrenceRange& aAnswer, |
|
78 const TRepeatQueryType aType ); |
|
79 /** |
|
80 * @brief To check rule is repeated in "workdays" |
|
81 * @param aRrule, a TCalRRule |
|
82 * @return ETrue if rule is repeated in "workdays" |
|
83 * else EFalse |
|
84 **/ |
|
85 IMPORT_C static TBool IsWorkdaysRepeatingL( const TCalRRule aRrule ); |
|
86 }; |
|
87 |
|
88 #endif // CALENNOTEDATAUTIL_H |
|
89 |
|
90 // End of file |