15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 |
20 #include <s32mem.h> // For RBufWriteStream |
21 #include <pathinfo.h> |
21 #include <utf.h> // for CnvUtfConverter |
22 #include <swi/sisregistryentry.h> |
22 //#include <pathinfo.h> |
23 #include <swi/sisregistrypackage.h> |
23 #include <usif/sif/sifcommon.h> |
24 #include <swi/sisregistrysession.h> |
24 |
25 #include <SWInstDefs.h> |
25 using namespace Usif; |
26 #include <mmf/common/mmfcontrollerpluginresolver.h> |
|
27 #include <javaregistry.h> |
|
28 |
|
29 using namespace Java; |
|
30 |
26 |
31 #include "debug.h" |
27 #include "debug.h" |
32 #include "sconinstaller.h" |
28 #include "sconinstaller.h" |
33 #include "sconpcdconsts.h" |
29 #include "sconpcdconsts.h" |
34 #include "sconpcdutility.h" |
30 #include "sconpcdutility.h" |
35 |
31 |
36 _LIT8( KWidgetMimeType, "application/x-nokia-widget"); |
|
37 |
32 |
38 const TInt KSConSeConUidValue = 0x101f99f6; |
33 const TInt KSConSeConUidValue = 0x101f99f6; |
39 const TUid KSConSeConUid = {KSConSeConUidValue}; |
34 const TUid KSConSeConUid = {KSConSeConUidValue}; |
40 |
35 |
|
36 _LIT8(KValSep, "="); |
|
37 _LIT8(KComma, ","); |
|
38 _LIT8(KLineEnd, "\r\n"); |
|
39 |
41 // ============================= MEMBER FUNCTIONS =============================== |
40 // ============================= MEMBER FUNCTIONS =============================== |
42 |
41 |
43 |
42 CSConAppInstaller* CSConAppInstaller::NewL( CSConInstallerQueue* aQueue, RFs& aFs ) |
|
43 { |
|
44 CSConAppInstaller* self = new (ELeave) CSConAppInstaller( aQueue, aFs ); |
|
45 CleanupStack::PushL( self ); |
|
46 self->ConstructL(); |
|
47 CleanupStack::Pop( self ); |
|
48 return self; |
|
49 } |
44 // ----------------------------------------------------------------------------- |
50 // ----------------------------------------------------------------------------- |
45 // CSConAppInstaller::CSConAppInstaller( CSConInstallerQueue* aQueue ) |
51 // CSConAppInstaller::CSConAppInstaller( CSConInstallerQueue* aQueue ) |
46 // Constructor |
52 // Constructor |
47 // ----------------------------------------------------------------------------- |
53 // ----------------------------------------------------------------------------- |
48 // |
54 // |
49 CSConAppInstaller::CSConAppInstaller( CSConInstallerQueue* aQueue, RFs& aFs ) : |
55 CSConAppInstaller::CSConAppInstaller( CSConInstallerQueue* aQueue, RFs& aFs ) : |
50 CActive( EPriorityStandard ), iQueue( aQueue ), iFs( aFs ) |
56 CActive( EPriorityStandard ), iQueue( aQueue ), iFs( aFs ) |
51 { |
57 { |
52 TRACE_FUNC; |
58 CActiveScheduler::Add( this ); |
|
59 } |
|
60 |
|
61 void CSConAppInstaller::ConstructL() |
|
62 { |
|
63 iSifOptions = COpaqueNamedParams::NewL(); |
|
64 iSifResults = COpaqueNamedParams::NewL(); |
53 } |
65 } |
54 |
66 |
55 // ----------------------------------------------------------------------------- |
67 // ----------------------------------------------------------------------------- |
56 // CSConAppInstaller::~CSConAppInstaller() |
68 // CSConAppInstaller::~CSConAppInstaller() |
57 // Destructor |
69 // Destructor |
58 // ----------------------------------------------------------------------------- |
70 // ----------------------------------------------------------------------------- |
59 // |
71 // |
60 CSConAppInstaller::~CSConAppInstaller() |
72 CSConAppInstaller::~CSConAppInstaller() |
61 { |
73 { |
62 TRACE_FUNC; |
74 TRACE_FUNC; |
63 iSWInst.Close(); |
75 Cancel(); |
|
76 iSwInstaller.Close(); |
|
77 delete iSifOptions; |
|
78 delete iSifResults; |
64 } |
79 } |
65 |
80 |
66 // ----------------------------------------------------------------------------- |
81 // ----------------------------------------------------------------------------- |
67 // CSConAppInstaller::StartInstaller( TInt& aTaskId ) |
82 // CSConAppInstaller::StartInstaller( TInt& aTaskId ) |
68 // Starts the installer task |
83 // Starts the installer task |
279 |
257 |
280 iQueue->CompleteTask( iCurrentTask, err ); |
258 iQueue->CompleteTask( iCurrentTask, err ); |
281 TRACE_FUNC_EXIT; |
259 TRACE_FUNC_EXIT; |
282 } |
260 } |
283 |
261 |
|
262 // ----------------------------------------------------------------------------- |
|
263 // CSConAppInstaller::WriteTaskDataL() |
|
264 // Writes data to task |
|
265 // ----------------------------------------------------------------------------- |
|
266 // |
|
267 void CSConAppInstaller::WriteTaskDataL( CSConTask& aTask ) |
|
268 { |
|
269 TRACE_FUNC_ENTRY; |
|
270 CBufFlat* buffer = CBufFlat::NewL(200); |
|
271 CleanupStack::PushL(buffer); |
|
272 RBufWriteStream stream( *buffer ); |
|
273 CleanupClosePushL( stream ); |
|
274 |
|
275 ExternalizeResultArrayIntValL( KSifOutParam_ComponentId , stream); |
|
276 ExternalizeResultIntValL( KSifOutParam_ErrCategory , stream); |
|
277 ExternalizeResultIntValL( KSifOutParam_ErrCode , stream); |
|
278 ExternalizeResultIntValL( KSifOutParam_ExtendedErrCode , stream); |
|
279 ExternalizeResultStringValL( KSifOutParam_ErrMessage , stream); |
|
280 ExternalizeResultStringValL( KSifOutParam_ErrMessageDetails , stream); |
|
281 |
|
282 stream.CommitL(); |
|
283 |
|
284 buffer->Compress(); |
|
285 |
|
286 HBufC8* data = HBufC8::NewL( buffer->Size() ); |
|
287 TPtr8 dataPtr = data->Des(); |
|
288 buffer->Read( 0, dataPtr, buffer->Size() ); |
|
289 |
|
290 if ( aTask.GetServiceId() == EInstall ) |
|
291 { |
|
292 if ( aTask.iInstallParams->iData ) |
|
293 { |
|
294 delete aTask.iInstallParams->iData; |
|
295 aTask.iInstallParams->iData = NULL; |
|
296 } |
|
297 aTask.iInstallParams->iData = data; |
|
298 data = NULL; |
|
299 } |
|
300 else if ( aTask.GetServiceId() == EUninstall ) |
|
301 { |
|
302 if ( aTask.iUninstallParams->iData ) |
|
303 { |
|
304 delete aTask.iUninstallParams->iData; |
|
305 aTask.iUninstallParams->iData = NULL; |
|
306 } |
|
307 aTask.iUninstallParams->iData = data; |
|
308 data = NULL; |
|
309 } |
|
310 else |
|
311 { |
|
312 delete data; |
|
313 data = NULL; |
|
314 } |
|
315 |
|
316 CleanupStack::PopAndDestroy( &stream ); |
|
317 CleanupStack::PopAndDestroy( buffer ); |
|
318 TRACE_FUNC_EXIT; |
|
319 } |
|
320 |
|
321 void CSConAppInstaller::ExternalizeResultArrayIntValL( const TDesC& aName, RWriteStream& aStream ) |
|
322 { |
|
323 TRACE_FUNC_ENTRY; |
|
324 RArray<TInt> valueArray; |
|
325 TRAPD(err, valueArray = iSifResults->IntArrayByNameL(aName)); |
|
326 if ( !err && valueArray.Count() > 0 ) |
|
327 { |
|
328 LOGGER_WRITE_1("count: %d", valueArray.Count()); |
|
329 TBuf8<100> nameBuf; |
|
330 err = CnvUtfConverter::ConvertFromUnicodeToUtf8( nameBuf, aName ); |
|
331 if (!err) |
|
332 { |
|
333 LOGGER_WRITE("2"); |
|
334 aStream.WriteL( nameBuf, nameBuf.Length() ); |
|
335 aStream.WriteL( KValSep, 1 ); |
|
336 aStream.WriteInt32L( valueArray[0] ); |
|
337 for (TInt i=1; i<valueArray.Count(); i++) |
|
338 { |
|
339 aStream.WriteL( KComma, 1 ); |
|
340 aStream.WriteInt32L( valueArray[i] ); |
|
341 } |
|
342 aStream.WriteL( KLineEnd, 2 ); |
|
343 } |
|
344 } |
|
345 TRACE_FUNC_EXIT; |
|
346 } |
|
347 // ----------------------------------------------------------------------------- |
|
348 // CSConAppInstaller::ExternalizeResultIntValL() |
|
349 // Read integer value and write it to stream |
|
350 // ----------------------------------------------------------------------------- |
|
351 // |
|
352 void CSConAppInstaller::ExternalizeResultIntValL( const TDesC& aName, RWriteStream& aStream ) |
|
353 { |
|
354 TRACE_FUNC_ENTRY; |
|
355 TInt value; |
|
356 TBool found(EFalse); |
|
357 found = iSifResults->GetIntByNameL(aName, value); |
|
358 |
|
359 if (found) |
|
360 { |
|
361 TBuf8<100> nameBuf; |
|
362 TInt err = CnvUtfConverter::ConvertFromUnicodeToUtf8( nameBuf, aName ); |
|
363 if (!err) |
|
364 { |
|
365 aStream.WriteL( nameBuf, nameBuf.Length() ); |
|
366 aStream.WriteL( KValSep, 1 ); |
|
367 aStream.WriteInt32L( value ); |
|
368 aStream.WriteL( KLineEnd, 2 ); |
|
369 } |
|
370 } |
|
371 TRACE_FUNC_EXIT; |
|
372 } |
|
373 |
|
374 // ----------------------------------------------------------------------------- |
|
375 // CSConAppInstaller::ExternalizeResultStringValL() |
|
376 // Read string value and write it to stream |
|
377 // ----------------------------------------------------------------------------- |
|
378 // |
|
379 void CSConAppInstaller::ExternalizeResultStringValL( const TDesC& aName, RWriteStream& aStream ) |
|
380 { |
|
381 TRACE_FUNC_ENTRY; |
|
382 const TDesC& strValue = iSifResults->StringByNameL( aName ); |
|
383 if (strValue.Length() > 0) |
|
384 { |
|
385 TBuf8<100> nameBuf; |
|
386 TInt err = CnvUtfConverter::ConvertFromUnicodeToUtf8( nameBuf, aName ); |
|
387 if (!err) |
|
388 { |
|
389 HBufC8* nameVal = CnvUtfConverter::ConvertFromUnicodeToUtf8L( strValue ); |
|
390 CleanupStack::PushL( nameVal ); |
|
391 aStream.WriteL( nameBuf, nameBuf.Length() ); |
|
392 aStream.WriteL( KValSep, 1 ); |
|
393 aStream.WriteL( nameVal->Des(), nameVal->Length() ); |
|
394 aStream.WriteL( KLineEnd, 2 ); |
|
395 CleanupStack::PopAndDestroy( nameVal ); |
|
396 } |
|
397 } |
|
398 TRACE_FUNC_EXIT; |
|
399 } |
|
400 |
|
401 // ----------------------------------------------------------------------------- |
|
402 // CSConAppInstaller::ProcessInstallL() |
|
403 // Executes Install task |
|
404 // ----------------------------------------------------------------------------- |
|
405 // |
|
406 void CSConAppInstaller::ProcessInstallL( const CSConInstall& aInstallParams ) |
|
407 { |
|
408 TRACE_FUNC_ENTRY; |
|
409 iSifOptions->Cleanup(); |
|
410 iSifResults->Cleanup(); |
|
411 |
|
412 if ( aInstallParams.iMode == ESilentInstall ) |
|
413 { |
|
414 LOGGER_WRITE( "Begin silent installation.. " ); |
|
415 |
|
416 iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue ); |
|
417 iSifOptions->AddIntL( Usif::KSifInParam_PerformOCSP, EFalse ); |
|
418 // Note if upgrade is allowed, see NeedsInstallingL function. |
|
419 iSifOptions->AddIntL( Usif::KSifInParam_AllowUpgrade, ETrue ); |
|
420 iSifOptions->AddIntL( Usif::KSifInParam_AllowUntrusted, EFalse ); |
|
421 iSifOptions->AddIntL( Usif::KSifInParam_GrantCapabilities, EFalse ); |
|
422 // Defined for the install. |
|
423 iSifOptions->AddIntL( Usif::KSifInParam_InstallOptionalItems, ETrue ); |
|
424 iSifOptions->AddIntL( Usif::KSifInParam_IgnoreOCSPWarnings, ETrue ); |
|
425 iSifOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, ETrue ); |
|
426 iSifOptions->AddIntL( Usif::KSifInParam_AllowDownload, ETrue ); |
|
427 iSifOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, ETrue ); |
|
428 |
|
429 iSwInstaller.Install( aInstallParams.iPath, *iSifOptions, |
|
430 *iSifResults, iStatus, ETrue ); |
|
431 } |
|
432 else |
|
433 { |
|
434 LOGGER_WRITE( "Begin to install.. " ); |
|
435 |
|
436 iSwInstaller.Install( aInstallParams.iPath, *iSifOptions, |
|
437 *iSifResults, iStatus, ETrue ); |
|
438 } |
|
439 SetActive(); |
|
440 TRACE_FUNC_EXIT; |
|
441 } |
284 |
442 |
285 // ----------------------------------------------------------------------------- |
443 // ----------------------------------------------------------------------------- |
286 // CSConAppInstaller::ProcessUninstallL( const CSConUninstall& aUninstallParams ) |
444 // CSConAppInstaller::ProcessUninstallL( const CSConUninstall& aUninstallParams ) |
287 // Execures UnInstall task |
445 // Executes UnInstall task |
288 // ----------------------------------------------------------------------------- |
446 // ----------------------------------------------------------------------------- |
289 // |
447 // |
290 void CSConAppInstaller::ProcessUninstallL( const CSConUninstall& aUninstallParams ) |
448 void CSConAppInstaller::ProcessUninstallL( const CSConUninstall& aUninstallParams ) |
291 { |
449 { |
292 TRACE_FUNC_ENTRY; |
450 TRACE_FUNC_ENTRY; |
293 LOGGER_WRITE_1( "aUid: 0x%08x", aUninstallParams.iUid.iUid ); |
451 LOGGER_WRITE_1( "aUid: 0x%08x", aUninstallParams.iUid.iUid ); |
294 LOGGER_WRITE_1( "aName: %S", &aUninstallParams.iName ); |
452 LOGGER_WRITE_1( "aName: %S", &aUninstallParams.iName ); |
295 LOGGER_WRITE_1( "aVendor: %S", &aUninstallParams.iVendor ); |
453 LOGGER_WRITE_1( "aVendor: %S", &aUninstallParams.iVendor ); |
296 LOGGER_WRITE_1( "aType: %d", aUninstallParams.iType ); |
454 LOGGER_WRITE_1( "aType: %d", aUninstallParams.iType ); |
297 LOGGER_WRITE_1( "aMode: %d", aUninstallParams.iMode ); |
455 LOGGER_WRITE_1( "aMode: %d", aUninstallParams.iMode ); |
298 switch ( aUninstallParams.iType ) |
456 |
299 { |
457 if ( aUninstallParams.iUid == KSConSeConUid ) |
300 case ESisApplication: |
|
301 case ESisAugmentation: |
|
302 UninstallSisL( aUninstallParams ); |
|
303 break; |
|
304 case EJavaApplication: |
|
305 UninstallJavaL( aUninstallParams.iUid, |
|
306 aUninstallParams.iMode); |
|
307 break; |
|
308 case EWidgetApplication: |
|
309 UninstallWidget( aUninstallParams.iUid, |
|
310 aUninstallParams.iMode ); |
|
311 break; |
|
312 default: |
|
313 User::Leave( KErrNotSupported ); |
|
314 } |
|
315 |
|
316 TRACE_FUNC_EXIT; |
|
317 } |
|
318 |
|
319 // ----------------------------------------------------------------------------- |
|
320 // CSConAppInstaller::UninstallSisL( const CSConUninstall& aUninstallParams ) |
|
321 // Uninstall sis package or augmentation |
|
322 // ----------------------------------------------------------------------------- |
|
323 // |
|
324 void CSConAppInstaller::UninstallSisL( const CSConUninstall& aUninstallParams ) |
|
325 { |
|
326 TRACE_FUNC_ENTRY; |
|
327 |
|
328 if ( aUninstallParams.iUid == KSConSeConUid ) |
|
329 { |
458 { |
330 LOGGER_WRITE("Cannot uninstall itself, leave"); |
459 LOGGER_WRITE("Cannot uninstall itself, leave"); |
331 // cannot uninstall itself |
460 // cannot uninstall itself |
332 User::Leave( SwiUI::KSWInstErrFileInUse ); |
461 User::Leave( KErrInUse ); //SwiUI::KSWInstErrFileInUse ); |
333 } |
462 } |
334 |
463 TComponentId componentId = aUninstallParams.iUid.iUid; |
335 Swi::RSisRegistrySession sisRegistry; |
464 iSifOptions->Cleanup(); |
336 User::LeaveIfError( sisRegistry.Connect() ); |
465 iSifResults->Cleanup(); |
337 CleanupClosePushL( sisRegistry ); |
466 |
338 //Check if uid belongs to SIS package |
467 if ( aUninstallParams.iMode == ESilentInstall) |
339 if( !sisRegistry.IsInstalledL( aUninstallParams.iUid ) ) |
468 { |
340 { |
469 iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue ); |
341 CleanupStack::PopAndDestroy( &sisRegistry ); |
470 iSwInstaller.Uninstall( componentId, *iSifOptions, *iSifResults, iStatus, ETrue ); |
342 User::Leave( KErrNotFound ); |
|
343 } |
|
344 |
|
345 Swi::RSisRegistryEntry entry; |
|
346 CleanupClosePushL(entry); |
|
347 User::LeaveIfError( entry.Open( sisRegistry, aUninstallParams.iUid ) ); |
|
348 if ( aUninstallParams.iType == ESisAugmentation ) |
|
349 { |
|
350 // augmentation pkg |
|
351 LOGGER_WRITE( "CSConAppInstaller::ProcessUninstallL ESisAugmentation" ); |
|
352 |
|
353 TBool augmentationFound(EFalse); |
|
354 // Get possible augmentations |
|
355 RPointerArray<Swi::CSisRegistryPackage> augPackages; |
|
356 CleanupResetAndDestroyPushL( augPackages ); |
|
357 entry.AugmentationsL( augPackages ); |
|
358 for ( TInt j( 0 ); j < augPackages.Count() && !augmentationFound; j++ ) |
|
359 { |
|
360 Swi::RSisRegistryEntry augmentationEntry; |
|
361 CleanupClosePushL( augmentationEntry ); |
|
362 augmentationEntry.OpenL( sisRegistry, *augPackages[j] ); |
|
363 |
|
364 HBufC* augPackageName = augmentationEntry.PackageNameL(); |
|
365 CleanupStack::PushL( augPackageName ); |
|
366 HBufC* augUniqueVendorName = augmentationEntry.UniqueVendorNameL(); |
|
367 CleanupStack::PushL( augUniqueVendorName ); |
|
368 |
|
369 if ( !augmentationEntry.IsInRomL() |
|
370 && augmentationEntry.IsPresentL() |
|
371 && aUninstallParams.iName.Compare( *augPackageName ) == 0 |
|
372 && aUninstallParams.iVendor.Compare( *augUniqueVendorName ) == 0 ) |
|
373 { |
|
374 // Correct augmentation found, uninstall it. |
|
375 augmentationFound = ETrue; |
|
376 TInt augmentationIndex = augPackages[j]->Index(); |
|
377 LOGGER_WRITE_1( "CSConAppInstaller::ProcessUninstallL augmentationIndex %d", augmentationIndex ); |
|
378 |
|
379 SwiUI::TOpUninstallIndexParam params; |
|
380 params.iUid = aUninstallParams.iUid; |
|
381 params.iIndex = augmentationIndex; |
|
382 SwiUI::TOpUninstallIndexParamPckg pckg( params ); |
|
383 SwiUI::TOperation operation( SwiUI::EOperationUninstallIndex ); |
|
384 if( aUninstallParams.iMode == ESilentInstall ) |
|
385 { |
|
386 LOGGER_WRITE( "CSConAppInstaller::ProcessUninstallL : silent aug-sis-uninstall" ); |
|
387 SwiUI::TUninstallOptionsPckg options; |
|
388 iInstallerState = ESilentCustomUnistalling; |
|
389 iSWInst.SilentCustomUninstall( iStatus, operation, options, pckg, KSISMIMEType ); |
|
390 } |
|
391 else |
|
392 { |
|
393 LOGGER_WRITE( "CSConAppInstaller::ProcessUninstallL : unsilent aug-sis-uninstall" ) |
|
394 iInstallerState = ECustomUninstalling; |
|
395 iSWInst.CustomUninstall( iStatus, operation, pckg, KSISMIMEType ); |
|
396 } |
|
397 } |
|
398 CleanupStack::PopAndDestroy( augUniqueVendorName ); |
|
399 CleanupStack::PopAndDestroy( augPackageName ); |
|
400 CleanupStack::PopAndDestroy( &augmentationEntry ); |
|
401 } |
|
402 CleanupStack::PopAndDestroy( &augPackages ); |
|
403 |
|
404 if ( !augmentationFound ) |
|
405 { |
|
406 LOGGER_WRITE( "CSConAppInstaller::ProcessUninstallL augmentation not found -> Leave" ); |
|
407 User::Leave( KErrNotFound ); |
|
408 } |
|
409 } |
471 } |
410 else |
472 else |
411 { |
473 { |
412 // Only uninstall if not in rom and is present |
474 iSwInstaller.Uninstall( componentId, *iSifOptions, *iSifResults, iStatus, ETrue ); |
413 if ( !entry.IsInRomL() && entry.IsPresentL() ) |
475 } |
414 { |
476 SetActive(); |
415 if ( aUninstallParams.iMode == ESilentInstall ) |
477 TRACE_FUNC_EXIT; |
416 { |
478 } |
417 LOGGER_WRITE( "CSConAppInstaller::ProcessUninstallL : silent sis-uninstall" ); |
|
418 SwiUI::TUninstallOptionsPckg options; |
|
419 iInstallerState = ESilentUninstalling; |
|
420 iSWInst.SilentUninstall( iStatus, aUninstallParams.iUid, options, KSISMIMEType ); |
|
421 } |
|
422 else |
|
423 { |
|
424 LOGGER_WRITE( "CSConAppInstaller::ProcessUninstallL : unsilent sis-uninstall" ) |
|
425 iInstallerState = EUninstalling; |
|
426 iSWInst.Uninstall( iStatus, aUninstallParams.iUid, KSISMIMEType ); |
|
427 } |
|
428 } |
|
429 else |
|
430 { |
|
431 LOGGER_WRITE( "CSConAppInstaller::ProcessUninstallL sis not present -> Leave" ); |
|
432 User::Leave( KErrNotFound ); |
|
433 } |
|
434 } |
|
435 |
|
436 CleanupStack::PopAndDestroy( &entry ); |
|
437 CleanupStack::PopAndDestroy( &sisRegistry ); |
|
438 TRACE_FUNC_EXIT; |
|
439 } |
|
440 |
|
441 // ----------------------------------------------------------------------------- |
|
442 // CSConAppInstaller::UninstallJavaL( const TUid& aUid, const TSConInstallMode aMode ) |
|
443 // Uninstall java package |
|
444 // ----------------------------------------------------------------------------- |
|
445 // |
|
446 void CSConAppInstaller::UninstallJavaL( const TUid& aUid, const TSConInstallMode aMode ) |
|
447 { |
|
448 TRACE_FUNC_ENTRY; |
|
449 CJavaRegistry* javaRegistry = CJavaRegistry::NewLC( ); |
|
450 TBool entryExist = javaRegistry->RegistryEntryExistsL( aUid ); |
|
451 CleanupStack::PopAndDestroy( javaRegistry ); |
|
452 |
|
453 if( entryExist ) |
|
454 { |
|
455 if( aMode == ESilentInstall ) |
|
456 { |
|
457 LOGGER_WRITE( "CSConAppInstaller::UninstallJavaL : silent midlet-uninstall" ) |
|
458 SwiUI::TUninstallOptionsPckg options; |
|
459 iInstallerState = ESilentUninstalling; |
|
460 iSWInst.SilentUninstall( iStatus, aUid, options, KMidletMIMEType ); |
|
461 } |
|
462 else |
|
463 { |
|
464 LOGGER_WRITE( "CSConAppInstaller::UninstallJavaL : unsilent midlet-uninstall" ) |
|
465 iInstallerState = EUninstalling; |
|
466 iSWInst.Uninstall( iStatus, aUid, KMidletMIMEType ); |
|
467 } |
|
468 } |
|
469 else |
|
470 { |
|
471 LOGGER_WRITE( "CSConAppInstaller::UninstallJavaL java entry does not exist -> Leave" ) |
|
472 User::Leave( KErrNotFound ); |
|
473 } |
|
474 TRACE_FUNC_EXIT; |
|
475 } |
|
476 |
|
477 // ----------------------------------------------------------------------------- |
|
478 // CSConAppInstaller::UninstallWidget( const TUid& aUid, const TSConInstallMode aMode ) |
|
479 // Uninstall widget |
|
480 // ----------------------------------------------------------------------------- |
|
481 // |
|
482 void CSConAppInstaller::UninstallWidget( const TUid& aUid, const TSConInstallMode aMode ) |
|
483 { |
|
484 TRACE_FUNC_ENTRY; |
|
485 if( aMode == ESilentInstall ) |
|
486 { |
|
487 LOGGER_WRITE( "CSConAppInstaller::UninstallWidget : silent uninstall" ) |
|
488 SwiUI::TUninstallOptionsPckg options; |
|
489 iInstallerState = ESilentUninstalling; |
|
490 iSWInst.SilentUninstall( iStatus, aUid, options, KWidgetMimeType ); |
|
491 } |
|
492 else |
|
493 { |
|
494 LOGGER_WRITE( "CSConAppInstaller::UninstallWidget : unsilent uninstall" ) |
|
495 iInstallerState = EUninstalling; |
|
496 iSWInst.Uninstall( iStatus, aUid, KWidgetMimeType ); |
|
497 } |
|
498 TRACE_FUNC_EXIT; |
|
499 } |
|
500 |
|
501 |
479 |
502 //-------------------------------------------------------------------------------- |
480 //-------------------------------------------------------------------------------- |
503 //void CSConAppInstaller::ProcessListInstalledAppsL() |
481 //void CSConAppInstaller::ProcessListInstalledAppsL() |
504 //-------------------------------------------------------------------------------- |
482 //-------------------------------------------------------------------------------- |
505 // |
483 // |