13 * |
13 * |
14 * Description: Implementation of Calendar services |
14 * Description: Implementation of Calendar services |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // System includes |
18 #include <gulicon.h> |
19 #include <agendautil.h> |
19 #include <calcalendarinfo.h> |
20 #include <hbwidget.h> |
20 #include <mcalenpreview.h> |
21 |
21 |
|
22 #include "calenglobaldata.h" |
22 #include "calendarui_debug.h" |
23 #include "calendarui_debug.h" |
23 #include "calenservicesimpl.h" |
24 #include "calenservicesimpl.h" |
24 #include "calencontroller.h" |
25 #include "calencontroller.h" |
25 #include "calenviewmanager.h" |
26 #include "calenviewmanager.h" |
26 #include "OstTraceDefinitions.h" |
27 #include "calenicons.h" |
27 #ifdef OST_TRACE_COMPILER_IN_USE |
28 #include "calenattachmentmodel.h" |
28 #include "calenservicesimplTraces.h" |
29 |
29 #endif |
30 // ---------------------------------------------------------------------------- |
30 |
31 // CCalenServicesImpl::NewL |
31 |
|
32 |
|
33 // ---------------------------------------------------------------------------- |
|
34 // CalenServicesImpl::NewL |
|
35 // Two phased constructor. |
32 // Two phased constructor. |
36 // Taking the command range start and end points |
33 // Taking the command range start and end points |
37 // (other items were commented in a header). |
34 // (other items were commented in a header). |
38 // ---------------------------------------------------------------------------- |
35 // ---------------------------------------------------------------------------- |
39 // |
36 // |
40 CalenServicesImpl* CalenServicesImpl::NewL( TInt aCommandRangeStart, |
37 CCalenServicesImpl* CCalenServicesImpl::NewL( TInt aCommandRangeStart, |
41 TInt aCommandRangeEnd ) |
38 TInt aCommandRangeEnd ) |
42 { |
39 { |
43 OstTraceFunctionEntry0( CALENSERVICESIMPL_NEWL_ENTRY ); |
40 TRACE_ENTRY_POINT; |
44 CalenServicesImpl* self = new( ELeave ) CalenServicesImpl( |
41 CCalenServicesImpl* self = new( ELeave ) CCalenServicesImpl( |
45 aCommandRangeStart, aCommandRangeEnd ); |
42 aCommandRangeStart, aCommandRangeEnd ); |
46 |
43 |
47 CleanupStack::PushL( self ); |
44 CleanupStack::PushL( self ); |
48 self->ConstructL(); |
45 self->ConstructL(); |
49 CleanupStack::Pop( self ); |
46 CleanupStack::Pop( self ); |
50 |
47 |
51 OstTraceFunctionExit0( CALENSERVICESIMPL_NEWL_EXIT ); |
48 TRACE_EXIT_POINT; |
52 return self; |
49 return self; |
53 } |
50 } |
54 |
51 |
55 // ---------------------------------------------------------------------------- |
52 // ---------------------------------------------------------------------------- |
56 // CalenServicesImpl::NewL |
53 // CCalenServicesImpl::NewL |
57 // 1st phase of construction. |
54 // 1st phase of construction. |
58 // (other items were commented in a header). |
55 // (other items were commented in a header). |
59 // ---------------------------------------------------------------------------- |
56 // ---------------------------------------------------------------------------- |
60 // |
57 // |
61 CalenServicesImpl* CalenServicesImpl::NewL() |
58 CCalenServicesImpl* CCalenServicesImpl::NewL() |
62 { |
59 { |
63 OstTraceFunctionEntry0( DUP1_CALENSERVICESIMPL_NEWL_ENTRY ); |
60 TRACE_ENTRY_POINT; |
64 |
61 CCalenServicesImpl* self = new( ELeave ) CCalenServicesImpl( 0, 0 ); |
65 CalenServicesImpl* self = new( ELeave ) CalenServicesImpl( 0, 0 ); |
|
66 |
62 |
67 CleanupStack::PushL( self ); |
63 CleanupStack::PushL( self ); |
68 self->ConstructL(); |
64 self->ConstructL(); |
69 CleanupStack::Pop( self ); |
65 CleanupStack::Pop( self ); |
70 |
66 |
71 OstTraceFunctionExit0( DUP1_CALENSERVICESIMPL_NEWL_EXIT ); |
67 TRACE_EXIT_POINT; |
72 return self; |
68 return self; |
73 } |
69 } |
74 |
70 |
75 // ---------------------------------------------------------------------------- |
71 // ---------------------------------------------------------------------------- |
76 // CalenServicesImpl::CalenServicesImpl |
72 // CCalenServicesImpl::CCalenServicesImpl |
77 // C++ constructor. |
73 // C++ constructor. |
78 // (other items were commented in a header). |
74 // (other items were commented in a header). |
79 // ---------------------------------------------------------------------------- |
75 // ---------------------------------------------------------------------------- |
80 // |
76 // |
81 CalenServicesImpl::CalenServicesImpl( TInt aCommandRangeStart, |
77 CCalenServicesImpl::CCalenServicesImpl( TInt aCommandRangeStart, |
82 TInt aCommandRangeEnd ) |
78 TInt aCommandRangeEnd ) |
83 : iCommandRangeStart( aCommandRangeStart ), |
79 : iCommandRangeStart( aCommandRangeStart ), |
84 iCommandRangeEnd( aCommandRangeEnd ) |
80 iCommandRangeEnd( aCommandRangeEnd ) |
85 { |
81 { |
86 OstTraceFunctionEntry0( CALENSERVICESIMPL_CALENSERVICESIMPL_ENTRY ); |
82 TRACE_ENTRY_POINT; |
87 |
83 TRACE_EXIT_POINT; |
88 OstTraceFunctionExit0( CALENSERVICESIMPL_CALENSERVICESIMPL_EXIT ); |
84 } |
89 } |
85 |
90 |
86 // ---------------------------------------------------------------------------- |
91 // ---------------------------------------------------------------------------- |
87 // CCalenServicesImpl::ConstructL |
92 // CalenServicesImpl::ConstructL |
|
93 // 2nd phase of construction. |
88 // 2nd phase of construction. |
94 // (other items were commented in a header). |
89 // (other items were commented in a header). |
95 // ---------------------------------------------------------------------------- |
90 // ---------------------------------------------------------------------------- |
96 // |
91 // |
97 void CalenServicesImpl::ConstructL() |
92 void CCalenServicesImpl::ConstructL() |
98 { |
93 { |
99 OstTraceFunctionEntry0( CALENSERVICESIMPL_CONSTRUCTL_ENTRY ); |
94 TRACE_ENTRY_POINT; |
100 |
95 |
|
96 iGlobalData = CCalenGlobalData::InstanceL(); |
101 iController = CCalenController::InstanceL(); |
97 iController = CCalenController::InstanceL(); |
102 |
98 |
103 OstTraceFunctionExit0( CALENSERVICESIMPL_CONSTRUCTL_EXIT ); |
99 TRACE_EXIT_POINT; |
104 } |
100 } |
105 |
101 |
106 // ---------------------------------------------------------------------------- |
102 // ---------------------------------------------------------------------------- |
107 // CalenServicesImpl::Release |
103 // CCalenServicesImpl::Release |
108 // Performs cleanup of this object. |
104 // Performs cleanup of this object. |
109 // (other items were commented in a header). |
105 // (other items were commented in a header). |
110 // ---------------------------------------------------------------------------- |
106 // ---------------------------------------------------------------------------- |
111 // |
107 // |
112 void CalenServicesImpl::Release() |
108 void CCalenServicesImpl::Release() |
113 { |
109 { |
114 OstTraceFunctionEntry0( CALENSERVICESIMPL_RELEASE_ENTRY ); |
110 TRACE_ENTRY_POINT; |
|
111 |
|
112 if( iGlobalData ) |
|
113 { |
|
114 iGlobalData->Release(); |
|
115 } |
115 |
116 |
116 if( iController ) |
117 if( iController ) |
117 { |
118 { |
118 iController->Release(); |
119 iController->Release(); |
119 } |
120 } |
120 |
121 |
121 delete this; |
122 delete this; |
122 |
123 |
123 OstTraceFunctionExit0( CALENSERVICESIMPL_RELEASE_EXIT ); |
124 TRACE_EXIT_POINT; |
124 } |
125 } |
125 |
126 |
126 // ---------------------------------------------------------------------------- |
127 // ---------------------------------------------------------------------------- |
127 // CalenServicesImpl::SessionL |
128 // CCalenServicesImpl::SessionL |
128 // Retrieve the calendar session currently in use by Calendar |
129 // Retrieve the calendar session currently in use by Calendar |
129 // (other items were commented in a header). |
130 // (other items were commented in a header). |
130 // ---------------------------------------------------------------------------- |
131 // ---------------------------------------------------------------------------- |
131 // |
132 // |
132 HbMainWindow& CalenServicesImpl::MainWindow() |
133 CCalSession& CCalenServicesImpl::SessionL() |
133 { |
134 { |
134 OstTraceFunctionEntry0( CALENSERVICESIMPL_MAINWINDOW_ENTRY ); |
135 TRACE_ENTRY_POINT; |
135 |
136 |
136 ASSERT( iController ); // Make sure ConstructL has been called. |
137 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
137 |
138 |
138 OstTraceFunctionExit0( CALENSERVICESIMPL_MAINWINDOW_EXIT ); |
139 TRACE_EXIT_POINT; |
139 return iController->MainWindow(); |
140 return iGlobalData->CalSessionL(); |
140 } |
141 } |
141 |
142 |
142 // ---------------------------------------------------------------------------- |
143 // ---------------------------------------------------------------------------- |
143 // CalenServicesImpl::RegisterForNotificationsL |
144 // CCalenServicesImpl::EntryViewL |
|
145 // Retrieve the calendar entry view currently in use by Calendar |
|
146 // (other items were commented in a header). |
|
147 // ---------------------------------------------------------------------------- |
|
148 // |
|
149 CCalEntryView* CCalenServicesImpl::EntryViewL() |
|
150 { |
|
151 TRACE_ENTRY_POINT; |
|
152 |
|
153 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
|
154 |
|
155 TRACE_EXIT_POINT; |
|
156 return iGlobalData->EntryViewL(); |
|
157 } |
|
158 |
|
159 // ---------------------------------------------------------------------------- |
|
160 // CCalenServicesImpl::InstanceViewL |
|
161 // Retrieve the calendar instance view currently in use by Calendar |
|
162 // (other items were commented in a header). |
|
163 // ---------------------------------------------------------------------------- |
|
164 // |
|
165 CCalInstanceView* CCalenServicesImpl::InstanceViewL() |
|
166 { |
|
167 TRACE_ENTRY_POINT; |
|
168 |
|
169 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
|
170 |
|
171 TRACE_EXIT_POINT; |
|
172 return iGlobalData->InstanceViewL(); |
|
173 } |
|
174 |
|
175 // ---------------------------------------------------------------------------- |
|
176 // CCalenServicesImpl::InterimUtilsL() |
|
177 // Retrieve interimutils from globaldata |
|
178 // (other items were commented in a header). |
|
179 // ---------------------------------------------------------------------------- |
|
180 // |
|
181 CCalenInterimUtils2& CCalenServicesImpl::InterimUtilsL() |
|
182 { |
|
183 TRACE_ENTRY_POINT; |
|
184 TRACE_EXIT_POINT; |
|
185 return iGlobalData->InterimUtilsL(); |
|
186 } |
|
187 |
|
188 // ---------------------------------------------------------------------------- |
|
189 // CCalenServicesImpl::RegisterForNotificationsL |
144 // Register for notification of Calendar event |
190 // Register for notification of Calendar event |
145 // (other items were commented in a header). |
191 // (other items were commented in a header). |
146 // ---------------------------------------------------------------------------- |
192 // ---------------------------------------------------------------------------- |
147 // |
193 // |
148 void CalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
194 void CCalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
149 TCalenNotification aNotification ) |
195 TCalenNotification aNotification ) |
150 { |
196 { |
151 OstTraceFunctionEntry0( CALENSERVICESIMPL_REGISTERFORNOTIFICATIONSL_ENTRY ); |
197 TRACE_ENTRY_POINT; |
152 |
198 |
153 ASSERT( iController ); // Make sure ConstructL has been called. |
199 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
154 iController->RegisterForNotificationsL( aHandler, aNotification ); |
200 iController->RegisterForNotificationsL( aHandler, aNotification ); |
155 |
201 |
156 OstTraceFunctionExit0( CALENSERVICESIMPL_REGISTERFORNOTIFICATIONSL_EXIT ); |
202 TRACE_EXIT_POINT; |
157 } |
203 } |
158 |
204 |
159 // ---------------------------------------------------------------------------- |
205 // ---------------------------------------------------------------------------- |
160 // CalenServicesImpl::RegisterForNotificationsL |
206 // CCalenServicesImpl::RegisterForNotificationsL |
161 // Register for array notifications of Calendar events |
207 // Register for array notifications of Calendar events |
162 // (other items were commented in a header). |
208 // (other items were commented in a header). |
163 // ---------------------------------------------------------------------------- |
209 // ---------------------------------------------------------------------------- |
164 // |
210 // |
165 void CalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
211 void CCalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
166 RArray<TCalenNotification>& aNotifications ) |
212 RArray<TCalenNotification>& aNotifications ) |
167 { |
213 { |
168 OstTraceFunctionEntry0( DUP1_CALENSERVICESIMPL_REGISTERFORNOTIFICATIONSL_ENTRY ); |
214 TRACE_ENTRY_POINT; |
169 |
215 |
170 ASSERT( iController ); // Make sure ConstructL has been called. |
216 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
171 iController->RegisterForNotificationsL( aHandler, aNotifications ); |
217 iController->RegisterForNotificationsL( aHandler, aNotifications ); |
172 |
218 |
173 OstTraceFunctionExit0( DUP1_CALENSERVICESIMPL_REGISTERFORNOTIFICATIONSL_EXIT ); |
219 TRACE_EXIT_POINT; |
174 } |
220 } |
175 |
221 |
176 // ---------------------------------------------------------------------------- |
222 // ---------------------------------------------------------------------------- |
177 // CalenServicesImpl::CancelNotifications |
223 // CCalenServicesImpl::CancelNotifications |
178 // Cancel notifications of Calendar events |
224 // Cancel notifications of Calendar events |
179 // (other items were commented in a header). |
225 // (other items were commented in a header). |
180 // ---------------------------------------------------------------------------- |
226 // ---------------------------------------------------------------------------- |
181 // |
227 // |
182 void CalenServicesImpl::CancelNotifications( MCalenNotificationHandler* aHandler ) |
228 void CCalenServicesImpl::CancelNotifications( MCalenNotificationHandler* aHandler ) |
183 { |
229 { |
184 OstTraceFunctionEntry0( CALENSERVICESIMPL_CANCELNOTIFICATIONS_ENTRY ); |
230 TRACE_ENTRY_POINT; |
185 |
231 |
186 ASSERT( iController ); // Make sure ConstructL has been called. |
232 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
187 iController->CancelNotifications( aHandler ); |
233 iController->CancelNotifications( aHandler ); |
188 |
234 |
189 OstTraceFunctionExit0( CALENSERVICESIMPL_CANCELNOTIFICATIONS_EXIT ); |
235 TRACE_EXIT_POINT; |
190 } |
236 } |
191 |
237 |
192 // ---------------------------------------------------------------------------- |
238 // ---------------------------------------------------------------------------- |
193 // CalenServicesImpl::IssueCommandL |
239 // CCalenServicesImpl::IssueCommandL |
194 // Issue a command to be handled by Calendar or a customization |
240 // Issue a command to be handled by Calendar or a customization |
195 // (other items were commented in a header). |
241 // (other items were commented in a header). |
196 // ---------------------------------------------------------------------------- |
242 // ---------------------------------------------------------------------------- |
197 // |
243 // |
198 TBool CalenServicesImpl::IssueCommandL( TInt aCommand ) |
244 TBool CCalenServicesImpl::IssueCommandL( TInt aCommand ) |
199 { |
245 { |
200 OstTraceFunctionEntry0( CALENSERVICESIMPL_ISSUECOMMANDL_ENTRY ); |
246 TRACE_ENTRY_POINT; |
201 |
247 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
202 ASSERT( iController ); // Make sure ConstructL has been called. |
248 |
203 |
249 TRACE_EXIT_POINT; |
204 OstTraceFunctionExit0( CALENSERVICESIMPL_ISSUECOMMANDL_EXIT ); |
|
205 return iController->IssueCommandL( aCommand ); |
250 return iController->IssueCommandL( aCommand ); |
206 } |
251 } |
207 |
252 |
208 // ---------------------------------------------------------------------------- |
253 // ---------------------------------------------------------------------------- |
209 // CalenServicesImpl::IssueNotificationL |
254 // CCalenServicesImpl::IssueNotificationL |
210 // Issue a notification to Calendar, which will be broadcast synchronously |
255 // Issue a notification to Calendar, which will be broadcast synchronously |
211 // to all registered notification handlers |
256 // to all registered notification handlers |
212 // (other items were commented in a header). |
257 // (other items were commented in a header). |
213 // ---------------------------------------------------------------------------- |
258 // ---------------------------------------------------------------------------- |
214 // |
259 // |
215 void CalenServicesImpl::IssueNotificationL( TCalenNotification aNotification ) |
260 void CCalenServicesImpl::IssueNotificationL( TCalenNotification aNotification ) |
216 { |
261 { |
217 OstTraceFunctionEntry0( CALENSERVICESIMPL_ISSUENOTIFICATIONL_ENTRY ); |
262 TRACE_ENTRY_POINT; |
218 |
263 |
219 ASSERT( iController ); // Make sure ConstructL has been called. |
264 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
220 iController->BroadcastNotification( aNotification ); |
265 iController->BroadcastNotification( aNotification ); |
221 |
266 |
222 OstTraceFunctionExit0( CALENSERVICESIMPL_ISSUENOTIFICATIONL_EXIT ); |
267 TRACE_EXIT_POINT; |
223 } |
268 } |
224 |
269 |
225 // ---------------------------------------------------------------------------- |
270 // ---------------------------------------------------------------------------- |
226 // CalenServicesImpl::RequestActivationL |
271 // CCalenServicesImpl::Context |
|
272 // Returns the context. |
|
273 // (other items were commented in a header). |
|
274 // ---------------------------------------------------------------------------- |
|
275 // |
|
276 MCalenContext& CCalenServicesImpl::Context() |
|
277 { |
|
278 TRACE_ENTRY_POINT; |
|
279 |
|
280 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
|
281 |
|
282 TRACE_EXIT_POINT; |
|
283 return iGlobalData->Context(); |
|
284 } |
|
285 |
|
286 // ---------------------------------------------------------------------------- |
|
287 // CCalenServicesImpl::RequestActivationL |
227 // Request activation of a specific view |
288 // Request activation of a specific view |
228 // (other items were commented in a header). |
289 // (other items were commented in a header). |
229 // ---------------------------------------------------------------------------- |
290 // ---------------------------------------------------------------------------- |
230 // |
291 // |
231 void CalenServicesImpl::RequestActivationL( const TVwsViewId& /*aViewId*/ ) |
292 void CCalenServicesImpl::RequestActivationL( const TVwsViewId& aViewId ) |
232 { |
293 { |
233 OstTraceFunctionEntry0( CALENSERVICESIMPL_REQUESTACTIVATIONL_ENTRY ); |
294 TRACE_ENTRY_POINT; |
234 //ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
295 |
235 // iController->RequestActivationL( aViewId ); |
296 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
236 |
297 iController->RequestActivationL( aViewId ); |
237 OstTraceFunctionExit0( CALENSERVICESIMPL_REQUESTACTIVATIONL_EXIT ); |
298 |
238 } |
299 TRACE_EXIT_POINT; |
239 |
300 } |
240 // ---------------------------------------------------------------------------- |
301 |
241 // CalenServicesImpl::ActivationNotificationL |
302 // ---------------------------------------------------------------------------- |
|
303 // CCalenServicesImpl::ActivationNotificationL |
242 // Notify Calendar that a specific view has been activated |
304 // Notify Calendar that a specific view has been activated |
243 // (other items were commented in a header). |
305 // (other items were commented in a header). |
244 // ---------------------------------------------------------------------------- |
306 // ---------------------------------------------------------------------------- |
245 // |
307 // |
246 void CalenServicesImpl::ActivationNotificationL( const TVwsViewId& /*aViewId*/ ) |
308 void CCalenServicesImpl::ActivationNotificationL( const TVwsViewId& /*aViewId*/ ) |
247 { |
309 { |
248 OstTraceFunctionEntry0( CALENSERVICESIMPL_ACTIVATIONNOTIFICATIONL_ENTRY ); |
310 TRACE_ENTRY_POINT; |
249 |
311 |
250 //ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
312 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
251 OstTraceFunctionExit0( CALENSERVICESIMPL_ACTIVATIONNOTIFICATIONL_EXIT ); |
313 |
252 } |
314 TRACE_EXIT_POINT; |
253 |
315 } |
254 // ---------------------------------------------------------------------------- |
316 |
255 // CalenServicesImpl::Context |
317 // ---------------------------------------------------------------------------- |
256 // Returns the context. |
318 // CCalenServicesImpl::OfferMenuPaneL |
257 // (other items were commented in a header). |
319 // Offers the menu pane to plugins for customisation |
258 // ---------------------------------------------------------------------------- |
320 // (other items were commented in a header). |
259 // |
321 // ---------------------------------------------------------------------------- |
260 MCalenContext& CalenServicesImpl::Context() |
322 // |
261 { |
323 void CCalenServicesImpl::OfferMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) |
262 OstTraceFunctionEntry0( CALENSERVICESIMPL_CONTEXT_ENTRY ); |
324 { |
263 |
325 TRACE_ENTRY_POINT; |
264 ASSERT( iController ); // Make sure ConstructL has been called. |
326 |
265 |
327 iController->OfferMenuPaneL( aResourceId, aMenuPane ); |
266 OstTraceFunctionExit0( CALENSERVICESIMPL_CONTEXT_EXIT ); |
328 |
267 return iController->context(); |
329 TRACE_EXIT_POINT; |
|
330 } |
|
331 |
|
332 // ---------------------------------------------------------------------------- |
|
333 // CCalenServicesImpl::GetCommandRange |
|
334 // Returns the assigned command range |
|
335 // (other items were commented in a header). |
|
336 // ---------------------------------------------------------------------------- |
|
337 // |
|
338 void CCalenServicesImpl::GetCommandRange( TInt& aCommandRangeStart, |
|
339 TInt& aCommandRangeEnd ) const |
|
340 { |
|
341 TRACE_ENTRY_POINT; |
|
342 |
|
343 aCommandRangeStart = iCommandRangeStart; |
|
344 aCommandRangeEnd = iCommandRangeEnd; |
|
345 |
|
346 TRACE_EXIT_POINT; |
268 } |
347 } |
269 |
348 |
270 // ---------------------------------------------------------------------------- |
349 // ---------------------------------------------------------------------------- |
271 // CCalenServicesImpl::Infobar |
350 // CCalenServicesImpl::Infobar |
272 // Descriptor passed to plugins to get customised info bar text |
351 // Descriptor passed to plugins to get customised info bar text |
273 // (other items were commented in a header). |
352 // (other items were commented in a header). |
274 // ---------------------------------------------------------------------------- |
353 // ---------------------------------------------------------------------------- |
275 // |
354 // |
276 HbWidget* CalenServicesImpl::Infobar( ) |
355 CCoeControl* CCalenServicesImpl::Infobar(const TRect& aRect ) |
277 { |
356 { |
278 OstTraceFunctionEntry0( CALENSERVICESIMPL_INFOBAR_ENTRY ); |
357 TRACE_ENTRY_POINT; |
|
358 |
|
359 TRACE_EXIT_POINT; |
|
360 return iController->Infobar( aRect ); |
|
361 } |
|
362 |
|
363 // ---------------------------------------------------------------------------- |
|
364 // CCalenServicesImpl::Infobar |
|
365 // Returns the customized text from plugin |
|
366 // (other items were commented in a header). |
|
367 // ---------------------------------------------------------------------------- |
|
368 // |
|
369 const TDesC& CCalenServicesImpl::Infobar() |
|
370 { |
|
371 TRACE_ENTRY_POINT; |
|
372 TRACE_EXIT_POINT; |
|
373 return iController->Infobar(); |
|
374 } |
|
375 |
|
376 // ---------------------------------------------------------------------------- |
|
377 // CCalenServicesImpl::CustomPreviewPaneL |
|
378 // Returns the customized Preview pane |
|
379 // (other items were commented in a header). |
|
380 // ---------------------------------------------------------------------------- |
|
381 // |
|
382 MCalenPreview* CCalenServicesImpl::CustomPreviewPaneL( TRect& aRect ) |
|
383 { |
|
384 TRACE_ENTRY_POINT; |
|
385 TRACE_EXIT_POINT; |
|
386 return iController->CustomPreviewPaneL( aRect ); |
|
387 } |
|
388 |
|
389 // ---------------------------------------------------------------------------- |
|
390 // CCalenServicesImpl::PreviewPane |
|
391 // Descriptor passed to plugins to get customised info bar text |
|
392 // (other items were commented in a header). |
|
393 // ---------------------------------------------------------------------------- |
|
394 // |
|
395 CCoeControl* CCalenServicesImpl::PreviewPane( TRect& aRect ) |
|
396 { |
|
397 TRACE_ENTRY_POINT; |
|
398 |
|
399 TRACE_EXIT_POINT; |
|
400 return iController->PreviewPane( aRect ); |
|
401 } |
|
402 |
|
403 // ---------------------------------------------------------------------------- |
|
404 // CCalenServicesImpl::ToolbarOrNull |
|
405 // Provides access to the calendar toolbar if one is available |
|
406 // ---------------------------------------------------------------------------- |
|
407 MCalenToolbar* CCalenServicesImpl::ToolbarOrNull() |
|
408 { |
|
409 TRACE_ENTRY_POINT; |
|
410 |
|
411 TRACE_EXIT_POINT; |
|
412 return iController->ViewManager().ToolbarOrNull(); |
|
413 } |
279 |
414 |
280 OstTraceFunctionExit0( CALENSERVICESIMPL_INFOBAR_EXIT ); |
415 // ---------------------------------------------------------------------------- |
281 return iController->Infobar(); |
416 // CCalenServicesImpl::GetIconL |
282 } |
417 // Get icon of specific type |
283 // ---------------------------------------------------------------------------- |
418 // (other items were commented in a header). |
284 // CCalenServicesImpl::InfobarTextL |
419 // ---------------------------------------------------------------------------- |
285 // @returns info bar text |
420 // |
286 // (other items were commented in a header). |
421 CGulIcon* CCalenServicesImpl::GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId ) |
287 // ---------------------------------------------------------------------------- |
422 { |
288 // |
423 TRACE_ENTRY_POINT; |
289 QString* CalenServicesImpl::InfobarTextL() |
424 |
290 { |
425 TRACE_EXIT_POINT; |
291 OstTraceFunctionEntry0( CALENSERVICESIMPL_INFOBARTEXTL_ENTRY ); |
426 return iController->GetIconL( aIndex, aViewId ); |
292 |
427 } |
293 OstTraceFunctionExit0( CALENSERVICESIMPL_INFOBARTEXTL_EXIT ); |
428 |
294 return iController->InfobarTextL(); |
429 // ---------------------------------------------------------------------------- |
295 } |
430 // CCalenServicesImpl::QueueKeyEvent |
296 // ---------------------------------------------------------------------------- |
431 // Queue key events |
297 // CalenServicesImpl::GetCommandRange |
432 // (other items were commented in a header). |
298 // Returns the assigned command range |
433 // ---------------------------------------------------------------------------- |
299 // (other items were commented in a header). |
434 // |
300 // ---------------------------------------------------------------------------- |
435 TBool CCalenServicesImpl::QueueKeyEvent( const TKeyEvent& aEvent, |
301 // |
436 TEventCode aType ) |
302 void CalenServicesImpl::GetCommandRange( TInt& aCommandRangeStart, |
437 { |
303 TInt& aCommandRangeEnd ) const |
438 TRACE_ENTRY_POINT; |
304 { |
439 |
305 OstTraceFunctionEntry0( CALENSERVICESIMPL_GETCOMMANDRANGE_ENTRY ); |
440 TRACE_EXIT_POINT; |
306 |
441 return iGlobalData->QueueKeyEvent( aEvent, aType ); |
307 aCommandRangeStart = iCommandRangeStart; |
442 } |
308 aCommandRangeEnd = iCommandRangeEnd; |
443 |
309 |
444 // ---------------------------------------------------------------------------- |
310 OstTraceFunctionExit0( CALENSERVICESIMPL_GETCOMMANDRANGE_EXIT ); |
445 // CCalenServicesImpl::GetQueuedKeyEventL |
311 } |
446 // Get queued key events |
312 // ---------------------------------------------------------------------------- |
447 // (other items were commented in a header). |
313 // CalenServicesImpl::OfferMenu |
448 // ---------------------------------------------------------------------------- |
314 // Offers the menu to plugins for customisation |
449 // |
315 // (other items were commented in a header). |
450 TBool CCalenServicesImpl::GetQueuedKeyEvent( TKeyEvent& aEvent, |
316 // ---------------------------------------------------------------------------- |
451 TEventCode& aType ) |
317 // |
452 { |
318 void CalenServicesImpl::OfferMenu(HbMenu* aHbMenu ) |
453 TRACE_ENTRY_POINT; |
319 { |
454 |
320 OstTraceFunctionEntry0( CALENSERVICESIMPL_OFFERMENU_ENTRY ); |
455 TRACE_EXIT_POINT; |
321 |
456 return iGlobalData->GetQueuedKeyEvent( aEvent, aType ); |
322 iController->OfferMenu(aHbMenu); |
457 } |
323 |
458 |
324 OstTraceFunctionExit0( CALENSERVICESIMPL_OFFERMENU_EXIT ); |
459 // ---------------------------------------------------------------------------- |
325 } |
460 // CCalenServicesImpl::ResetKeyEventQueue |
326 |
461 // reset key event queue |
327 // ---------------------------------------------------------------------------- |
462 // (other items were commented in a header). |
328 // CalenServicesImpl::agendaInterface |
463 // ---------------------------------------------------------------------------- |
329 // returns the interface to the agenda database |
464 // |
330 // (other items were commented in a header). |
465 void CCalenServicesImpl::ResetKeyEventQueue() |
331 // ---------------------------------------------------------------------------- |
466 { |
332 // |
467 TRACE_ENTRY_POINT; |
333 AgendaUtil* CalenServicesImpl::agendaInterface() |
468 |
334 { |
469 iGlobalData->ResetKeyEventQueue(); |
335 OstTraceFunctionEntry0( CALENSERVICESIMPL_AGENDAINTERFACE_ENTRY ); |
470 |
336 |
471 TRACE_EXIT_POINT; |
337 OstTraceFunctionExit0( CALENSERVICESIMPL_AGENDAINTERFACE_EXIT ); |
472 } |
338 return iController->agendaInterface(); |
473 |
339 |
474 // ---------------------------------------------------------------------------- |
340 } |
475 // CCalenController::MissedAlarmStore |
341 |
476 // Returns a reference to the Missed Alarm Store |
342 // ---------------------------------------------------------------------------- |
477 // ---------------------------------------------------------------------------- |
343 // CalenServicesImpl::getFirstView |
478 CMissedAlarmStore* CCalenServicesImpl::MissedAlarmStore() |
344 // returns the first view with which calendar has been launched |
479 { |
345 // (other items were commented in a header). |
480 TRACE_ENTRY_POINT; |
346 // ---------------------------------------------------------------------------- |
481 TRACE_EXIT_POINT; |
347 // |
482 return iController->MissedAlarmStore(); |
348 int CalenServicesImpl::getFirstView() |
483 } |
349 { |
484 |
350 OstTraceFunctionEntry0( CALENSERVICESIMPL_GETFIRSTVIEW_ENTRY ); |
485 // ---------------------------------------------------------------------------- |
351 |
486 // CCalenServicesImpl::GetMissedAlarmsList |
352 OstTraceFunctionExit0( CALENSERVICESIMPL_GETFIRSTVIEW_EXIT ); |
487 // Get missed alarms list |
353 return iController->getFirstView(); |
488 // ---------------------------------------------------------------------------- |
354 } |
489 void CCalenServicesImpl::GetMissedAlarmsList(RArray<TCalenInstanceId>& aMissedAlarmsList) |
|
490 { |
|
491 TRACE_ENTRY_POINT; |
|
492 TRACE_EXIT_POINT; |
|
493 return iController->GetMissedAlarmsList(aMissedAlarmsList); |
|
494 } |
|
495 |
|
496 // ---------------------------------------------------------------------------- |
|
497 // CCalenServicesImpl::GetAttachmentData |
|
498 // returns ref of CCalenAttachmentModel |
|
499 // (other items were commented in a header). |
|
500 // ---------------------------------------------------------------------------- |
|
501 // |
|
502 CCalenAttachmentModel* CCalenServicesImpl::GetAttachmentData() |
|
503 { |
|
504 TRACE_ENTRY_POINT; |
|
505 TRACE_EXIT_POINT; |
|
506 return &iController->AttachmentData(); |
|
507 } |
|
508 |
|
509 // ---------------------------------------------------------------------------- |
|
510 // CCalenServicesImpl::SessionL |
|
511 // Retrieve the calendar session currently in use by Calendar |
|
512 // (other items were commented in a header). |
|
513 // ---------------------------------------------------------------------------- |
|
514 // |
|
515 CCalSession& CCalenServicesImpl::SessionL(const TDesC& aCalendar ) |
|
516 { |
|
517 TRACE_ENTRY_POINT; |
|
518 |
|
519 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
|
520 |
|
521 TRACE_EXIT_POINT; |
|
522 return iGlobalData->CalSessionL(aCalendar); |
|
523 } |
|
524 |
|
525 // ---------------------------------------------------------------------------- |
|
526 // CCalenServicesImpl::EntryViewL |
|
527 // Retrieve the calendar entry view currently in use by Calendar |
|
528 // (other items were commented in a header). |
|
529 // ---------------------------------------------------------------------------- |
|
530 // |
|
531 CCalEntryView* CCalenServicesImpl::EntryViewL(const TCalCollectionId aCollectionId ) |
|
532 { |
|
533 TRACE_ENTRY_POINT; |
|
534 |
|
535 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
|
536 |
|
537 TRACE_EXIT_POINT; |
|
538 return iGlobalData->EntryViewL(aCollectionId); |
|
539 } |
|
540 |
|
541 // ---------------------------------------------------------------------------- |
|
542 // CCalenServicesImpl::InstanceViewL |
|
543 // Retrieve the calendar instance view currently in use by Calendar |
|
544 // (other items were commented in a header). |
|
545 // ---------------------------------------------------------------------------- |
|
546 // |
|
547 CCalInstanceView* CCalenServicesImpl::InstanceViewL( |
|
548 const RArray<TInt>& aCollectionIds) |
|
549 { |
|
550 TRACE_ENTRY_POINT; |
|
551 |
|
552 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
|
553 |
|
554 TRACE_EXIT_POINT; |
|
555 return iGlobalData->InstanceViewL(aCollectionIds); |
|
556 } |
|
557 |
|
558 // ----------------------------------------------------------------------------- |
|
559 // CCalenGlobalData::GetAllCalendarInfoL |
|
560 // Get all available calendar info |
|
561 // ----------------------------------------------------------------------------- |
|
562 // |
|
563 void CCalenServicesImpl::GetAllCalendarInfoL( |
|
564 RPointerArray<CCalCalendarInfo>& aCalendarInfoList ) |
|
565 { |
|
566 TRACE_ENTRY_POINT; |
|
567 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
|
568 iGlobalData->GetAllCalendarInfoL(aCalendarInfoList); |
|
569 TRACE_EXIT_POINT; |
|
570 } |
|
571 |
|
572 // ----------------------------------------------------------------------------- |
|
573 // CCalenGlobalData::GetCalFileNameForCollectionId |
|
574 // Get calendar file name for the given collection id |
|
575 // ----------------------------------------------------------------------------- |
|
576 // |
|
577 const TDesC& CCalenServicesImpl::GetCalFileNameForCollectionId( |
|
578 const TCalCollectionId aCollectionId) |
|
579 { |
|
580 TRACE_ENTRY_POINT; |
|
581 ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
|
582 TRACE_EXIT_POINT; |
|
583 return iGlobalData->GetCalFileNameForCollectionId(aCollectionId); |
|
584 } |
355 |
585 |
356 // End of file |
586 // End of file |