author | Santosh V Patil <santosh.v.patil@nokia.com> |
Wed, 30 Jun 2010 11:01:26 +0530 | |
branch | ADM |
changeset 48 | 364021cecc90 |
permissions | -rw-r--r-- |
48
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1 |
/* |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
8 |
* |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
11 |
* |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
13 |
* |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
15 |
* CXmlParser implementation |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
16 |
* |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
17 |
* |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
18 |
*/ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
19 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
20 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
21 |
#include <SenDomFragment.h> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
22 |
#include <SenXmlReader.h> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
23 |
#include <SenElement.h> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
24 |
#include "ADMXmlParser.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
25 |
#include "ADMPackageInfo.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
26 |
#include "macros.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
27 |
#include "config.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
28 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
29 |
_LIT(KSisExtension,".sis"); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
30 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
31 |
CXmlParser* CXmlParser::NewLC() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
32 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
33 |
CXmlParser* object = new ( ELeave ) CXmlParser(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
34 |
CleanupStack::PushL( object ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
35 |
object->ConstructL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
36 |
return object; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
37 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
38 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
39 |
CXmlParser* CXmlParser::NewL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
40 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
41 |
CXmlParser* object = CXmlParser::NewLC(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
42 |
CleanupStack::Pop(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
43 |
return object; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
44 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
45 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
46 |
CXmlParser::CXmlParser() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
47 |
:iXmlReader(NULL), |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
48 |
iDomFragment(NULL) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
49 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
50 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
51 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
52 |
CXmlParser::~CXmlParser() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
53 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
54 |
iRfs.Close(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
55 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
56 |
if ( iXmlReader ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
57 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
58 |
delete iXmlReader; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
59 |
iXmlReader = NULL; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
60 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
61 |
if ( iDomFragment ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
62 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
63 |
delete iDomFragment; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
64 |
iDomFragment = NULL; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
65 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
66 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
67 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
68 |
void CXmlParser::ConstructL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
69 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
70 |
User::LeaveIfError(iRfs.Connect()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
71 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
72 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
73 |
void CXmlParser::InitL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
74 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
75 |
// Do the cleanup as this function could be |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
76 |
// called multiple times. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
77 |
if ( iXmlReader ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
78 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
79 |
delete iXmlReader; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
80 |
iXmlReader = NULL; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
81 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
82 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
83 |
if ( iDomFragment ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
84 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
85 |
delete iDomFragment; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
86 |
iDomFragment = NULL; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
87 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
88 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
89 |
iXmlReader = CSenXmlReader::NewL(EErrorOnUnrecognisedTags); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
90 |
iDomFragment = CSenDomFragment::NewL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
91 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
92 |
iXmlReader->SetContentHandler(*iDomFragment); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
93 |
iDomFragment->SetReader(*iXmlReader); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
94 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
95 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
96 |
void CXmlParser::GetChangesInfoL(const TDesC& aChangesFileName, CPackageInfo *packageInfo,CDepTree* mainTree) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
97 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
98 |
InitL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
99 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
100 |
iXmlReader->ParseL(iRfs, aChangesFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
101 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
102 |
// Get package uid |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
103 |
// Leave if package uid not present |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
104 |
CSenElement* packageElement; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
105 |
packageElement = iDomFragment->AsElement().Element(KFieldDepPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
106 |
if (packageElement == NULL) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
107 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
108 |
User::Leave(EMissingPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
109 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
110 |
TPtrC8 packageUidPtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
111 |
TUint32 packageUid=0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
112 |
if (StringToInt(packageUidPtr,packageUid) != KErrNone) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
113 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
114 |
User::Leave(EInvalidPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
115 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
116 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
117 |
//Check whether the packageId received in changes file is same as the one already stored in the packageinfo from dependency info. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
118 |
//If there is mismatch, exit. If it matches, proceed further. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
119 |
if(packageUid != packageInfo->iPackageUid) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
120 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
121 |
User::Leave(EIncorrectPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
122 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
123 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
124 |
packageElement = iDomFragment->AsElement().Element(KFieldDepPackageName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
125 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
126 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
127 |
DELETE_IF_NONNULL( packageInfo->iPackageName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
128 |
packageInfo->iPackageName = packageElement->ContentUnicodeL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
129 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
130 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
131 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
132 |
User::Leave(EMissingPackageName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
133 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
134 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
135 |
// Get dependent package vendor |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
136 |
packageElement = iDomFragment->AsElement().Element(KFieldDepVendor); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
137 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
138 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
139 |
DELETE_IF_NONNULL( packageInfo->iVendor ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
140 |
packageInfo->iVendor = packageElement->ContentUnicodeL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
141 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
142 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
143 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
144 |
User::Leave(EMissingVendorName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
145 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
146 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
147 |
// Get Priority for the drive |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
148 |
//This is optional.Hence no Leave for Missing Priority. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
149 |
//Default is 0. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
150 |
packageElement = iDomFragment->AsElement().Element(KFieldDrivePriority); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
151 |
if(packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
152 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
153 |
TPtrC8 drivePtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
154 |
if (StringToInt(drivePtr,packageInfo->iDrivePriority) != KErrNone) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
155 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
156 |
User::Leave(EInvalidDrivePriority); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
157 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
158 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
159 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
160 |
// Get the mandatory drive. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
161 |
//This is optional.Hence no Leave for Missing info. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
162 |
//Default is none. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
163 |
packageElement = iDomFragment->AsElement().Element(KFieldMandatoryInstallDrive); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
164 |
if(packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
165 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
166 |
packageInfo->iMandatoryInstallDrive = packageElement->ContentUnicodeL()->Des()[0]; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
167 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
168 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
169 |
GetVersionInfoL(packageInfo,mainTree->GetMachineId()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
170 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
171 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
172 |
void CXmlParser::GetVersionInfoL(CPackageInfo *packageInfo,TUint32 machineId) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
173 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
174 |
RPointerArray<CSenElement> versionInfo; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
175 |
CleanupClosePushL(versionInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
176 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
177 |
iDomFragment->AsElement().ElementsL(versionInfo,KFieldVersionInformation); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
178 |
const TInt versionInfoCount(versionInfo.Count()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
179 |
TVersion latestVersion(0,0,0); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
180 |
TInt latestVersionCount = -1; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
181 |
CSenElement* packageElement; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
182 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
183 |
//Changes file will contain different versions of the package along |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
184 |
//with the list of supporrted devices for that perticular version. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
185 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
186 |
//If no version was specified in the dep file, then the latest should be read. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
187 |
//While reading the latest, it should be confirmed whether the same supports the given device. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
188 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
189 |
for (TInt i=0; i<versionInfoCount; ++i) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
190 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
191 |
packageElement = versionInfo[i]->Element(KFieldDepPackageVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
192 |
if (packageElement == NULL) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
193 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
194 |
User::Leave(EMissingDepVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
195 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
196 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
197 |
TPtrC8 versionPtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
198 |
TVersion ver; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
199 |
if (SetVersion(versionPtr, ver) == EFalse) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
200 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
201 |
User::Leave(EInvalidVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
202 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
203 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
204 |
//Check whether the MachineID of this device is supported for this corresponding version in the changes file. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
205 |
if(checkMachineIdL(versionInfo[i],machineId)) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
206 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
207 |
if((CompareVersions(packageInfo->iVersion,ver) == EEqualVersion)||(CompareVersions(packageInfo->iVersion,ver) == EGreaterSecondVersion)) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
208 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
209 |
//Version specified in the dep file of parent matches the version in the changes file which inturn matches to the MachineID. :) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
210 |
//Or there exists a greater version in changes file. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
211 |
latestVersion = ver; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
212 |
latestVersionCount = i; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
213 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
214 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
215 |
}//end of for loop |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
216 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
217 |
if(latestVersionCount == -1) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
218 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
219 |
//No matching Machine IDs at all for any version specified in the changes file. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
220 |
User::Leave(EUnsupportedDevice); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
221 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
222 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
223 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
224 |
packageInfo->iVersion = latestVersion; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
225 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
226 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
227 |
// Get dependent package URL |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
228 |
packageElement= versionInfo[latestVersionCount]->Element(KFieldDepUrl); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
229 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
230 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
231 |
DELETE_IF_NONNULL( packageInfo->iUrl ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
232 |
TPtrC8 urlPtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
233 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
234 |
HBufC8* url = urlPtr.AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
235 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
236 |
packageInfo->iUrl = url; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
237 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
238 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
239 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
240 |
User::Leave(EMissingPackageUrl); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
241 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
242 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
243 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
244 |
packageElement = versionInfo[latestVersionCount]->Element(KFieldDepFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
245 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
246 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
247 |
DELETE_IF_NONNULL( packageInfo->iDepFileName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
248 |
packageInfo->iDepFileName = packageElement->ContentUnicodeL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
249 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
250 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
251 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
252 |
User::Leave(EMissingDepFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
253 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
254 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
255 |
packageElement = versionInfo[latestVersionCount]->Element(KFieldInstallPackageName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
256 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
257 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
258 |
DELETE_IF_NONNULL( packageInfo->iSisPackageName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
259 |
packageInfo->iSisPackageName = packageElement->ContentUnicodeL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
260 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
261 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
262 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
263 |
User::Leave(EMissingSisFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
264 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
265 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
266 |
packageElement = versionInfo[latestVersionCount]->Element(KFieldDateOfSubmission); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
267 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
268 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
269 |
DELETE_IF_NONNULL( packageInfo->iDateOfSubmission ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
270 |
packageInfo->iDateOfSubmission = packageElement->ContentUnicodeL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
271 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
272 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
273 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
274 |
User::Leave(EMissingSubmissionDate); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
275 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
276 |
//TODO: There needs to be a separate function to convert the Date format into a string format. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
277 |
//Call that function here. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
278 |
packageElement = versionInfo[latestVersionCount]->Element(KFieldDateOfModification); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
279 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
280 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
281 |
DELETE_IF_NONNULL( packageInfo->iDateOfModification ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
282 |
packageInfo->iDateOfModification = packageElement->ContentUnicodeL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
283 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
284 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
285 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
286 |
User::Leave(EMissingModificationDate); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
287 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
288 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
289 |
packageElement = versionInfo[latestVersionCount]->Element(KFieldDownloadSize); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
290 |
TPtrC8 downloadSizePtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
291 |
TUint32 downloadSize=0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
292 |
if (StringToInt(downloadSizePtr,downloadSize) != KErrNone) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
293 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
294 |
User::Leave(EInvalidPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
295 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
296 |
if(downloadSize) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
297 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
298 |
packageInfo->iDownloadSize = downloadSize; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
299 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
300 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
301 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
302 |
User::Leave(EMissingDownloadSize); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
303 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
304 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
305 |
packageElement = versionInfo[latestVersionCount]->Element(KFieldInstalledSize); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
306 |
TPtrC8 installedSizePtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
307 |
TUint32 installedSize=0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
308 |
if (StringToInt(installedSizePtr,installedSize) != KErrNone) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
309 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
310 |
User::Leave(EInvalidPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
311 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
312 |
if(installedSize) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
313 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
314 |
packageInfo->iInstalledSize = installedSize; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
315 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
316 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
317 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
318 |
User::Leave(EMissingInstalledSize); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
319 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
320 |
CleanupStack::PopAndDestroy(&versionInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
321 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
322 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
323 |
TBool CXmlParser::checkMachineIdL(CSenElement *versionInfo, TUint32 machineId) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
324 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
325 |
RPointerArray<CSenElement> deviceInfo; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
326 |
CleanupClosePushL(deviceInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
327 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
328 |
versionInfo->ElementsL(deviceInfo,KFieldSupportedDevice); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
329 |
const TInt deviceInfoCount(deviceInfo.Count()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
330 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
331 |
CSenElement* packageElement; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
332 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
333 |
// See if the device is supported by this |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
334 |
// particular version, by comparing the list |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
335 |
// of machine ids supported by the version |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
336 |
// with the machine id of device. . |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
337 |
for(TInt i=0;i<deviceInfoCount;i++) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
338 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
339 |
packageElement = deviceInfo[i]->Element(KFieldDeviceMachineId); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
340 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
341 |
if (packageElement == NULL) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
342 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
343 |
User::Leave(EMissingMachineID); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
344 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
345 |
TPtrC8 packageUidPtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
346 |
TUint32 changesMachineId = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
347 |
if (StringToInt(packageUidPtr,changesMachineId) != KErrNone) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
348 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
349 |
User::Leave(EInvalidMachineID); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
350 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
351 |
if(changesMachineId == machineId) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
352 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
353 |
CleanupStack::PopAndDestroy(&deviceInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
354 |
return ETrue; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
355 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
356 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
357 |
CleanupStack::PopAndDestroy(&deviceInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
358 |
return EFalse; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
359 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
360 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
361 |
CPackageInfo* CXmlParser::GetDepContentsL(const TDesC& aDepFileName, CPackageInfo *packageInfo, CDepTree* aMainTree) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
362 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
363 |
InitL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
364 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
365 |
iXmlReader->ParseL(iRfs, aDepFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
366 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
367 |
// Get package uid |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
368 |
// Leave if package uid not present |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
369 |
CSenElement* packageElement; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
370 |
packageElement = iDomFragment->AsElement().Element(KFieldPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
371 |
if (packageElement == NULL) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
372 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
373 |
User::Leave(EMissingPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
374 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
375 |
TPtrC8 packageUidPtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
376 |
TUint32 packageUid=0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
377 |
if (StringToInt(packageUidPtr,packageUid) != KErrNone) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
378 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
379 |
User::Leave(EInvalidPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
380 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
381 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
382 |
User::LeaveIfNull(aMainTree); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
383 |
if(aMainTree->IsDepTreeEmpty()) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
384 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
385 |
// Add root package(first package) to the list |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
386 |
packageInfo = CPackageInfo::NewL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
387 |
packageInfo->iPackageUid = packageUid; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
388 |
packageInfo->iPackageStatus = EPackageRootToBeInstalled; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
389 |
aMainTree->AddPackageInfo(packageInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
390 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
391 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
392 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
393 |
User::LeaveIfNull(packageInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
394 |
if(packageInfo->iPackageUid != packageUid) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
395 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
396 |
//the package pointer doesn't match the depfile |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
397 |
User::Leave(EInvalidPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
398 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
399 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
400 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
401 |
// Get Dep version |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
402 |
// Leave if Dep version is not present |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
403 |
packageElement = iDomFragment->AsElement().Element(KFieldDepVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
404 |
if (packageElement == NULL) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
405 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
406 |
User::Leave(EMissingDepVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
407 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
408 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
409 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
410 |
TPtrC8 versionPtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
411 |
TVersion ver; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
412 |
if (SetVersion(versionPtr, ver) == EFalse) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
413 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
414 |
User::Leave(EInvalidVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
415 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
416 |
packageInfo->iDepVersion = ver; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
417 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
418 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
419 |
// Parse the dependencies |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
420 |
SetDependenciesL(packageInfo, aMainTree); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
421 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
422 |
return packageInfo; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
423 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
424 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
425 |
void CXmlParser::SetDependenciesL(CPackageInfo* aPackageInfo, CDepTree* aMainTree) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
426 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
427 |
// Get dependencies |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
428 |
RPointerArray<CSenElement> dependency; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
429 |
CleanupClosePushL(dependency); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
430 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
431 |
iDomFragment->AsElement().ElementsL(dependency,KFieldDependency); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
432 |
const TInt DependencyCount(dependency.Count()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
433 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
434 |
User::LeaveIfNull(aMainTree); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
435 |
User::LeaveIfNull(aPackageInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
436 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
437 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
438 |
TBool IsNonRootNodeDep = 1; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
439 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
440 |
// Check if the dependencies are of the root node. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
441 |
// If yes, then clear the flag |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
442 |
if (aMainTree->GetRootNode() == aPackageInfo) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
443 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
444 |
IsNonRootNodeDep = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
445 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
446 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
447 |
for (TInt i=0; i<DependencyCount; ++i) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
448 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
449 |
// Get dependency UID |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
450 |
CSenElement* packageElement; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
451 |
TUint32 depPackageUid = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
452 |
packageElement = dependency[i]->Element(KFieldDepPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
453 |
if (packageElement == NULL) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
454 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
455 |
User::Leave(EMissingPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
456 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
457 |
TPtrC8 depPackageUidPtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
458 |
if ( StringToInt(depPackageUidPtr,depPackageUid) != KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
459 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
460 |
User::Leave(EInvalidPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
461 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
462 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
463 |
// Check if the dependency already present in the tree. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
464 |
CPackageInfo* depPackageInfo = aMainTree->LocatePackageInDepTree(depPackageUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
465 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
466 |
// If dependency is listed in the tree, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
467 |
// create a new edge for it |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
468 |
if (depPackageInfo != NULL) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
469 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
470 |
aPackageInfo->AddEdgeL(depPackageInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
471 |
continue; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
472 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
473 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
474 |
// Dependency is not already present, so create a new node |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
475 |
depPackageInfo = CPackageInfo::NewL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
476 |
aMainTree->AddPackageInfo(depPackageInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
477 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
478 |
depPackageInfo->iPackageUid = depPackageUid; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
479 |
aPackageInfo->AddEdgeL(depPackageInfo); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
480 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
481 |
// Get dependent package name |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
482 |
packageElement = dependency[i]->Element(KFieldDepPackageName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
483 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
484 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
485 |
depPackageInfo->iPackageName = packageElement->ContentUnicodeL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
486 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
487 |
else if(IsNonRootNodeDep) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
488 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
489 |
User::Leave(EMissingPackageName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
490 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
491 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
492 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
493 |
depPackageInfo->iPackageName = HBufC::NewL( |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
494 |
depPackageUidPtr.Length() + |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
495 |
KSisExtension().Length()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
496 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
497 |
TPtr depPackageName(depPackageInfo->iPackageName->Des()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
498 |
depPackageName.Copy(depPackageUidPtr); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
499 |
depPackageName.Append(KSisExtension); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
500 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
501 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
502 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
503 |
// Get dependent package version |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
504 |
packageElement = dependency[i]->Element(KFieldDepPackageVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
505 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
506 |
if(packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
507 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
508 |
TPtrC8 versionPtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
509 |
TVersion ver; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
510 |
if (SetVersion(versionPtr, ver) == EFalse) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
511 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
512 |
User::Leave(EInvalidVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
513 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
514 |
depPackageInfo->iVersion = ver; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
515 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
516 |
else if(IsNonRootNodeDep) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
517 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
518 |
User::Leave(EMissingPackageVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
519 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
520 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
521 |
// Get dependent package vendor |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
522 |
packageElement = dependency[i]->Element(KFieldDepVendor); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
523 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
524 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
525 |
depPackageInfo->iVendor = packageElement->ContentUnicodeL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
526 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
527 |
else if(IsNonRootNodeDep) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
528 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
529 |
User::Leave(EMissingVendorName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
530 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
531 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
532 |
#ifdef url_support |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
533 |
// Get dependent package URL |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
534 |
packageElement = dependency[i]->Element(KFieldDepUrl); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
535 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
536 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
537 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
538 |
TPtrC8 urlPtr = packageElement->Content(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
539 |
HBufC8* url = urlPtr.AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
540 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
541 |
TPtr8 urlPtr2 = url->Des(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
542 |
urlPtr2.Copy(urlPtr); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
543 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
544 |
depPackageInfo->iUrl = url; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
545 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
546 |
else if(IsNonRootNodeDep) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
547 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
548 |
User::Leave(EMissingPackageUrl); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
549 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
550 |
#else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
551 |
// Ignore the Url(if specified) for the root node. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
552 |
if(IsNonRootNodeDep) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
553 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
554 |
// Get dependent package URL |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
555 |
packageElement = dependency[i]->Element(KFieldDepUrl); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
556 |
if (packageElement) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
557 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
558 |
depPackageInfo->iUrl = packageElement->Content().AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
559 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
560 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
561 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
562 |
User::Leave(EMissingPackageUrl); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
563 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
564 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
565 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
566 |
//Set the changes file name |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
567 |
depPackageInfo->SetChangesFileNameL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
568 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
569 |
CleanupStack::PopAndDestroy(&dependency); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
570 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
571 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
572 |
TInt CXmlParser::StringToInt(const TDesC8& aString, TUint32& aInt) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
573 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
574 |
// Function will return EFalse if string conversion fails. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
575 |
TLex8 lex(aString); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
576 |
lex.SkipSpace(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
577 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
578 |
if (lex.Peek() == '0') |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
579 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
580 |
lex.Inc(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
581 |
TChar c( lex.Peek() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
582 |
c.LowerCase(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
583 |
if (c == 'x') |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
584 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
585 |
lex.Inc(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
586 |
return ( lex.Val(aInt,EHex) ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
587 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
588 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
589 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
590 |
lex.UnGet(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
591 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
592 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
593 |
return ( lex.Val(aInt,EDecimal) ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
594 |
} |