1 /* |
|
2 * Copyright (c) 2002 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 the License "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: Ui Mtm class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 |
|
22 #include <bldvariant.hrh> |
|
23 #include "PushMtmUi.h" |
|
24 #include "PushMtmUiPanic.h" |
|
25 #include "PushMtmUiDef.h" |
|
26 #include "PushViewerDef.h" |
|
27 #include "PushMtmCommands.hrh" |
|
28 #include "PushMtmSettings.h" |
|
29 #include "PushSettingsDialog.h" |
|
30 #include "PushMessageInfoOp.h" |
|
31 #include "PushLoadServiceOp.h" |
|
32 #ifdef __SERIES60_PUSH_SP |
|
33 #include "PushViewServiceOp.h" |
|
34 #endif // __SERIES60_PUSH_SP |
|
35 #include "PushViewMessageOp.h" |
|
36 #include "PushMtmLog.h" |
|
37 #include "PushMtmDef.h" |
|
38 #include <PushEntry.h> |
|
39 #include <msvids.h> |
|
40 #include <msvuids.h> |
|
41 #include <msvapi.h> |
|
42 #include <mtmuidef.hrh> |
|
43 #include <MTMExtendedCapabilities.hrh> |
|
44 #include <MuiuMsgEditorLauncher.h> |
|
45 #include <data_caging_path_literals.hrh> |
|
46 #include <f32file.h> |
|
47 #include "PushMtmPrivateCRKeys.h" |
|
48 #include <centralrepository.h> |
|
49 |
|
50 // ================= MEMBER FUNCTIONS ======================= |
|
51 |
|
52 // --------------------------------------------------------- |
|
53 // CPushMtmUi::NewL |
|
54 // --------------------------------------------------------- |
|
55 // |
|
56 EXPORT_C CPushMtmUi* CPushMtmUi::NewL( CBaseMtm& aBaseMtm, |
|
57 CRegisteredMtmDll& aRegisteredMtmDll ) |
|
58 { |
|
59 CPushMtmUi* ui = new (ELeave) CPushMtmUi( aBaseMtm, aRegisteredMtmDll ); |
|
60 CleanupStack::PushL( ui ); |
|
61 ui->ConstructL(); |
|
62 CleanupStack::Pop(); // ui |
|
63 return ui; |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------- |
|
67 // CPushMtmUi::~CPushMtmUi |
|
68 // --------------------------------------------------------- |
|
69 // |
|
70 CPushMtmUi::~CPushMtmUi() |
|
71 { |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------- |
|
75 // CPushMtmUi::CPushMtmUi |
|
76 // --------------------------------------------------------- |
|
77 // |
|
78 CPushMtmUi::CPushMtmUi( CBaseMtm& aBaseMtm, |
|
79 CRegisteredMtmDll& aRegisteredMtmDll ) |
|
80 : CBaseMtmUi( aBaseMtm, aRegisteredMtmDll ) |
|
81 { |
|
82 CRepository* PushSL = CRepository::NewL( KCRUidPushMtm ); |
|
83 CleanupStack::PushL( PushSL ); |
|
84 User::LeaveIfError( PushSL->Get( KPushMtmServiceEnabled , iPushSLEnabled ) ); |
|
85 CleanupStack::PopAndDestroy( PushSL ); |
|
86 } |
|
87 |
|
88 // --------------------------------------------------------- |
|
89 // CPushMtmUi::SetProgressSuccess |
|
90 // --------------------------------------------------------- |
|
91 // |
|
92 void CPushMtmUi::SetProgressSuccess |
|
93 ( TPckgBuf<TMsvLocalOperationProgress>& aProgress, TMsvId aId ) |
|
94 { |
|
95 aProgress().iTotalNumberOfEntries = 1; |
|
96 aProgress().iNumberCompleted = 1; |
|
97 aProgress().iId = aId; |
|
98 } |
|
99 |
|
100 // --------------------------------------------------------- |
|
101 // CPushMtmUi::CompletedOperationL |
|
102 // --------------------------------------------------------- |
|
103 // |
|
104 CMsvOperation* CPushMtmUi::CompletedOperationL |
|
105 ( TRequestStatus& aObserverStatus ) |
|
106 { |
|
107 TPckgBuf<TMsvLocalOperationProgress> progress; |
|
108 SetProgressSuccess( progress, BaseMtm().Entry().Entry().Id() ); |
|
109 CMsvCompletedOperation* operation = |
|
110 CMsvCompletedOperation::NewL( Session(), Type(), progress, |
|
111 KMsvLocalServiceIndexEntryId, aObserverStatus ); |
|
112 |
|
113 return operation; |
|
114 } |
|
115 |
|
116 // --------------------------------------------------------- |
|
117 // CPushMtmUi::EnsureServiceEntryL |
|
118 // --------------------------------------------------------- |
|
119 // |
|
120 void CPushMtmUi::EnsureServiceEntryL() const |
|
121 { |
|
122 PUSHLOG_ENTERFN("CPushMtmUi::EnsureServiceEntryL") |
|
123 |
|
124 // Get root entry. |
|
125 CMsvEntry* rootMsvEntry = Session().GetEntryL( KMsvRootIndexEntryId ); |
|
126 CleanupStack::PushL( rootMsvEntry ); |
|
127 |
|
128 // The Push MTM service entry is invisible. Set selection ordering |
|
129 // to find the invisible entries also. |
|
130 TMsvSelectionOrdering msvSelectionOrdering = rootMsvEntry->SortType();; |
|
131 msvSelectionOrdering.SetShowInvisibleEntries( ETrue ); |
|
132 rootMsvEntry->SetSortTypeL( msvSelectionOrdering ); |
|
133 |
|
134 // The service entry is the child entry of the root entry. |
|
135 // KUidMtmWapPush is used to identify the mtm type of the service entry! |
|
136 CMsvEntrySelection* msvEntrySelection = |
|
137 rootMsvEntry->ChildrenWithMtmL( KUidMtmWapPush ); |
|
138 CleanupStack::PushL( msvEntrySelection ); |
|
139 |
|
140 const TInt serviceEntryCount = msvEntrySelection->Count(); |
|
141 PUSHLOG_WRITE_FORMAT(" serviceEntryCount <%d>",serviceEntryCount) |
|
142 __ASSERT_DEBUG( serviceEntryCount <= 1, |
|
143 UiPanic( EPushMtmUiPanTooManyServiceEntries ) ); |
|
144 // If there is no push service entry in Message Server, create one. |
|
145 // If there is more than one, then delete the unnecessary entries. |
|
146 if ( serviceEntryCount == 0 ) |
|
147 { |
|
148 TMsvEntry newEntryData; |
|
149 newEntryData.iType = KUidMsvServiceEntry; |
|
150 newEntryData.iMtm = KUidMtmWapPush; |
|
151 newEntryData.SetVisible( EFalse ); |
|
152 rootMsvEntry->CreateL( newEntryData ); |
|
153 } |
|
154 else if ( 1 < serviceEntryCount ) |
|
155 { |
|
156 for ( TInt i = 1; i < serviceEntryCount; ++i ) // i starts from 1. |
|
157 { |
|
158 rootMsvEntry->DeleteL( msvEntrySelection->At(i) ); |
|
159 } |
|
160 } |
|
161 |
|
162 CleanupStack::PopAndDestroy( 2, rootMsvEntry ); |
|
163 // msvEntrySelection, rootMsvEntry |
|
164 |
|
165 PUSHLOG_LEAVEFN("CPushMtmUi::EnsureServiceEntryL") |
|
166 } |
|
167 |
|
168 // --------------------------------------------------------- |
|
169 // CPushMtmUi::CreateL |
|
170 // --------------------------------------------------------- |
|
171 // |
|
172 CMsvOperation* CPushMtmUi::CreateL( |
|
173 const TMsvEntry& /*aEntry*/, |
|
174 CMsvEntry& /*aParent*/, |
|
175 TRequestStatus& /*aStatus*/ ) |
|
176 { |
|
177 User::Leave( KErrNotSupported ); |
|
178 return NULL; |
|
179 } |
|
180 |
|
181 // --------------------------------------------------------- |
|
182 // CPushMtmUi::OpenL |
|
183 // --------------------------------------------------------- |
|
184 // |
|
185 CMsvOperation* CPushMtmUi::OpenL( TRequestStatus& aStatus ) |
|
186 { |
|
187 __ASSERT_DEBUG( BaseMtm().Entry().Entry().iMtm == Type(), |
|
188 UiPanic( EPushMtmUiPanBadMtm ) ); |
|
189 |
|
190 const TUid type( BaseMtm().Entry().Entry().iType ); |
|
191 |
|
192 CMsvOperation* operation = NULL; |
|
193 |
|
194 if ( type == KUidMsvMessageEntry ) |
|
195 { |
|
196 operation = ViewL( aStatus ); |
|
197 } |
|
198 else |
|
199 { |
|
200 User::Leave( KErrNotSupported ); |
|
201 } |
|
202 |
|
203 return operation; |
|
204 } |
|
205 |
|
206 // --------------------------------------------------------- |
|
207 // CPushMtmUi::CloseL |
|
208 // --------------------------------------------------------- |
|
209 // |
|
210 CMsvOperation* CPushMtmUi::CloseL( TRequestStatus& aStatus ) |
|
211 { |
|
212 __ASSERT_DEBUG( BaseMtm().Entry().Entry().iType == KUidMsvMessageEntry, |
|
213 UiPanic( EPushMtmUiPanBadType ) ); |
|
214 return CompletedOperationL( aStatus ); |
|
215 } |
|
216 |
|
217 // --------------------------------------------------------- |
|
218 // CPushMtmUi::EditL |
|
219 // --------------------------------------------------------- |
|
220 // |
|
221 CMsvOperation* CPushMtmUi::EditL( TRequestStatus& aStatus ) |
|
222 { |
|
223 __ASSERT_DEBUG( BaseMtm().Entry().Entry().iMtm == Type(), |
|
224 UiPanic( EPushMtmUiPanBadMtm ) ); |
|
225 |
|
226 if ( BaseMtm().Entry().Entry().iType != KUidMsvServiceEntry ) |
|
227 { |
|
228 // All push messages are read only ones. |
|
229 User::Leave( KErrNotSupported ); |
|
230 } |
|
231 |
|
232 CPushSettingsDialog* dlg = new (ELeave) CPushSettingsDialog( Session() ); |
|
233 dlg->ExecuteLD(); |
|
234 return CompletedOperationL( aStatus ); |
|
235 } |
|
236 |
|
237 // --------------------------------------------------------- |
|
238 // CPushMtmUi::ViewL |
|
239 // --------------------------------------------------------- |
|
240 // |
|
241 CMsvOperation* CPushMtmUi::ViewL( TRequestStatus& aStatus ) |
|
242 { |
|
243 const TMsvEntry tEntry( BaseMtm().Entry().Entry() ); |
|
244 |
|
245 __ASSERT_DEBUG( tEntry.iMtm == Type(), UiPanic( EPushMtmUiPanBadMtm ) ); |
|
246 __ASSERT_DEBUG( tEntry.iType == KUidMsvMessageEntry, |
|
247 UiPanic( EPushMtmUiPanBadType ) ); |
|
248 |
|
249 if ( tEntry.iType != KUidMsvMessageEntry ) |
|
250 { |
|
251 User::Leave( KErrNotSupported ); |
|
252 } |
|
253 |
|
254 CMsvOperation* operation = NULL; |
|
255 |
|
256 if ( |
|
257 tEntry.iBioType == KUidWapPushMsgSI.iUid || (iPushSLEnabled && tEntry.iBioType == KUidWapPushMsgSL.iUid) |
|
258 ) |
|
259 { |
|
260 TEditorParameters editorParameters; |
|
261 editorParameters.iId = tEntry.Id(); |
|
262 editorParameters.iFlags = EMsgLaunchEditorThenWait | |
|
263 EMsgReadOnly | |
|
264 EMsgLaunchEditorEmbedded; |
|
265 |
|
266 // Get the application name. |
|
267 HBufC* appFileName = |
|
268 MsvUiEditorUtilities::ResolveAppFileNameL( KUidPushViewerApp ); |
|
269 CleanupStack::PushL( appFileName ); |
|
270 |
|
271 operation = MsgEditorLauncher::LaunchEditorApplicationL |
|
272 ( BaseMtm().Session(), |
|
273 tEntry.iMtm, |
|
274 aStatus, |
|
275 editorParameters, |
|
276 *appFileName ); |
|
277 |
|
278 CleanupStack::PopAndDestroy( appFileName ); // appFileName |
|
279 } |
|
280 |
|
281 #ifdef __SERIES60_PUSH_SP |
|
282 |
|
283 else if ( tEntry.iBioType == KUidWapPushMsgUnknown.iUid ) |
|
284 { |
|
285 // Don't launch the PushViewer, but the embedded viewer. |
|
286 // It's unnecessary to call |
|
287 // BaseMtm().SwitchCurrentEntryL( tEntry.Id() ); |
|
288 TBuf8<1> dummyPar; |
|
289 CMsvEntrySelection* dummySel = new (ELeave) CMsvEntrySelection; |
|
290 CleanupStack::PushL( dummySel ); |
|
291 |
|
292 operation = InvokeAsyncFunctionL( EPushMtmCmdViewService, |
|
293 *dummySel, |
|
294 aStatus, |
|
295 dummyPar ); |
|
296 |
|
297 CleanupStack::PopAndDestroy( dummySel ); // dummySel |
|
298 } |
|
299 |
|
300 #endif // __SERIES60_PUSH_SP |
|
301 |
|
302 else |
|
303 { |
|
304 __ASSERT_DEBUG( EFalse, UiPanic( EPushMtmUiPanBadBioType ) ); |
|
305 User::Leave( KErrNotSupported ); |
|
306 } |
|
307 |
|
308 return operation; |
|
309 } |
|
310 |
|
311 // --------------------------------------------------------- |
|
312 // CPushMtmUi::OpenL |
|
313 // --------------------------------------------------------- |
|
314 // |
|
315 CMsvOperation* CPushMtmUi::OpenL |
|
316 ( TRequestStatus& /*aStatus*/, const CMsvEntrySelection& /*aSelection*/ ) |
|
317 { |
|
318 User::Leave( KErrNotSupported ); |
|
319 return NULL; |
|
320 } |
|
321 |
|
322 // --------------------------------------------------------- |
|
323 // CPushMtmUi::CloseL |
|
324 // --------------------------------------------------------- |
|
325 // |
|
326 CMsvOperation* CPushMtmUi::CloseL |
|
327 ( TRequestStatus& /*aStatus*/, const CMsvEntrySelection& /*aSelection*/ ) |
|
328 { |
|
329 User::Leave( KErrNotSupported ); |
|
330 return NULL; |
|
331 } |
|
332 |
|
333 // --------------------------------------------------------- |
|
334 // CPushMtmUi::EditL |
|
335 // --------------------------------------------------------- |
|
336 // |
|
337 CMsvOperation* CPushMtmUi::EditL |
|
338 ( TRequestStatus& /*aStatus*/, const CMsvEntrySelection& /*aSelection*/ ) |
|
339 { |
|
340 User::Leave( KErrNotSupported ); |
|
341 return NULL; |
|
342 } |
|
343 |
|
344 // --------------------------------------------------------- |
|
345 // CPushMtmUi::ViewL |
|
346 // --------------------------------------------------------- |
|
347 // |
|
348 CMsvOperation* CPushMtmUi::ViewL |
|
349 ( TRequestStatus& /*aStatus*/, const CMsvEntrySelection& /*aSelection*/ ) |
|
350 { |
|
351 User::Leave( KErrNotSupported ); |
|
352 return NULL; |
|
353 } |
|
354 |
|
355 // --------------------------------------------------------- |
|
356 // CPushMtmUi::CancelL |
|
357 // --------------------------------------------------------- |
|
358 // |
|
359 CMsvOperation* CPushMtmUi::CancelL |
|
360 ( TRequestStatus& /*aStatus*/, const CMsvEntrySelection& /*aSelection*/ ) |
|
361 { |
|
362 User::Leave( KErrNotSupported ); |
|
363 return NULL; |
|
364 } |
|
365 |
|
366 // --------------------------------------------------------- |
|
367 // CPushMtmUi::DeleteFromL |
|
368 // --------------------------------------------------------- |
|
369 // |
|
370 CMsvOperation* CPushMtmUi::DeleteFromL |
|
371 ( const CMsvEntrySelection& /*aSelection*/, TRequestStatus& /*aStatus*/ ) |
|
372 { |
|
373 User::Leave( KErrNotSupported ); |
|
374 return NULL; |
|
375 } |
|
376 |
|
377 // --------------------------------------------------------- |
|
378 // CPushMtmUi::UnDeleteFromL |
|
379 // --------------------------------------------------------- |
|
380 // |
|
381 CMsvOperation* CPushMtmUi::UnDeleteFromL |
|
382 ( const CMsvEntrySelection& /*aSelection*/, TRequestStatus& /*aStatus*/ ) |
|
383 { |
|
384 User::Leave( KErrNotSupported ); |
|
385 return NULL; |
|
386 } |
|
387 |
|
388 // --------------------------------------------------------- |
|
389 // CPushMtmUi::DeleteServiceL |
|
390 // --------------------------------------------------------- |
|
391 // |
|
392 CMsvOperation* CPushMtmUi::DeleteServiceL |
|
393 ( const TMsvEntry& /*aService*/, TRequestStatus& /*aStatus*/ ) |
|
394 { |
|
395 User::Leave( KErrNotSupported ); |
|
396 return NULL; |
|
397 } |
|
398 |
|
399 // --------------------------------------------------------- |
|
400 // CPushMtmUi::ReplyL |
|
401 // --------------------------------------------------------- |
|
402 // |
|
403 CMsvOperation* CPushMtmUi::ReplyL( |
|
404 TMsvId /*aDestination*/, |
|
405 TMsvPartList /*aPartlist*/, |
|
406 TRequestStatus& /*aCompletionStatus*/ ) |
|
407 { |
|
408 User::Leave( KErrNotSupported ); |
|
409 return NULL; |
|
410 } |
|
411 |
|
412 // --------------------------------------------------------- |
|
413 // CPushMtmUi::ForwardL |
|
414 // --------------------------------------------------------- |
|
415 // |
|
416 CMsvOperation* CPushMtmUi::ForwardL( |
|
417 TMsvId /*aDestination*/, |
|
418 TMsvPartList /*aPartlist*/, |
|
419 TRequestStatus& /*aCompletionStatus*/ ) |
|
420 { |
|
421 User::Leave( KErrNotSupported ); |
|
422 return NULL; |
|
423 } |
|
424 |
|
425 // --------------------------------------------------------- |
|
426 // CPushMtmUi::CopyToL |
|
427 // --------------------------------------------------------- |
|
428 // |
|
429 CMsvOperation* CPushMtmUi::CopyToL |
|
430 ( const CMsvEntrySelection& /*aSelection*/, TRequestStatus& /*aStatus*/ ) |
|
431 { |
|
432 User::Leave( KErrNotSupported ); |
|
433 return NULL; |
|
434 } |
|
435 |
|
436 |
|
437 // --------------------------------------------------------- |
|
438 // CPushMtmUi::MoveToL |
|
439 // --------------------------------------------------------- |
|
440 // |
|
441 CMsvOperation* CPushMtmUi::MoveToL |
|
442 ( const CMsvEntrySelection& /*aSelection*/, TRequestStatus& /*aStatus*/ ) |
|
443 { |
|
444 User::Leave( KErrNotSupported ); |
|
445 return NULL; |
|
446 } |
|
447 |
|
448 |
|
449 // --------------------------------------------------------- |
|
450 // CPushMtmUi::CopyFromL |
|
451 // --------------------------------------------------------- |
|
452 // |
|
453 CMsvOperation* CPushMtmUi::CopyFromL( |
|
454 const CMsvEntrySelection& /*aSelection*/, |
|
455 TMsvId /*aTargetId*/, |
|
456 TRequestStatus& /*aStatus*/ ) |
|
457 { |
|
458 User::Leave( KErrNotSupported ); |
|
459 return NULL; |
|
460 } |
|
461 |
|
462 // --------------------------------------------------------- |
|
463 // CPushMtmUi::MoveFromL |
|
464 // --------------------------------------------------------- |
|
465 // |
|
466 CMsvOperation* CPushMtmUi::MoveFromL( |
|
467 const CMsvEntrySelection& /*aSelection*/, |
|
468 TMsvId /*aTargetId*/, |
|
469 TRequestStatus& /*aStatus*/ ) |
|
470 { |
|
471 User::Leave( KErrNotSupported ); |
|
472 return NULL; |
|
473 } |
|
474 |
|
475 // --------------------------------------------------------- |
|
476 // CPushMtmUi::QueryCapability |
|
477 // --------------------------------------------------------- |
|
478 // |
|
479 TInt CPushMtmUi::QueryCapability( TUid aCapability, TInt& aResponse ) |
|
480 { |
|
481 TInt ret( KErrNone ); |
|
482 |
|
483 switch ( aCapability.iUid ) |
|
484 { |
|
485 case KUidMsvMtmUiQueryMessagingInitialisation: |
|
486 case KUidMsvMtmQueryFactorySettings: |
|
487 case KUidMsvMtmQueryMessageInfo: |
|
488 { |
|
489 aResponse = ETrue; |
|
490 break; |
|
491 } |
|
492 default: |
|
493 { |
|
494 ret = BaseMtm().QueryCapability( aCapability, aResponse ); |
|
495 break; |
|
496 } |
|
497 } |
|
498 |
|
499 return ret; |
|
500 } |
|
501 |
|
502 // --------------------------------------------------------- |
|
503 // CPushMtmUi::InvokeSyncFunctionL |
|
504 // --------------------------------------------------------- |
|
505 // |
|
506 void CPushMtmUi::InvokeSyncFunctionL( TInt aFunctionId, |
|
507 const CMsvEntrySelection& /*aSelection*/, |
|
508 TDes8& /*aParameter*/ ) |
|
509 { |
|
510 PUSHLOG_WRITE_FORMAT |
|
511 ("CPushMtmUi::InvokeSyncFunctionL <%d>",aFunctionId) |
|
512 |
|
513 if ( aFunctionId == KMtmUiMessagingInitialisation || |
|
514 aFunctionId == KMtmUiFunctionRestoreFactorySettings ) |
|
515 { |
|
516 // Restore the settings... |
|
517 CPushMtmSettings* pushMtmSettings = CPushMtmSettings::NewLC(); |
|
518 pushMtmSettings->RestoreFactorySettingsL(); |
|
519 CleanupStack::PopAndDestroy( pushMtmSettings ); // pushMtmSettings |
|
520 // ...and ensure that a service entry exists with which |
|
521 // the settings can be reached from a messaging application. |
|
522 EnsureServiceEntryL(); |
|
523 } |
|
524 else |
|
525 { |
|
526 User::Leave( KErrNotSupported ); |
|
527 } |
|
528 } |
|
529 |
|
530 // --------------------------------------------------------- |
|
531 // CPushMtmUi::InvokeAsyncFunctionL |
|
532 // --------------------------------------------------------- |
|
533 // |
|
534 CMsvOperation* CPushMtmUi::InvokeAsyncFunctionL |
|
535 ( TInt aFunctionId, |
|
536 const CMsvEntrySelection& aSelection, |
|
537 TRequestStatus& aCompletionStatus, |
|
538 TDes8& aParameter ) |
|
539 { |
|
540 PUSHLOG_WRITE_FORMAT |
|
541 ("CPushMtmUi::InvokeAsyncFunctionL <%d>",aFunctionId) |
|
542 |
|
543 CMsvOperation* operation = NULL; |
|
544 |
|
545 switch ( aFunctionId ) |
|
546 { |
|
547 case KMtmUiFunctionMessageInfo: |
|
548 { |
|
549 TBool dontShowNotification = EFalse; |
|
550 if ( 0 < aParameter.Length() ) |
|
551 { |
|
552 TMessageInfoParam par; |
|
553 TMessageInfoParamPckg parPckg( par ); |
|
554 parPckg.Set( aParameter ); |
|
555 dontShowNotification = par.iDontShowNotification; |
|
556 } |
|
557 |
|
558 CPushMessageInfoOp* op = new (ELeave) CPushMessageInfoOp |
|
559 ( Session(), |
|
560 BaseMtm().Entry().EntryId(), |
|
561 dontShowNotification, |
|
562 aCompletionStatus ); |
|
563 CleanupStack::PushL( op ); |
|
564 op->StartL(); |
|
565 operation = op; |
|
566 CleanupStack::Pop( op ); // op |
|
567 break; |
|
568 } |
|
569 |
|
570 case EPushMtmCmdLoadService: |
|
571 { |
|
572 CPushLoadServiceOp* op = CPushLoadServiceOp::NewL |
|
573 ( Session(), |
|
574 BaseMtm().Entry().EntryId(), |
|
575 aCompletionStatus ); |
|
576 CleanupStack::PushL( op ); |
|
577 op->StartL(); |
|
578 operation = op; |
|
579 CleanupStack::Pop( op ); // op |
|
580 break; |
|
581 } |
|
582 |
|
583 #ifdef __SERIES60_PUSH_SP |
|
584 |
|
585 case EPushMtmCmdViewService: |
|
586 { |
|
587 CPushViewServiceOp* op = new (ELeave) CPushViewServiceOp |
|
588 ( Session(), |
|
589 BaseMtm().Entry().EntryId(), |
|
590 aCompletionStatus ); |
|
591 CleanupStack::PushL( op ); |
|
592 op->StartL(); |
|
593 operation = op; |
|
594 CleanupStack::Pop( op ); // op |
|
595 break; |
|
596 } |
|
597 |
|
598 #endif // __SERIES60_PUSH_SP |
|
599 |
|
600 case EPushMtmCmdViewMessage: |
|
601 { |
|
602 CPushViewMessageOp* op = CPushViewMessageOp::NewL |
|
603 ( Session(), |
|
604 BaseMtm().Entry().EntryId(), |
|
605 aCompletionStatus ); |
|
606 CleanupStack::PushL( op ); |
|
607 op->StartL(); |
|
608 operation = op; |
|
609 CleanupStack::Pop( op ); // op |
|
610 break; |
|
611 } |
|
612 |
|
613 default: |
|
614 { |
|
615 operation = CBaseMtmUi::InvokeAsyncFunctionL |
|
616 ( aFunctionId, aSelection, aCompletionStatus, aParameter ); |
|
617 break; |
|
618 } |
|
619 } |
|
620 |
|
621 return operation; |
|
622 } |
|
623 |
|
624 // --------------------------------------------------------- |
|
625 // CPushMtmUi::GetResourceFileName |
|
626 // --------------------------------------------------------- |
|
627 // |
|
628 void CPushMtmUi::GetResourceFileName( TFileName& aFileName ) const |
|
629 { |
|
630 // Extract the file name and extension from the constant |
|
631 TParsePtrC fileParser( KPushMtmUiResourceFileAndDrive ); |
|
632 aFileName = fileParser.NameAndExt(); |
|
633 } |
|
634 |
|
635 // End of File |
|