34 // ---------------------------------------------------------------------------- |
38 // ---------------------------------------------------------------------------- |
35 // |
39 // |
36 CalenServicesImpl* CalenServicesImpl::NewL( TInt aCommandRangeStart, |
40 CalenServicesImpl* CalenServicesImpl::NewL( TInt aCommandRangeStart, |
37 TInt aCommandRangeEnd ) |
41 TInt aCommandRangeEnd ) |
38 { |
42 { |
39 TRACE_ENTRY_POINT; |
43 OstTraceFunctionEntry0( CALENSERVICESIMPL_NEWL_ENTRY ); |
40 CalenServicesImpl* self = new( ELeave ) CalenServicesImpl( |
44 CalenServicesImpl* self = new( ELeave ) CalenServicesImpl( |
41 aCommandRangeStart, aCommandRangeEnd ); |
45 aCommandRangeStart, aCommandRangeEnd ); |
42 |
46 |
43 CleanupStack::PushL( self ); |
47 CleanupStack::PushL( self ); |
44 self->ConstructL(); |
48 self->ConstructL(); |
45 CleanupStack::Pop( self ); |
49 CleanupStack::Pop( self ); |
46 |
50 |
47 TRACE_EXIT_POINT; |
51 OstTraceFunctionExit0( CALENSERVICESIMPL_NEWL_EXIT ); |
48 return self; |
52 return self; |
49 } |
53 } |
50 |
54 |
51 // ---------------------------------------------------------------------------- |
55 // ---------------------------------------------------------------------------- |
52 // CalenServicesImpl::NewL |
56 // CalenServicesImpl::NewL |
54 // (other items were commented in a header). |
58 // (other items were commented in a header). |
55 // ---------------------------------------------------------------------------- |
59 // ---------------------------------------------------------------------------- |
56 // |
60 // |
57 CalenServicesImpl* CalenServicesImpl::NewL() |
61 CalenServicesImpl* CalenServicesImpl::NewL() |
58 { |
62 { |
59 TRACE_ENTRY_POINT; |
63 OstTraceFunctionEntry0( DUP1_CALENSERVICESIMPL_NEWL_ENTRY ); |
|
64 |
60 CalenServicesImpl* self = new( ELeave ) CalenServicesImpl( 0, 0 ); |
65 CalenServicesImpl* self = new( ELeave ) CalenServicesImpl( 0, 0 ); |
61 |
66 |
62 CleanupStack::PushL( self ); |
67 CleanupStack::PushL( self ); |
63 self->ConstructL(); |
68 self->ConstructL(); |
64 CleanupStack::Pop( self ); |
69 CleanupStack::Pop( self ); |
65 |
70 |
66 TRACE_EXIT_POINT; |
71 OstTraceFunctionExit0( DUP1_CALENSERVICESIMPL_NEWL_EXIT ); |
67 return self; |
72 return self; |
68 } |
73 } |
69 |
74 |
70 // ---------------------------------------------------------------------------- |
75 // ---------------------------------------------------------------------------- |
71 // CalenServicesImpl::CalenServicesImpl |
76 // CalenServicesImpl::CalenServicesImpl |
76 CalenServicesImpl::CalenServicesImpl( TInt aCommandRangeStart, |
81 CalenServicesImpl::CalenServicesImpl( TInt aCommandRangeStart, |
77 TInt aCommandRangeEnd ) |
82 TInt aCommandRangeEnd ) |
78 : iCommandRangeStart( aCommandRangeStart ), |
83 : iCommandRangeStart( aCommandRangeStart ), |
79 iCommandRangeEnd( aCommandRangeEnd ) |
84 iCommandRangeEnd( aCommandRangeEnd ) |
80 { |
85 { |
81 TRACE_ENTRY_POINT; |
86 OstTraceFunctionEntry0( CALENSERVICESIMPL_CALENSERVICESIMPL_ENTRY ); |
82 TRACE_EXIT_POINT; |
87 |
|
88 OstTraceFunctionExit0( CALENSERVICESIMPL_CALENSERVICESIMPL_EXIT ); |
83 } |
89 } |
84 |
90 |
85 // ---------------------------------------------------------------------------- |
91 // ---------------------------------------------------------------------------- |
86 // CalenServicesImpl::ConstructL |
92 // CalenServicesImpl::ConstructL |
87 // 2nd phase of construction. |
93 // 2nd phase of construction. |
88 // (other items were commented in a header). |
94 // (other items were commented in a header). |
89 // ---------------------------------------------------------------------------- |
95 // ---------------------------------------------------------------------------- |
90 // |
96 // |
91 void CalenServicesImpl::ConstructL() |
97 void CalenServicesImpl::ConstructL() |
92 { |
98 { |
93 TRACE_ENTRY_POINT; |
99 OstTraceFunctionEntry0( CALENSERVICESIMPL_CONSTRUCTL_ENTRY ); |
94 |
100 |
95 iController = CCalenController::InstanceL(); |
101 iController = CCalenController::InstanceL(); |
96 |
102 |
97 TRACE_EXIT_POINT; |
103 OstTraceFunctionExit0( CALENSERVICESIMPL_CONSTRUCTL_EXIT ); |
98 } |
104 } |
99 |
105 |
100 // ---------------------------------------------------------------------------- |
106 // ---------------------------------------------------------------------------- |
101 // CalenServicesImpl::Release |
107 // CalenServicesImpl::Release |
102 // Performs cleanup of this object. |
108 // Performs cleanup of this object. |
103 // (other items were commented in a header). |
109 // (other items were commented in a header). |
104 // ---------------------------------------------------------------------------- |
110 // ---------------------------------------------------------------------------- |
105 // |
111 // |
106 void CalenServicesImpl::Release() |
112 void CalenServicesImpl::Release() |
107 { |
113 { |
108 TRACE_ENTRY_POINT; |
114 OstTraceFunctionEntry0( CALENSERVICESIMPL_RELEASE_ENTRY ); |
109 |
115 |
110 if( iController ) |
116 if( iController ) |
111 { |
117 { |
112 iController->Release(); |
118 iController->Release(); |
113 } |
119 } |
114 |
120 |
115 delete this; |
121 delete this; |
116 |
122 |
117 TRACE_EXIT_POINT; |
123 OstTraceFunctionExit0( CALENSERVICESIMPL_RELEASE_EXIT ); |
118 } |
124 } |
119 |
125 |
120 // ---------------------------------------------------------------------------- |
126 // ---------------------------------------------------------------------------- |
121 // CalenServicesImpl::SessionL |
127 // CalenServicesImpl::SessionL |
122 // Retrieve the calendar session currently in use by Calendar |
128 // Retrieve the calendar session currently in use by Calendar |
123 // (other items were commented in a header). |
129 // (other items were commented in a header). |
124 // ---------------------------------------------------------------------------- |
130 // ---------------------------------------------------------------------------- |
125 // |
131 // |
126 HbMainWindow& CalenServicesImpl::MainWindow() |
132 HbMainWindow& CalenServicesImpl::MainWindow() |
127 { |
133 { |
128 TRACE_ENTRY_POINT; |
134 OstTraceFunctionEntry0( CALENSERVICESIMPL_MAINWINDOW_ENTRY ); |
129 ASSERT( iController ); // Make sure ConstructL has been called. |
135 |
130 TRACE_EXIT_POINT; |
136 ASSERT( iController ); // Make sure ConstructL has been called. |
|
137 |
|
138 OstTraceFunctionExit0( CALENSERVICESIMPL_MAINWINDOW_EXIT ); |
131 return iController->MainWindow(); |
139 return iController->MainWindow(); |
132 } |
140 } |
133 |
141 |
134 // ---------------------------------------------------------------------------- |
142 // ---------------------------------------------------------------------------- |
135 // CalenServicesImpl::RegisterForNotificationsL |
143 // CalenServicesImpl::RegisterForNotificationsL |
138 // ---------------------------------------------------------------------------- |
146 // ---------------------------------------------------------------------------- |
139 // |
147 // |
140 void CalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
148 void CalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
141 TCalenNotification aNotification ) |
149 TCalenNotification aNotification ) |
142 { |
150 { |
143 TRACE_ENTRY_POINT; |
151 OstTraceFunctionEntry0( CALENSERVICESIMPL_REGISTERFORNOTIFICATIONSL_ENTRY ); |
144 |
152 |
145 ASSERT( iController ); // Make sure ConstructL has been called. |
153 ASSERT( iController ); // Make sure ConstructL has been called. |
146 iController->RegisterForNotificationsL( aHandler, aNotification ); |
154 iController->RegisterForNotificationsL( aHandler, aNotification ); |
147 |
155 |
148 TRACE_EXIT_POINT; |
156 OstTraceFunctionExit0( CALENSERVICESIMPL_REGISTERFORNOTIFICATIONSL_EXIT ); |
149 } |
157 } |
150 |
158 |
151 // ---------------------------------------------------------------------------- |
159 // ---------------------------------------------------------------------------- |
152 // CalenServicesImpl::RegisterForNotificationsL |
160 // CalenServicesImpl::RegisterForNotificationsL |
153 // Register for array notifications of Calendar events |
161 // Register for array notifications of Calendar events |
155 // ---------------------------------------------------------------------------- |
163 // ---------------------------------------------------------------------------- |
156 // |
164 // |
157 void CalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
165 void CalenServicesImpl::RegisterForNotificationsL( MCalenNotificationHandler* aHandler, |
158 RArray<TCalenNotification>& aNotifications ) |
166 RArray<TCalenNotification>& aNotifications ) |
159 { |
167 { |
160 TRACE_ENTRY_POINT; |
168 OstTraceFunctionEntry0( DUP1_CALENSERVICESIMPL_REGISTERFORNOTIFICATIONSL_ENTRY ); |
161 |
169 |
162 ASSERT( iController ); // Make sure ConstructL has been called. |
170 ASSERT( iController ); // Make sure ConstructL has been called. |
163 iController->RegisterForNotificationsL( aHandler, aNotifications ); |
171 iController->RegisterForNotificationsL( aHandler, aNotifications ); |
164 |
172 |
165 TRACE_EXIT_POINT; |
173 OstTraceFunctionExit0( DUP1_CALENSERVICESIMPL_REGISTERFORNOTIFICATIONSL_EXIT ); |
166 } |
174 } |
167 |
175 |
168 // ---------------------------------------------------------------------------- |
176 // ---------------------------------------------------------------------------- |
169 // CalenServicesImpl::CancelNotifications |
177 // CalenServicesImpl::CancelNotifications |
170 // Cancel notifications of Calendar events |
178 // Cancel notifications of Calendar events |
171 // (other items were commented in a header). |
179 // (other items were commented in a header). |
172 // ---------------------------------------------------------------------------- |
180 // ---------------------------------------------------------------------------- |
173 // |
181 // |
174 void CalenServicesImpl::CancelNotifications( MCalenNotificationHandler* aHandler ) |
182 void CalenServicesImpl::CancelNotifications( MCalenNotificationHandler* aHandler ) |
175 { |
183 { |
176 TRACE_ENTRY_POINT; |
184 OstTraceFunctionEntry0( CALENSERVICESIMPL_CANCELNOTIFICATIONS_ENTRY ); |
177 |
185 |
178 ASSERT( iController ); // Make sure ConstructL has been called. |
186 ASSERT( iController ); // Make sure ConstructL has been called. |
179 iController->CancelNotifications( aHandler ); |
187 iController->CancelNotifications( aHandler ); |
180 |
188 |
181 TRACE_EXIT_POINT; |
189 OstTraceFunctionExit0( CALENSERVICESIMPL_CANCELNOTIFICATIONS_EXIT ); |
182 } |
190 } |
183 |
191 |
184 // ---------------------------------------------------------------------------- |
192 // ---------------------------------------------------------------------------- |
185 // CalenServicesImpl::IssueCommandL |
193 // CalenServicesImpl::IssueCommandL |
186 // Issue a command to be handled by Calendar or a customization |
194 // Issue a command to be handled by Calendar or a customization |
187 // (other items were commented in a header). |
195 // (other items were commented in a header). |
188 // ---------------------------------------------------------------------------- |
196 // ---------------------------------------------------------------------------- |
189 // |
197 // |
190 TBool CalenServicesImpl::IssueCommandL( TInt aCommand ) |
198 TBool CalenServicesImpl::IssueCommandL( TInt aCommand ) |
191 { |
199 { |
192 TRACE_ENTRY_POINT; |
200 OstTraceFunctionEntry0( CALENSERVICESIMPL_ISSUECOMMANDL_ENTRY ); |
193 ASSERT( iController ); // Make sure ConstructL has been called. |
201 |
194 |
202 ASSERT( iController ); // Make sure ConstructL has been called. |
195 TRACE_EXIT_POINT; |
203 |
|
204 OstTraceFunctionExit0( CALENSERVICESIMPL_ISSUECOMMANDL_EXIT ); |
196 return iController->IssueCommandL( aCommand ); |
205 return iController->IssueCommandL( aCommand ); |
197 } |
206 } |
198 |
207 |
199 // ---------------------------------------------------------------------------- |
208 // ---------------------------------------------------------------------------- |
200 // CalenServicesImpl::IssueNotificationL |
209 // CalenServicesImpl::IssueNotificationL |
203 // (other items were commented in a header). |
212 // (other items were commented in a header). |
204 // ---------------------------------------------------------------------------- |
213 // ---------------------------------------------------------------------------- |
205 // |
214 // |
206 void CalenServicesImpl::IssueNotificationL( TCalenNotification aNotification ) |
215 void CalenServicesImpl::IssueNotificationL( TCalenNotification aNotification ) |
207 { |
216 { |
208 TRACE_ENTRY_POINT; |
217 OstTraceFunctionEntry0( CALENSERVICESIMPL_ISSUENOTIFICATIONL_ENTRY ); |
209 |
218 |
210 ASSERT( iController ); // Make sure ConstructL has been called. |
219 ASSERT( iController ); // Make sure ConstructL has been called. |
211 iController->BroadcastNotification( aNotification ); |
220 iController->BroadcastNotification( aNotification ); |
212 |
221 |
213 TRACE_EXIT_POINT; |
222 OstTraceFunctionExit0( CALENSERVICESIMPL_ISSUENOTIFICATIONL_EXIT ); |
214 } |
223 } |
215 |
224 |
216 // ---------------------------------------------------------------------------- |
225 // ---------------------------------------------------------------------------- |
217 // CalenServicesImpl::RequestActivationL |
226 // CalenServicesImpl::RequestActivationL |
218 // Request activation of a specific view |
227 // Request activation of a specific view |
219 // (other items were commented in a header). |
228 // (other items were commented in a header). |
220 // ---------------------------------------------------------------------------- |
229 // ---------------------------------------------------------------------------- |
221 // |
230 // |
222 void CalenServicesImpl::RequestActivationL( const TVwsViewId& /*aViewId*/ ) |
231 void CalenServicesImpl::RequestActivationL( const TVwsViewId& /*aViewId*/ ) |
223 { |
232 { |
|
233 OstTraceFunctionEntry0( CALENSERVICESIMPL_REQUESTACTIVATIONL_ENTRY ); |
224 //ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
234 //ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
225 // iController->RequestActivationL( aViewId ); |
235 // iController->RequestActivationL( aViewId ); |
|
236 |
|
237 OstTraceFunctionExit0( CALENSERVICESIMPL_REQUESTACTIVATIONL_EXIT ); |
226 } |
238 } |
227 |
239 |
228 // ---------------------------------------------------------------------------- |
240 // ---------------------------------------------------------------------------- |
229 // CalenServicesImpl::ActivationNotificationL |
241 // CalenServicesImpl::ActivationNotificationL |
230 // Notify Calendar that a specific view has been activated |
242 // Notify Calendar that a specific view has been activated |
231 // (other items were commented in a header). |
243 // (other items were commented in a header). |
232 // ---------------------------------------------------------------------------- |
244 // ---------------------------------------------------------------------------- |
233 // |
245 // |
234 void CalenServicesImpl::ActivationNotificationL( const TVwsViewId& /*aViewId*/ ) |
246 void CalenServicesImpl::ActivationNotificationL( const TVwsViewId& /*aViewId*/ ) |
235 { |
247 { |
|
248 OstTraceFunctionEntry0( CALENSERVICESIMPL_ACTIVATIONNOTIFICATIONL_ENTRY ); |
|
249 |
236 //ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
250 //ASSERT( iGlobalData && iController ); // Make sure ConstructL has been called. |
|
251 OstTraceFunctionExit0( CALENSERVICESIMPL_ACTIVATIONNOTIFICATIONL_EXIT ); |
237 } |
252 } |
238 |
253 |
239 // ---------------------------------------------------------------------------- |
254 // ---------------------------------------------------------------------------- |
240 // CalenServicesImpl::Context |
255 // CalenServicesImpl::Context |
241 // Returns the context. |
256 // Returns the context. |
242 // (other items were commented in a header). |
257 // (other items were commented in a header). |
243 // ---------------------------------------------------------------------------- |
258 // ---------------------------------------------------------------------------- |
244 // |
259 // |
245 MCalenContext& CalenServicesImpl::Context() |
260 MCalenContext& CalenServicesImpl::Context() |
246 { |
261 { |
247 TRACE_ENTRY_POINT; |
262 OstTraceFunctionEntry0( CALENSERVICESIMPL_CONTEXT_ENTRY ); |
248 ASSERT( iController ); // Make sure ConstructL has been called. |
263 |
249 TRACE_EXIT_POINT; |
264 ASSERT( iController ); // Make sure ConstructL has been called. |
|
265 |
|
266 OstTraceFunctionExit0( CALENSERVICESIMPL_CONTEXT_EXIT ); |
250 return iController->context(); |
267 return iController->context(); |
251 } |
268 } |
252 |
269 |
253 // ---------------------------------------------------------------------------- |
270 // ---------------------------------------------------------------------------- |
254 // CCalenServicesImpl::Infobar |
271 // CCalenServicesImpl::Infobar |
256 // (other items were commented in a header). |
273 // (other items were commented in a header). |
257 // ---------------------------------------------------------------------------- |
274 // ---------------------------------------------------------------------------- |
258 // |
275 // |
259 HbWidget* CalenServicesImpl::Infobar( ) |
276 HbWidget* CalenServicesImpl::Infobar( ) |
260 { |
277 { |
261 TRACE_ENTRY_POINT; |
278 OstTraceFunctionEntry0( CALENSERVICESIMPL_INFOBAR_ENTRY ); |
262 |
279 |
263 TRACE_EXIT_POINT; |
280 OstTraceFunctionExit0( CALENSERVICESIMPL_INFOBAR_EXIT ); |
264 return iController->Infobar(); |
281 return iController->Infobar(); |
265 } |
282 } |
266 // ---------------------------------------------------------------------------- |
283 // ---------------------------------------------------------------------------- |
267 // CCalenServicesImpl::InfobarTextL |
284 // CCalenServicesImpl::InfobarTextL |
268 // @returns info bar text |
285 // @returns info bar text |
269 // (other items were commented in a header). |
286 // (other items were commented in a header). |
270 // ---------------------------------------------------------------------------- |
287 // ---------------------------------------------------------------------------- |
271 // |
288 // |
272 QString* CalenServicesImpl::InfobarTextL() |
289 QString* CalenServicesImpl::InfobarTextL() |
273 { |
290 { |
274 TRACE_ENTRY_POINT; |
291 OstTraceFunctionEntry0( CALENSERVICESIMPL_INFOBARTEXTL_ENTRY ); |
275 |
292 |
276 TRACE_EXIT_POINT; |
293 OstTraceFunctionExit0( CALENSERVICESIMPL_INFOBARTEXTL_EXIT ); |
277 return iController->InfobarTextL(); |
294 return iController->InfobarTextL(); |
278 } |
295 } |
279 // ---------------------------------------------------------------------------- |
296 // ---------------------------------------------------------------------------- |
280 // CalenServicesImpl::GetCommandRange |
297 // CalenServicesImpl::GetCommandRange |
281 // Returns the assigned command range |
298 // Returns the assigned command range |
283 // ---------------------------------------------------------------------------- |
300 // ---------------------------------------------------------------------------- |
284 // |
301 // |
285 void CalenServicesImpl::GetCommandRange( TInt& aCommandRangeStart, |
302 void CalenServicesImpl::GetCommandRange( TInt& aCommandRangeStart, |
286 TInt& aCommandRangeEnd ) const |
303 TInt& aCommandRangeEnd ) const |
287 { |
304 { |
288 TRACE_ENTRY_POINT; |
305 OstTraceFunctionEntry0( CALENSERVICESIMPL_GETCOMMANDRANGE_ENTRY ); |
289 |
306 |
290 aCommandRangeStart = iCommandRangeStart; |
307 aCommandRangeStart = iCommandRangeStart; |
291 aCommandRangeEnd = iCommandRangeEnd; |
308 aCommandRangeEnd = iCommandRangeEnd; |
292 |
309 |
293 TRACE_EXIT_POINT; |
310 OstTraceFunctionExit0( CALENSERVICESIMPL_GETCOMMANDRANGE_EXIT ); |
294 } |
311 } |
295 // ---------------------------------------------------------------------------- |
312 // ---------------------------------------------------------------------------- |
296 // CalenServicesImpl::OfferMenu |
313 // CalenServicesImpl::OfferMenu |
297 // Offers the menu to plugins for customisation |
314 // Offers the menu to plugins for customisation |
298 // (other items were commented in a header). |
315 // (other items were commented in a header). |
299 // ---------------------------------------------------------------------------- |
316 // ---------------------------------------------------------------------------- |
300 // |
317 // |
301 void CalenServicesImpl::OfferMenu(HbMenu* aHbMenu ) |
318 void CalenServicesImpl::OfferMenu(HbMenu* aHbMenu ) |
302 { |
319 { |
303 TRACE_ENTRY_POINT; |
320 OstTraceFunctionEntry0( CALENSERVICESIMPL_OFFERMENU_ENTRY ); |
304 |
321 |
305 iController->OfferMenu(aHbMenu); |
322 iController->OfferMenu(aHbMenu); |
306 |
323 |
307 TRACE_EXIT_POINT; |
324 OstTraceFunctionExit0( CALENSERVICESIMPL_OFFERMENU_EXIT ); |
308 } |
325 } |
309 |
326 |
310 // ---------------------------------------------------------------------------- |
327 // ---------------------------------------------------------------------------- |
311 // CalenServicesImpl::agendaInterface |
328 // CalenServicesImpl::agendaInterface |
312 // returns the interface to the agenda database |
329 // returns the interface to the agenda database |
313 // (other items were commented in a header). |
330 // (other items were commented in a header). |
314 // ---------------------------------------------------------------------------- |
331 // ---------------------------------------------------------------------------- |
315 // |
332 // |
316 AgendaUtil* CalenServicesImpl::agendaInterface() |
333 AgendaUtil* CalenServicesImpl::agendaInterface() |
317 { |
334 { |
318 TRACE_ENTRY_POINT; |
335 OstTraceFunctionEntry0( CALENSERVICESIMPL_AGENDAINTERFACE_ENTRY ); |
319 TRACE_EXIT_POINT; |
336 |
320 |
337 OstTraceFunctionExit0( CALENSERVICESIMPL_AGENDAINTERFACE_EXIT ); |
321 return iController->agendaInterface(); |
338 return iController->agendaInterface(); |
322 |
339 |
323 } |
340 } |
324 |
341 |
325 // ---------------------------------------------------------------------------- |
342 // ---------------------------------------------------------------------------- |