1 /* |
1 /* |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
40 #include "sisregistryproperty.h" |
40 #include "sisregistryproperty.h" |
41 #include "cleanuputils.h" |
41 #include "cleanuputils.h" |
42 #include <usif/usifcommon.h> |
42 #include <usif/usifcommon.h> |
43 #include <swi/sisregistrylog.h> |
43 #include <swi/sisregistrylog.h> |
44 #include <scs/streamingarray.h> |
44 #include <scs/streamingarray.h> |
|
45 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
45 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
46 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
46 #include "screntries_internal.h" |
47 #include "screntries_internal.h" |
47 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
48 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
|
49 #endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
48 |
50 |
49 using namespace Swi; |
51 using namespace Swi; |
50 |
52 |
51 // Store the SIS Registry Object details in to the Software Component Registry - SCR. |
53 // Store the SIS Registry Object details in to the Software Component Registry - SCR. |
52 // The component object should have been fully constructed before calling this method. |
54 // The component object should have been fully constructed before calling this method. |
114 ExternalizePropertiesArrayL(aScrSession, aCompId, aObject.iProperties); |
116 ExternalizePropertiesArrayL(aScrSession, aCompId, aObject.iProperties); |
115 ExternalizeFileDescriptionsArrayL(aScrSession, aCompId, aObject.FileDescriptions()); |
117 ExternalizeFileDescriptionsArrayL(aScrSession, aCompId, aObject.FileDescriptions()); |
116 WriteToScrL(aScrSession, aCompId, aObject.TrustStatus()); |
118 WriteToScrL(aScrSession, aCompId, aObject.TrustStatus()); |
117 ExternalizeChainIndexArrayL(aScrSession, aCompId, aObject.InstallChainIndicies()); |
119 ExternalizeChainIndexArrayL(aScrSession, aCompId, aObject.InstallChainIndicies()); |
118 } |
120 } |
119 |
|
120 void ScrHelperUtil::AddApplicationEntryL(Usif::RSoftwareComponentRegistry& aScrSession, Usif::TComponentId& aCompId, const Usif::CApplicationRegistrationData& aApplicationRegistrationData) |
|
121 { |
|
122 aScrSession.AddApplicationEntryL(aCompId, aApplicationRegistrationData); |
|
123 } |
|
124 |
|
125 void ScrHelperUtil::DeleteApplicationEntriesL(Usif::RSoftwareComponentRegistry& aScrSession, Usif::TComponentId& aCompId) |
|
126 { |
|
127 aScrSession.DeleteApplicationEntriesL(aCompId); |
|
128 } |
|
129 |
|
130 void ScrHelperUtil::DeleteApplicationEntryL(Usif::RSoftwareComponentRegistry& aScrSession, const TUid& aAppUId) |
|
131 { |
|
132 aScrSession.DeleteApplicationEntryL(aAppUId); |
|
133 } |
|
134 |
121 |
135 void ScrHelperUtil::WriteToScrL(Usif::RSoftwareComponentRegistry& aScrSession, Usif::TComponentId& aCompId, CSisRegistryObject& aObject, Usif::TScrComponentOperationType aOpType) |
122 void ScrHelperUtil::WriteToScrL(Usif::RSoftwareComponentRegistry& aScrSession, Usif::TComponentId& aCompId, CSisRegistryObject& aObject, Usif::TScrComponentOperationType aOpType) |
136 { |
123 { |
137 |
124 |
138 // Add the component name, it's vendor name and the supporting language in to the SCR. |
125 // Add the component name, it's vendor name and the supporting language in to the SCR. |
421 |
408 |
422 const TDesC& fileTarget = aFileDescriptionArray[index]->Target(); |
409 const TDesC& fileTarget = aFileDescriptionArray[index]->Target(); |
423 TPtrC fileTargetPtr(fileTarget); |
410 TPtrC fileTargetPtr(fileTarget); |
424 if (filenamesArray.SpecificFindInOrder(fileTargetPtr, descriptorsComparator, EArrayFindMode_First) != KErrNotFound) |
411 if (filenamesArray.SpecificFindInOrder(fileTargetPtr, descriptorsComparator, EArrayFindMode_First) != KErrNotFound) |
425 continue; // Skip duplicates |
412 continue; // Skip duplicates |
426 filenamesArray.InsertInOrderL(fileTargetPtr, descriptorsComparator); |
413 filenamesArray.InsertInOrder(fileTargetPtr, descriptorsComparator); |
427 |
414 |
428 if (IsWildcardFile(fileTarget)) |
415 if (IsWildcardFile(fileTarget)) |
429 { |
416 { |
430 // Calls the method with ETrue if it's wild carded file. |
417 // Calls the method with ETrue if it's wild carded file. |
431 WriteToScrL(aScrSession, aCompId, *(aFileDescriptionArray[index]), ETrue, wildCardFileCount, -1); |
418 WriteToScrL(aScrSession, aCompId, *(aFileDescriptionArray[index]), ETrue, wildCardFileCount, -1); |