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