|
1 /* |
|
2 * Copyright (c) 2007 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: Implementation of Calendar services |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <gulicon.h> |
|
19 |
|
20 #include "calendarui_debug.h" |
|
21 #include "calendummyservices.h" |
|
22 #include "calenglobaldata.h" |
|
23 #include <mcalenpreview.h> |
|
24 |
|
25 // ---------------------------------------------------------------------------- |
|
26 // CCalenDummyServices::CCalenDummyServices |
|
27 // C++ constructor. |
|
28 // (other items were commented in a header). |
|
29 // ---------------------------------------------------------------------------- |
|
30 // |
|
31 CCalenDummyServices::CCalenDummyServices( CCalenGlobalData& aGlobalData ) |
|
32 : iGlobalData( aGlobalData ) |
|
33 { |
|
34 TRACE_ENTRY_POINT; |
|
35 TRACE_EXIT_POINT; |
|
36 } |
|
37 |
|
38 // ---------------------------------------------------------------------------- |
|
39 // CCalenDummyServices::~CCalenDummyServices |
|
40 // Destructor |
|
41 // (other items were commented in a header). |
|
42 // ---------------------------------------------------------------------------- |
|
43 // |
|
44 CCalenDummyServices::~CCalenDummyServices() |
|
45 { |
|
46 TRACE_ENTRY_POINT; |
|
47 TRACE_EXIT_POINT; |
|
48 } |
|
49 |
|
50 // ---------------------------------------------------------------------------- |
|
51 // CCalenDummyServices::Release |
|
52 // Cleans resources |
|
53 // (other items were commented in a header). |
|
54 // ---------------------------------------------------------------------------- |
|
55 // |
|
56 void CCalenDummyServices::Release() |
|
57 { |
|
58 TRACE_ENTRY_POINT; |
|
59 delete this; |
|
60 TRACE_EXIT_POINT; |
|
61 } |
|
62 |
|
63 // ---------------------------------------------------------------------------- |
|
64 // CCalenDummyServices::SessionL |
|
65 // Retrieve the calendar session currently in use by Calendar |
|
66 // (other items were commented in a header). |
|
67 // ---------------------------------------------------------------------------- |
|
68 // |
|
69 CCalSession& CCalenDummyServices::SessionL() |
|
70 { |
|
71 TRACE_ENTRY_POINT; |
|
72 TRACE_EXIT_POINT; |
|
73 return iGlobalData.CalSessionL(); |
|
74 } |
|
75 |
|
76 // ---------------------------------------------------------------------------- |
|
77 // CCalenDummyServices::EntryViewL |
|
78 // Retrieve the calendar entry view currently in use by Calendar |
|
79 // (other items were commented in a header). |
|
80 // ---------------------------------------------------------------------------- |
|
81 // |
|
82 CCalEntryView* CCalenDummyServices::EntryViewL() |
|
83 { |
|
84 TRACE_ENTRY_POINT; |
|
85 TRACE_EXIT_POINT; |
|
86 return iGlobalData.EntryViewL(); |
|
87 } |
|
88 |
|
89 // ---------------------------------------------------------------------------- |
|
90 // CCalenDummyServices::InstanceViewL |
|
91 // Retrieve the calendar instance view currently in use by Calendar |
|
92 // (other items were commented in a header). |
|
93 // ---------------------------------------------------------------------------- |
|
94 // |
|
95 CCalInstanceView* CCalenDummyServices::InstanceViewL() |
|
96 { |
|
97 TRACE_ENTRY_POINT; |
|
98 TRACE_EXIT_POINT; |
|
99 return iGlobalData.InstanceViewL(); |
|
100 } |
|
101 |
|
102 // ---------------------------------------------------------------------------- |
|
103 // CCalenDummyServices::SessionL |
|
104 // Retrieve the calendar session currently in use by Calendar |
|
105 // (other items were commented in a header). |
|
106 // ---------------------------------------------------------------------------- |
|
107 // |
|
108 CCalSession& CCalenDummyServices::SessionL(const TDesC& aCalendar ) |
|
109 { |
|
110 TRACE_ENTRY_POINT; |
|
111 TRACE_EXIT_POINT; |
|
112 return iGlobalData.CalSessionL(aCalendar); |
|
113 } |
|
114 |
|
115 CCalEntryView* CCalenDummyServices::EntryViewL(const TCalCollectionId aCollectionId) |
|
116 { |
|
117 TRACE_ENTRY_POINT; |
|
118 TRACE_EXIT_POINT; |
|
119 return iGlobalData.EntryViewL(aCollectionId); |
|
120 } |
|
121 |
|
122 // ---------------------------------------------------------------------------- |
|
123 // CCalenDummyServices::InstanceViewL |
|
124 // Retrieve the calendar instance view currently in use by Calendar |
|
125 // (other items were commented in a header). |
|
126 // ---------------------------------------------------------------------------- |
|
127 // |
|
128 CCalInstanceView* CCalenDummyServices::InstanceViewL( |
|
129 const RArray<TInt>& aCollectionIds ) |
|
130 { |
|
131 TRACE_ENTRY_POINT; |
|
132 TRACE_EXIT_POINT; |
|
133 return iGlobalData.InstanceViewL(aCollectionIds); |
|
134 } |
|
135 |
|
136 |
|
137 // ---------------------------------------------------------------------------- |
|
138 // CCalenDummyServices::RegisterForNotificationsL |
|
139 // Register for notifications of Calendar events |
|
140 // (other items were commented in a header). |
|
141 // ---------------------------------------------------------------------------- |
|
142 // |
|
143 void CCalenDummyServices::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
|
144 TCalenNotification /*aNotification*/ ) |
|
145 { |
|
146 TRACE_ENTRY_POINT; |
|
147 |
|
148 iHandler = aHandler; |
|
149 |
|
150 TRACE_EXIT_POINT; |
|
151 } |
|
152 |
|
153 // ---------------------------------------------------------------------------- |
|
154 // CCalenDummyServices::RegisterForNotificationsL |
|
155 // Register for notifications of Calendar events |
|
156 // (other items were commented in a header). |
|
157 // ---------------------------------------------------------------------------- |
|
158 // |
|
159 void CCalenDummyServices::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
|
160 RArray<TCalenNotification>& /*aNotifications*/ ) |
|
161 { |
|
162 TRACE_ENTRY_POINT; |
|
163 |
|
164 iHandler = aHandler; |
|
165 |
|
166 TRACE_EXIT_POINT; |
|
167 } |
|
168 |
|
169 // ---------------------------------------------------------------------------- |
|
170 // CCalenDummyServices::CancelNotifications |
|
171 // Cancel notifications of Calendar events |
|
172 // (other items were commented in a header). |
|
173 // ---------------------------------------------------------------------------- |
|
174 // |
|
175 void CCalenDummyServices::CancelNotifications( MCalenNotificationHandler* /*aHandler*/ ) |
|
176 { |
|
177 TRACE_ENTRY_POINT; |
|
178 TRACE_EXIT_POINT; |
|
179 } |
|
180 |
|
181 // ---------------------------------------------------------------------------- |
|
182 // CCalenDummyServices::IssueCommandL |
|
183 // Issue a command to be handled by Calendar or a customization |
|
184 // (other items were commented in a header). |
|
185 // ---------------------------------------------------------------------------- |
|
186 // |
|
187 TBool CCalenDummyServices::IssueCommandL( TInt /*aCommand*/ ) |
|
188 { |
|
189 TRACE_ENTRY_POINT; |
|
190 TRACE_EXIT_POINT; |
|
191 return EFalse; |
|
192 } |
|
193 |
|
194 // ---------------------------------------------------------------------------- |
|
195 // CCalenDummyServices::IssueNotificationL |
|
196 // Issue a notification to Calendar, which will be broadcast synchronously |
|
197 // to all registered notification handlers |
|
198 // (other items were commented in a header). |
|
199 // ---------------------------------------------------------------------------- |
|
200 // |
|
201 void CCalenDummyServices::IssueNotificationL( TCalenNotification aNotification ) |
|
202 { |
|
203 TRACE_ENTRY_POINT; |
|
204 |
|
205 if ( iHandler ) |
|
206 { |
|
207 iHandler->HandleNotification( aNotification ); |
|
208 } |
|
209 |
|
210 TRACE_EXIT_POINT; |
|
211 } |
|
212 |
|
213 // ---------------------------------------------------------------------------- |
|
214 // CCalenDummyServices::Context |
|
215 // Returns the context. |
|
216 // (other items were commented in a header). |
|
217 // ---------------------------------------------------------------------------- |
|
218 // |
|
219 MCalenContext& CCalenDummyServices::Context() |
|
220 { |
|
221 TRACE_ENTRY_POINT; |
|
222 TRACE_EXIT_POINT; |
|
223 return iGlobalData.Context(); |
|
224 } |
|
225 |
|
226 // ---------------------------------------------------------------------------- |
|
227 // CCalenDummyServices::RequestActivationL |
|
228 // Request activation of a specific view |
|
229 // (other items were commented in a header). |
|
230 // ---------------------------------------------------------------------------- |
|
231 // |
|
232 void CCalenDummyServices::RequestActivationL( const TVwsViewId& /*aViewId*/ ) |
|
233 { |
|
234 TRACE_ENTRY_POINT; |
|
235 TRACE_EXIT_POINT; |
|
236 } |
|
237 |
|
238 // ---------------------------------------------------------------------------- |
|
239 // CCalenDummyServices::ActivationNotificationL |
|
240 // Notify Calendar that a specific view has been activated |
|
241 // (other items were commented in a header). |
|
242 // ---------------------------------------------------------------------------- |
|
243 // |
|
244 void CCalenDummyServices::ActivationNotificationL( const TVwsViewId& /*aViewId*/ ) |
|
245 { |
|
246 TRACE_ENTRY_POINT; |
|
247 TRACE_EXIT_POINT; |
|
248 } |
|
249 |
|
250 // ---------------------------------------------------------------------------- |
|
251 // CCalenDummyServices::OfferMenuPaneL |
|
252 // Offers the menu pane to plugins for customisation |
|
253 // (other items were commented in a header). |
|
254 // ---------------------------------------------------------------------------- |
|
255 // |
|
256 void CCalenDummyServices::OfferMenuPaneL( TInt /*aResourceId*/, |
|
257 CEikMenuPane* /*aMenuPane*/ ) |
|
258 { |
|
259 TRACE_ENTRY_POINT; |
|
260 TRACE_EXIT_POINT; |
|
261 } |
|
262 |
|
263 // ---------------------------------------------------------------------------- |
|
264 // CCalenDummyServices::GetCommandRange |
|
265 // Gets the command range that has been allocated to this MCalenServices |
|
266 // instance |
|
267 // (other items were commented in a header). |
|
268 // ---------------------------------------------------------------------------- |
|
269 // |
|
270 void CCalenDummyServices::GetCommandRange( TInt& /*aCommandRangeStart*/, |
|
271 TInt& /*aCommandRangeEnd*/ ) const |
|
272 { |
|
273 TRACE_ENTRY_POINT; |
|
274 TRACE_EXIT_POINT; |
|
275 } |
|
276 |
|
277 // ---------------------------------------------------------------------------- |
|
278 // CCalenDummyServices::Infobar |
|
279 // Descriptor past to plugins to get customised info bar text |
|
280 // (other items were commented in a header). |
|
281 // ---------------------------------------------------------------------------- |
|
282 // |
|
283 CCoeControl* CCalenDummyServices::Infobar( const TRect& /*aRect*/ ) |
|
284 { |
|
285 TRACE_ENTRY_POINT; |
|
286 TRACE_EXIT_POINT; |
|
287 return NULL; |
|
288 } |
|
289 |
|
290 // ---------------------------------------------------------------------------- |
|
291 // CCalenDummyServices::Infobar |
|
292 // Descriptor past to plugins to get customised info bar text |
|
293 // (other items were commented in a header). |
|
294 // ---------------------------------------------------------------------------- |
|
295 // |
|
296 const TDesC& CCalenDummyServices::Infobar() |
|
297 { |
|
298 TRACE_ENTRY_POINT; |
|
299 const TDesC& nullDesc = _L(" "); |
|
300 TRACE_EXIT_POINT; |
|
301 return nullDesc; |
|
302 } |
|
303 |
|
304 // ---------------------------------------------------------------------------- |
|
305 // CCalenDummyServices::CustomPreviewPaneL |
|
306 // (other items were commented in a header). |
|
307 // ---------------------------------------------------------------------------- |
|
308 // |
|
309 MCalenPreview* CCalenDummyServices::CustomPreviewPaneL( TRect& /*aRect*/ ) |
|
310 { |
|
311 TRACE_ENTRY_POINT |
|
312 TRACE_EXIT_POINT |
|
313 return NULL; |
|
314 } |
|
315 // ---------------------------------------------------------------------------- |
|
316 // CCalenDummyServices::PreviewPane |
|
317 // Descriptor past to plugins to get customised info bar text |
|
318 // (other items were commented in a header). |
|
319 // ---------------------------------------------------------------------------- |
|
320 // |
|
321 CCoeControl* CCalenDummyServices::PreviewPane( TRect& /*aRect*/ ) |
|
322 { |
|
323 TRACE_ENTRY_POINT; |
|
324 TRACE_EXIT_POINT; |
|
325 return NULL; |
|
326 } |
|
327 |
|
328 // ---------------------------------------------------------------------------- |
|
329 // CCalenServicesImpl::GetIconL |
|
330 // Get icon of specific type |
|
331 // (other items were commented in a header). |
|
332 // ---------------------------------------------------------------------------- |
|
333 // |
|
334 CGulIcon* CCalenDummyServices::GetIconL( MCalenServices::TCalenIcons /*aIndex*/ ) |
|
335 { |
|
336 TRACE_ENTRY_POINT; |
|
337 TRACE_EXIT_POINT; |
|
338 return NULL; |
|
339 } |
|
340 |
|
341 // ---------------------------------------------------------------------------- |
|
342 // CCalenServicesImpl::QueueKeyEventL |
|
343 // Queue key events |
|
344 // (other items were commented in a header). |
|
345 // ---------------------------------------------------------------------------- |
|
346 // |
|
347 TBool CCalenDummyServices::QueueKeyEvent( const TKeyEvent& /*aEvent*/, TEventCode /*aType*/ ) |
|
348 { |
|
349 TRACE_ENTRY_POINT; |
|
350 TRACE_EXIT_POINT; |
|
351 return ETrue; |
|
352 } |
|
353 |
|
354 // ---------------------------------------------------------------------------- |
|
355 // CCalenServicesImpl::GetQueuedKeyEventL |
|
356 // Get queued key events |
|
357 // (other items were commented in a header). |
|
358 // ---------------------------------------------------------------------------- |
|
359 // |
|
360 TBool CCalenDummyServices::GetQueuedKeyEvent( TKeyEvent& /*aEvent*/, TEventCode& /*aType*/ ) |
|
361 { |
|
362 TRACE_ENTRY_POINT; |
|
363 TRACE_EXIT_POINT; |
|
364 return ETrue; |
|
365 } |
|
366 |
|
367 // ---------------------------------------------------------------------------- |
|
368 // CCalenServicesImpl::ResetKeyEventQueue |
|
369 // reset key event queue |
|
370 // (other items were commented in a header). |
|
371 // ---------------------------------------------------------------------------- |
|
372 // |
|
373 void CCalenDummyServices::ResetKeyEventQueue() |
|
374 { |
|
375 TRACE_ENTRY_POINT; |
|
376 |
|
377 TRACE_EXIT_POINT; |
|
378 } |
|
379 |
|
380 // ---------------------------------------------------------------------------- |
|
381 // CCalenServicesImpl::InterimUtilsL() |
|
382 // Retrieve interimutils from globaldata |
|
383 // (other items were commented in a header). |
|
384 // ---------------------------------------------------------------------------- |
|
385 // |
|
386 CCalenInterimUtils2& CCalenDummyServices::InterimUtilsL() |
|
387 { |
|
388 TRACE_ENTRY_POINT; |
|
389 TRACE_EXIT_POINT; |
|
390 return iGlobalData.InterimUtilsL(); |
|
391 } |
|
392 |
|
393 // ---------------------------------------------------------------------------- |
|
394 // CCalenDummyServices::ToolbarOrNull() |
|
395 // Always returns NULL, CCalenDummyServices will never have a toolbar |
|
396 // ---------------------------------------------------------------------------- |
|
397 MCalenToolbar* CCalenDummyServices::ToolbarOrNull() |
|
398 { |
|
399 TRACE_ENTRY_POINT; |
|
400 TRACE_EXIT_POINT; |
|
401 return NULL; |
|
402 } |
|
403 |
|
404 // ---------------------------------------------------------------------------- |
|
405 // CCalenDummyServices::MissedAlarmStore() |
|
406 // Always returns NULL, CCalenDummyServices will not use MissedAlarmStore |
|
407 // ---------------------------------------------------------------------------- |
|
408 CMissedAlarmStore* CCalenDummyServices::MissedAlarmStore() |
|
409 { |
|
410 TRACE_ENTRY_POINT; |
|
411 TRACE_EXIT_POINT; |
|
412 return NULL; |
|
413 } |
|
414 |
|
415 // ---------------------------------------------------------------------------- |
|
416 // CCalenDummyServices::GetMissedAlarmsList() |
|
417 // Always returns NULL, CCalenDummyServices will not use MissedAlarmslist |
|
418 // ---------------------------------------------------------------------------- |
|
419 void CCalenDummyServices::GetMissedAlarmsList(RArray<TCalenInstanceId>& /*aMissedAlarmsList*/) |
|
420 { |
|
421 TRACE_ENTRY_POINT; |
|
422 TRACE_EXIT_POINT; |
|
423 } |
|
424 |
|
425 // ---------------------------------------------------------------------------- |
|
426 // CCalenDummyServices::GetMultipleCalendarData |
|
427 // (other items were commented in a header). |
|
428 // ---------------------------------------------------------------------------- |
|
429 // |
|
430 CCalenAttachmentModel* CCalenDummyServices::GetAttachmentData() |
|
431 { |
|
432 TRACE_ENTRY_POINT; |
|
433 TRACE_EXIT_POINT; |
|
434 return NULL; |
|
435 } |
|
436 |
|
437 // ---------------------------------------------------------------------------- |
|
438 // CCalenDummyServices::GetAllCalendarInfoL |
|
439 // Get all available calendar info |
|
440 // ---------------------------------------------------------------------------- |
|
441 // |
|
442 void CCalenDummyServices::GetAllCalendarInfoL( |
|
443 RPointerArray<CCalCalendarInfo>& aCalendarInfoList ) |
|
444 { |
|
445 TRACE_ENTRY_POINT; |
|
446 iGlobalData.GetAllCalendarInfoL(aCalendarInfoList); |
|
447 TRACE_EXIT_POINT; |
|
448 } |
|
449 |
|
450 // ---------------------------------------------------------------------------- |
|
451 // CCalenDummyServices::GetCalFileNameForCollectionId |
|
452 // Gets calendar filename from collection id |
|
453 // ---------------------------------------------------------------------------- |
|
454 // |
|
455 const TDesC& CCalenDummyServices::GetCalFileNameForCollectionId( |
|
456 const TCalCollectionId aCollectionId) |
|
457 { |
|
458 TRACE_ENTRY_POINT;TRACE_EXIT_POINT; |
|
459 return iGlobalData.GetCalFileNameForCollectionId(aCollectionId); |
|
460 } |
|
461 // End of file |