equal
deleted
inserted
replaced
353 */ |
353 */ |
354 void CPlanner::CreateNewNodesL(RPointerArray<CSisRegistryPackage>& aProcessPackages, CUninstallationNode& aParentNode, RPointerArray<CSisRegistryPackage>& aPlannedPackages) |
354 void CPlanner::CreateNewNodesL(RPointerArray<CSisRegistryPackage>& aProcessPackages, CUninstallationNode& aParentNode, RPointerArray<CSisRegistryPackage>& aPlannedPackages) |
355 { |
355 { |
356 // We are removing items from array (aProcessPackages)and thus require index |
356 // We are removing items from array (aProcessPackages)and thus require index |
357 // adjustment. But if loop run in reverse order there is no need to adjust the index |
357 // adjustment. But if loop run in reverse order there is no need to adjust the index |
|
358 CleanupResetAndDestroyPushL(aPlannedPackages); |
358 for (TInt i = aProcessPackages.Count() - 1; i >= 0; --i) |
359 for (TInt i = aProcessPackages.Count() - 1; i >= 0; --i) |
359 { |
360 { |
360 // Ignore already added package |
361 // Ignore already added package |
361 if (IsInPlannedPackages(aPlannedPackages, *aProcessPackages[i])) |
362 if (IsInPlannedPackages(aPlannedPackages, *aProcessPackages[i])) |
362 { |
363 { |
395 aPlannedPackages.AppendL(aProcessPackages[i]); |
396 aPlannedPackages.AppendL(aProcessPackages[i]); |
396 // Ownership is transfered from aProcessPackages to aPlannedPackages |
397 // Ownership is transfered from aProcessPackages to aPlannedPackages |
397 aProcessPackages.Remove(i); |
398 aProcessPackages.Remove(i); |
398 CleanupStack::PopAndDestroy(®istryEntry); |
399 CleanupStack::PopAndDestroy(®istryEntry); |
399 } |
400 } |
|
401 CleanupStack::Pop(&aPlannedPackages); |
400 } |
402 } |
401 |
403 |
402 /** |
404 /** |
403 * This functions determines whether it is now okay to confirm the removal of the package(Node in the uninstallation tree). |
405 * This functions determines whether it is now okay to confirm the removal of the package(Node in the uninstallation tree). |
404 * |
406 * |
517 { |
519 { |
518 DEBUG_PRINTF3(_L("CPlanner::CreatePlannedApplicationL failed to publish Uid %x with error."),aRootNode.PackageL().Uid(), err); |
520 DEBUG_PRINTF3(_L("CPlanner::CreatePlannedApplicationL failed to publish Uid %x with error."),aRootNode.PackageL().Uid(), err); |
519 User::Leave(err); |
521 User::Leave(err); |
520 } |
522 } |
521 } |
523 } |
|
524 |
522 CleanupStack::Pop(rootApplication); |
525 CleanupStack::Pop(rootApplication); |
523 |
526 |
524 return rootApplication; |
527 return rootApplication; |
525 } |
528 } |
526 |
529 |
531 * @param aNode The CApplication object to populate. |
534 * @param aNode The CApplication object to populate. |
532 * @param aRegistryEntry The relevant SIS Registry entry for the package. |
535 * @param aRegistryEntry The relevant SIS Registry entry for the package. |
533 */ |
536 */ |
534 void CPlanner::ConfirmForUninstallL(CUninstallationNode& aNode, RPointerArray<CSisRegistryPackage>& aPlannedPackages) |
537 void CPlanner::ConfirmForUninstallL(CUninstallationNode& aNode, RPointerArray<CSisRegistryPackage>& aPlannedPackages) |
535 { |
538 { |
|
539 CleanupResetAndDestroyPushL(aPlannedPackages); |
536 aNode.SetIsPlanned(ETrue); |
540 aNode.SetIsPlanned(ETrue); |
537 |
541 |
538 // aNode owns package therefore to transfer the ownership |
542 // aNode owns package therefore to transfer the ownership |
539 // a copy of CSisRegistryPackage is made. |
543 // a copy of CSisRegistryPackage is made. |
540 CSisRegistryPackage* package = CSisRegistryPackage::NewLC(aNode.PackageL()); |
544 CSisRegistryPackage* package = CSisRegistryPackage::NewLC(aNode.PackageL()); |
541 aPlannedPackages.AppendL(package); |
545 aPlannedPackages.AppendL(package); |
542 CleanupStack::Pop(package); |
546 CleanupStack::Pop(2, &aPlannedPackages); |
543 } |
547 } |
544 |
548 |
545 /** |
549 /** |
546 * This function is called after the node/package is marked for uninstallation. |
550 * This function is called after the node/package is marked for uninstallation. |
547 * So it will fully populate the details of CApplication object. |
551 * So it will fully populate the details of CApplication object. |