41 /** |
43 /** |
42 * Two-phased constructor. Creates and initializes |
44 * Two-phased constructor. Creates and initializes |
43 * CESMRRecurrenceInfoHandler object. Ownership transferred to caller. |
45 * CESMRRecurrenceInfoHandler object. Ownership transferred to caller. |
44 * |
46 * |
45 * @param aEntry Reference to calendar entry. |
47 * @param aEntry Reference to calendar entry. |
|
48 * @param aCalDb Reference to caldb manager |
46 * @return Pointer to esmr recurrence handler object. |
49 * @return Pointer to esmr recurrence handler object. |
47 */ |
50 */ |
48 IMPORT_C static CESMRRecurrenceInfoHandler* NewL( |
51 IMPORT_C static CESMRRecurrenceInfoHandler* NewL( |
49 CCalEntry& aEntry ); |
52 CCalEntry& aEntry ); |
50 |
53 |
52 * Two-phased constructor. Creates and initializes |
55 * Two-phased constructor. Creates and initializes |
53 * CESMRRecurrenceInfoHandler object. Ownership transferred to caller. |
56 * CESMRRecurrenceInfoHandler object. Ownership transferred to caller. |
54 * Created object is left to cleanup stack. |
57 * Created object is left to cleanup stack. |
55 * |
58 * |
56 * @param aEntry Reference to calendar entry. |
59 * @param aEntry Reference to calendar entry. |
|
60 * @param aCalDb Pointer to caldb manager. Ownership not transferred. |
|
61 * @return Pointer to esmr recurrence handler object. |
|
62 */ |
|
63 IMPORT_C static CESMRRecurrenceInfoHandler* NewL( |
|
64 CCalEntry& aEntry, |
|
65 MESMRCalDbMgr* aCalDb ); |
|
66 |
|
67 /** |
|
68 * Two-phased constructor. Creates and initializes |
|
69 * CESMRRecurrenceInfoHandler object. Ownership transferred to caller. |
|
70 * |
|
71 * @param aEntry Reference to calendar entry. |
|
72 * @param aCalDb Reference to caldb manager |
57 * @return Pointer to esmr recurrence handler object. |
73 * @return Pointer to esmr recurrence handler object. |
58 */ |
74 */ |
59 IMPORT_C static CESMRRecurrenceInfoHandler* NewLC( |
75 IMPORT_C static CESMRRecurrenceInfoHandler* NewLC( |
60 CCalEntry& aEntry ); |
76 CCalEntry& aEntry ); |
61 |
77 |
|
78 /** |
|
79 * Two-phased constructor. Creates and initializes |
|
80 * CESMRRecurrenceInfoHandler object. Ownership transferred to caller. |
|
81 * Created object is left to cleanup stack. |
|
82 * |
|
83 * @param aEntry Reference to calendar entry. |
|
84 * @param aCalDb Reference to caldb manager |
|
85 * @return Pointer to esmr recurrence handler object. |
|
86 */ |
|
87 IMPORT_C static CESMRRecurrenceInfoHandler* NewLC( |
|
88 CCalEntry& aEntry, |
|
89 MESMRCalDbMgr* aCalDb ); |
|
90 |
62 /** |
91 /** |
63 * C++ Destructor. |
92 * C++ Destructor. |
64 */ |
93 */ |
65 IMPORT_C ~CESMRRecurrenceInfoHandler(); |
94 IMPORT_C ~CESMRRecurrenceInfoHandler(); |
66 |
95 |
127 * @param aEnd Reference to end time. |
156 * @param aEnd Reference to end time. |
128 */ |
157 */ |
129 IMPORT_C void GetFirstInstanceTimeL( |
158 IMPORT_C void GetFirstInstanceTimeL( |
130 TCalTime& aStart, |
159 TCalTime& aStart, |
131 TCalTime& aEnd ); |
160 TCalTime& aEnd ); |
|
161 |
|
162 /** |
|
163 * Gets the start and end times of the previous instance. |
|
164 * @param aStart Reference to start time. |
|
165 * @param aEnd Reference to end time. |
|
166 */ |
|
167 IMPORT_C void GetPreviousInstanceTimeL( TCalTime& aPreviousStartTime, |
|
168 TCalTime& aPreviousEndTime, |
|
169 TTime aInstanceDateTime ); |
|
170 |
|
171 /** |
|
172 * Gets the start and end times of the next instance. |
|
173 * @param aStart Reference to start time. |
|
174 * @param aEnd Reference to end time. |
|
175 */ |
|
176 IMPORT_C void GetNextInstanceTimeL( TCalTime& aNextStartTime, |
|
177 TCalTime& aNextEndTime, |
|
178 TTime aInstanceDateTime ); |
132 |
179 |
133 private: // Implementation |
180 private: // Implementation |
134 CESMRRecurrenceInfoHandler( |
181 CESMRRecurrenceInfoHandler( |
135 CCalEntry& aEntry ); |
182 CCalEntry& aEntry, |
|
183 MESMRCalDbMgr* aCalDb ); |
136 void ConstructL(); |
184 void ConstructL(); |
137 |
185 |
138 void CalculateRecurrenceUntilDateL( |
186 void CalculateRecurrenceUntilDateL( |
139 TESMRRecurrenceValue aRecurrenceType, |
187 TESMRRecurrenceValue aRecurrenceType, |
140 TTime& aUntil, |
188 TTime& aUntil, |
158 TCalRRule& aRule ) const; |
206 TCalRRule& aRule ) const; |
159 |
207 |
160 TBool NeedToSetRecurrenceL( |
208 TBool NeedToSetRecurrenceL( |
161 TESMRRecurrenceValue aRecurrence, |
209 TESMRRecurrenceValue aRecurrence, |
162 TTime aUntil ) const; |
210 TTime aUntil ) const; |
|
211 |
|
212 TTime GetPreviousInstanceForRepeatOtherL( |
|
213 CCalEntry& aEntry, |
|
214 const CalCommon::TCalTimeRange& timeRange ); |
|
215 |
|
216 TTime GetNextInstanceForRepeatOtherL( |
|
217 CCalEntry& aEntry, |
|
218 const CalCommon::TCalTimeRange& timeRange ); |
|
219 |
|
220 TESMRRecurrenceValue RepeatIndexL( const CCalEntry& aEntry ); |
|
221 |
163 |
222 |
164 |
223 |
165 private: |
224 private: |
166 /// Ref: Reference to meeting request entry |
225 /// Ref: Reference to meeting request entry |
167 CCalEntry& iEntry; |
226 CCalEntry& iEntry; |
|
227 /// Ref: Reference to caldb manager |
|
228 MESMRCalDbMgr* iCalDb; |
168 }; |
229 }; |
169 |
230 |
170 #endif // CESMRRECURRENCEINFOHANDLER_H |
231 #endif // CESMRRECURRENCEINFOHANDLER_H |
171 |
232 |
172 // EOF |
233 // EOF |