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