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 |
* CADMAppUi 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 FILES |
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 <ADM.rsg> |
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 <ADM.mbg> |
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 <bacline.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 <COEUTILS.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 <mmtsy_names.h> // Phone information |
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 <hal.h> // Hal::GetData() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
28 |
#include <PathInfo.h> // PathInfo:: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
29 |
#include <sysutil.h> // SysUtil::DiskSpaceBelowCriticalLevel(), GetSWVersion() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
30 |
#include <stringloader.h> // StringLoader::LoadLC() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
31 |
#include <aknquerydialog.h> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
32 |
#include <aknnotewrappers.h> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
33 |
#include <avkon.rsg> // Default dialogs |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
34 |
#include <BAUTILS.H> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
35 |
#include <rconnmon.h> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
36 |
#include "ADM.hrh" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
37 |
#include "ADM.pan" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
38 |
#include "ADMApplication.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
39 |
#include "ADMAppUi.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
40 |
#include "ADMStateMachine.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
41 |
#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
|
42 |
#include "ADMSisParser.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
43 |
#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
|
44 |
#include "ADMDownloadHandler.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
45 |
#include "ADMInstallManager.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
46 |
#include "networkstatuslistener.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
47 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
48 |
#include "debug.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
49 |
#include "globals.h" |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
50 |
#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
|
51 |
#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
|
52 |
#include "utils.h" |
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 |
#ifdef USE_LOGFILE |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
55 |
_LIT(KADMLogDir, "ADM"); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
56 |
_LIT(KADMLogFileName, "log.txt" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
57 |
_LIT(KADMLogFile, "?:\\logs\\ADM\\log.txt"); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
58 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
59 |
|
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 |
* Download path for dependency packages |
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 |
_LIT(KADMFolderPath,"?:\\system\\adm\\"); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
64 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
65 |
// ============================ MEMBER FUNCTIONS =============================== |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
66 |
void CADMAppUi::ConstructL() |
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 |
LOG( "+ CADMAppUi::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 |
// Hide from application task list |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
71 |
HideApplicationFromFSW(); |
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 |
// Initialise app UI with standard value. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
74 |
BaseConstructL( ENoScreenFurniture /*CAknAppUi::EAknEnableSkin*/); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
75 |
StatusPane()->MakeVisible(EFalse); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
76 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
77 |
// Set download path |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
78 |
TChar systemDrive; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
79 |
RFs::DriveToChar(RFs::GetSystemDrive(), systemDrive); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
80 |
HBufC* downloadPath = KADMFolderPath().AllocLC(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
81 |
downloadPath->Des()[0] = systemDrive; |
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 |
// Create the state machine |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
84 |
iStateMachine = CStateMachine::NewL(*this, *downloadPath); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
85 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
86 |
iRfs = iEikonEnv->FsSession(); |
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 |
iOviStoreRunning = CUtils::OviStoreRunning(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
89 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
90 |
// Process command line arguments |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
91 |
ProcessCommandLineArgsL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
92 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
93 |
iProgress = CProgressDialog::NewL(*this); |
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 |
// If we don't have exit reason set, we can show the progress already |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
96 |
if (iExitReason == EExitNoError) |
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 |
// Show progress bar with little progress already early on |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
99 |
const TInt waitNoteRes = iResumingInstallation |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
100 |
? R_ADM_CONTINUING_INST_TEXT |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
101 |
: R_ADM_VERIFYING_SW_TEXT; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
102 |
ShowGlobalProgressL( waitNoteRes, 1, 10 ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
103 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
104 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
105 |
iSwVersion = HBufC::NewL(KSysUtilVersionTextLength); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
106 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
107 |
// Initialize the telephone server |
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::LeaveIfError( iTelServer.Connect() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
109 |
User::LeaveIfError( iTelServer.LoadPhoneModule( KMmTsyModuleName ) ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
110 |
User::LeaveIfError( iPhone.Open( iTelServer, KMmTsyPhoneName ) ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
111 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
112 |
// Get device information |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
113 |
User::LeaveIfError( GetPhoneInformation() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
114 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
115 |
// Ignore the return code. Default URL will be used if error happens (leaves if no memory) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
116 |
ReadConfigurationL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
117 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
118 |
ReadStaticResourcesL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
119 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
120 |
// Kick the state machine running |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
121 |
iStateMachine->Start(); |
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 |
CleanupStack::PopAndDestroy(downloadPath); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
124 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
125 |
LOG( "- CADMAppUi::ConstructL()" ); |
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 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
128 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
129 |
// CADMAppUi::CADMAppUi() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
130 |
// C++ default constructor can NOT contain any code, that might leave. |
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 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
133 |
CADMAppUi::CADMAppUi() : |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
134 |
iExitReason(EExitNoError), |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
135 |
iIAP(KInvalidIapId), |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
136 |
iIsResumeRequired(ETrue) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
137 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
138 |
// disable possible transition effects |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
139 |
SetFullScreenApp(EFalse); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
140 |
INIT_DEBUG_LOG( KADMLogFile(), KADMLogDir, KADMLogFileName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
141 |
LOG( "CADMAppUi::CADMAppUi()" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
142 |
// Restore our thread priority to normal, we have been launched |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
143 |
// with EPriorityBackground |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
144 |
// RThread().SetPriority(EPriorityNormal); |
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 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
148 |
// CADMAppUi::~CADMAppUi() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
149 |
// Destructor. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
150 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
151 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
152 |
CADMAppUi::~CADMAppUi() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
153 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
154 |
LOG( "CADMAppUi::~CADMAppUi()" ); |
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 |
// Stop the state machine |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
157 |
iStateMachine->Stop(); |
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 |
// Just be make sure that all global stuff is out from the screen |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
160 |
CancelProgressBar(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
161 |
CancelWaitNote(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
162 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
163 |
iPhone.Close(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
164 |
iTelServer.Close(); |
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 |
DELETE_IF_NONNULL( iQueryMessage ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
167 |
DELETE_IF_NONNULL( iGlobalConfirmationQuery ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
168 |
DELETE_IF_NONNULL( iGlobalQueryObserver ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
169 |
delete iAppIconFilename; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
170 |
delete iMainAppName; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
171 |
delete iConfigUrl; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
172 |
delete iSwVersion; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
173 |
delete iProgress; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
174 |
delete iDepFileName; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
175 |
delete iSisFileName; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
176 |
delete iStateMachine; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
177 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
178 |
CLOSE_DEBUG_LOG; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
179 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
180 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
181 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
182 |
// Processes the command line parameters and sets state machine initial |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
183 |
// state according to the parameters. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
184 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
185 |
// Requires that the state machine has been instantiated (iStateMachine). |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
186 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
187 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
188 |
void CADMAppUi::ProcessCommandLineArgsL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
189 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
190 |
LOG( "+ ProcessCommandLineArgsL()" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
191 |
CCommandLineArguments* args = CCommandLineArguments::NewLC(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
192 |
const TInt count = args->Count(); |
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 |
#ifdef FEATURE_INSTALL_RESUME |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
195 |
// If ADM is launched from the menu, we don't get any command line parameters |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
196 |
// Need to read the info from the resume info file, if it exists. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
197 |
if (count == 1) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
198 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
199 |
CleanupStack::PopAndDestroy(args); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
200 |
const TInt ret = ReadResumeInfoL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
201 |
if (ret != KErrNone) |
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 |
ShowGlobalNoteL(EAknGlobalErrorNote, R_ADM_ERR_NO_PENDING_INSTALLATIONS_TEXT); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
204 |
ExitApp(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
205 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
206 |
iResumingInstallation = ETrue; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
207 |
return; |
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 |
#else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
210 |
if (count == 1) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
211 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
212 |
User::Leave( KErrNotSupported ); |
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 |
#endif // FEATURE_INSTALL_RESUME |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
215 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
216 |
// index to the command line args, starting at 1 (0 = executable name) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
217 |
TInt index = 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 |
#ifdef DO_LOG |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
220 |
for (int i = 0; i < count; i++) |
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 |
LOG3( "Arg[%d]='%S'", i, &(args->Arg(i)) ); |
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 |
#endif |
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 |
TPtrC arg = args->Arg(index++); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
227 |
TLex lex(arg); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
228 |
TUint32 protocolVerRaw = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
229 |
TUint32 protocolVer = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
230 |
TUint32 tmp; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
231 |
if ( lex.Val(protocolVerRaw, EDecimal) == 0) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
232 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
233 |
LOG3( "(cmd) pVer(raw) = %d (%03x)", protocolVerRaw, protocolVerRaw ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
234 |
protocolVer = (protocolVerRaw & KCmdLineBitProtocolVerMask); |
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 |
else |
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 |
LOG( "Invalid P/BVersion, PANIC" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
239 |
Panic(EPanicAdmCmdLineArgs); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
240 |
} |
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 |
if (protocolVer < 15) |
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 |
// assume it's old version without the bit field support |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
245 |
LOG2( "Using old args %d", protocolVer ); |
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 |
// Following are the command line args passed in the old version of Bootstrap: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
248 |
// arg 0 - ADM.exe |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
249 |
// arg 1 - Bootstrap Version |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
250 |
// arg 2 - WrapperUid |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
251 |
// arg 3 - IAP |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
252 |
// arg 4 - Sisfilename |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
253 |
// arg 5 - Depfilename (optional) |
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 |
// Get the Bootstrap version |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
256 |
iBootstrapVersion = protocolVer; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
257 |
LOG2("(cmd) BVersion: %x", iBootstrapVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
258 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
259 |
// Get the Wrapper uid |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
260 |
TPtrC uidPtr = args->Arg(index++); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
261 |
lex.Assign(uidPtr); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
262 |
TUint32 uid = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
263 |
if ( lex.Val(uid, EDecimal ) == 0) |
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 |
LOG2("(cmd) Wrapper Uid: 0x%x", uid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
266 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
267 |
iWrapperPackageUid = TUid::Uid(uid); |
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 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
270 |
// See if at least the minimum options required are provided |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
271 |
if (count < 5) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
272 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
273 |
LOG2( "Incorrect # of arguments (%d) passed from bootstrap, PANIC", count ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
274 |
Panic(EPanicAdmCmdLineArgs); |
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 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
277 |
// Get Iap |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
278 |
TPtrC iapPtr = args->Arg(index++); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
279 |
lex.Assign(iapPtr); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
280 |
if ( lex.Val(iIAP, EDecimal) == 0 ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
281 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
282 |
LOG2("(cmd) IAP: %d", iIAP); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
283 |
iStateMachine->SetIAP(iIAP); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
284 |
} |
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 |
switch (iBootstrapVersion) |
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 |
case 1: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
289 |
case 2: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
290 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
291 |
if ( count != 6 ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
292 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
293 |
LOG2( "Incorrect # of arguments (%d) passed from bootstrap, PANIC", count ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
294 |
Panic(EPanicAdmCmdLineArgs); |
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 |
iDepFileName = args->Arg(index++).AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
297 |
LOG2( "(cmd) DepFile: '%S'", iDepFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
298 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
299 |
iSisFileName = args->Arg(index++).AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
300 |
LOG2( "(cmd) AppSis: '%S'", iSisFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
301 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
302 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
303 |
case 3: |
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 |
iDepFileName = args->Arg(index++).AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
306 |
LOG2( "(cmd) DepFile: '%S'", iDepFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
307 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
308 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
309 |
case 4: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
310 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
311 |
iSisFileName = args->Arg(index++).AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
312 |
LOG2( "(cmd) AppSis: '%S'", iSisFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
313 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
314 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
315 |
default: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
316 |
LOG2( "Invalid BVersion %d, PANIC", iBootstrapVersion ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
317 |
Panic(EPanicAdmCmdLineArgs); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
318 |
break; |
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 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
321 |
else if (protocolVer == 15) |
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 |
LOG( "Using new args" ); |
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 |
// Command line arguments, version 15 specification: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
326 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
327 |
//31 9 8 7 6 5 4 3 2 1 0 |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
328 |
// +-------------+--+--+--+--+--+--+--+--+--+--+ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
329 |
// | reserved | | | | | | | | |
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 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
332 |
// value |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
333 |
// bits range description |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
334 |
// 0-3 0-15 Command line parameter protocol version: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
335 |
// 0 = not supported |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
336 |
// 1 = ADM.exe 1 <wrapper_uid> <iap> <depfile> <sisfile> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
337 |
// 2 = ADM.exe 2 <wrapper_uid> <iap> <depfile> <sisfile> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
338 |
// 3 = ADM.exe 3 <wrapper_uid> <iap> <depfile> |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
339 |
// 4 = ADM.exe 4 <wrapper_uid> <iap> <sisfile> (this was used in beta1, beta2) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
340 |
// 15 = ADM.exe 15 [parameters as specified by other bits] |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
341 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
342 |
// since |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
343 |
// bit version type command line parameter present |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
344 |
// 4 4 N Bootstrap version number |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
345 |
// 5 4 N Wrapper UID |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
346 |
// 6 4 N IAP |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
347 |
// 7 4 N ADM launch condition code: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
348 |
// KCmdLineCancelAdm: ADM needs to cancel installation |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
349 |
// KCmdLineLaunchAdm: ADM starts normally |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
350 |
// 8 4 S Full path to dependency XML file |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
351 |
// 9 4 S Full path to application SIS file |
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 |
// Types: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
354 |
// N Natural decimal number (range 0 - 2^32-1, fits to TUint32) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
355 |
// S UTF-8 string, must NOT contains spaces or other whitespaces |
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 |
// Command line parameters appear in the order of the bits set, i.e. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
358 |
// if bits 4, 8, 9 are set the command line parameters are: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
359 |
// ADM.exe 784 <bootstrap_version> <dep_file> <sis_file> |
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 |
// If command line protocol version is less than 15, it is assumed that |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
362 |
// old version command line parameter format is used. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
363 |
// |
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 |
// new version. bit fields define which parameters are present |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
366 |
// these has to be processed in the right order: from LSB to MSB |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
367 |
if (protocolVerRaw & KCmdLineBitBootstrapVersion) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
368 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
369 |
TPtrC arg = args->Arg(index++); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
370 |
lex.Assign(arg); |
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 ( lex.Val(iBootstrapVersion) == 0 ) |
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 |
LOG2( "(cmd) BVersion: %x", iBootstrapVersion ); |
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 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
376 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
377 |
LOG( "Invalid BVersion" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
378 |
Panic(EPanicAdmCmdInvalidBootstrap); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
379 |
} |
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 |
if (protocolVerRaw & KCmdLineBitWrapperUid) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
382 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
383 |
TPtrC arg = args->Arg(index++); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
384 |
lex.Assign(arg); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
385 |
if ( lex.Val(tmp, EDecimal) == 0 ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
386 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
387 |
LOG2("(cmd) Wrapper Uid: 0x%x", tmp); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
388 |
iWrapperPackageUid = TUid::Uid(tmp); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
389 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
390 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
391 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
392 |
LOG( "Invalid wrapper 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
|
393 |
Panic(EPanicAdmCmdInvalidWrapperUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
394 |
} |
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 |
if (protocolVerRaw & KCmdLineBitIAP) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
397 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
398 |
TPtrC arg = args->Arg(index++); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
399 |
lex.Assign(arg); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
400 |
if ( lex.Val(iIAP, EDecimal) == 0 ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
401 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
402 |
LOG2("(cmd) IAP: %d", iIAP); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
403 |
iStateMachine->SetIAP(iIAP); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
404 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
405 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
406 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
407 |
LOG( "Invalid IAP" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
408 |
Panic(EPanicAdmCmdInvalidIAP); |
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 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
411 |
if (protocolVerRaw & KCmdLineBitADMLaunchControl) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
412 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
413 |
TPtrC arg = args->Arg(index++); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
414 |
lex.Assign(arg); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
415 |
if ( lex.Val(tmp, EDecimal) == 0 ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
416 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
417 |
LOG2("(cmd) LState %d", tmp); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
418 |
switch (tmp) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
419 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
420 |
case KCmdLineLaunchAdm: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
421 |
// this is valid, nothing needs to be done |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
422 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
423 |
case KCmdLineCancelAdmNoResume: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
424 |
iIsResumeRequired = EFalse; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
425 |
// fall-through |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
426 |
case KCmdLineCancelAdm: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
427 |
iStateMachine->SetStartState(CStateFactory::EStatePrepareExitWithError); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
428 |
iStateMachine->SetFailureReason(EUserCancelled); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
429 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
430 |
default: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
431 |
LOG2( "Invalid LState %d, PANIC", tmp ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
432 |
Panic(EPanicAdmCmdInvalidLaunchState2); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
433 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
434 |
} // switch |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
435 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
436 |
else |
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 |
LOG( "Invalid LState, PANIC" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
439 |
Panic(EPanicAdmCmdInvalidLaunchState); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
440 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
441 |
} |
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 (protocolVerRaw & KCmdLineBitFileDep) |
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 |
iDepFileName = args->Arg(index++).AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
445 |
LOG2( "(cmd) DepFile: '%S'", iDepFileName); |
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 |
if (protocolVerRaw & KCmdLineBitFileSis) |
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 |
iSisFileName = args->Arg(index++).AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
450 |
LOG2( "(cmd) SisFile: '%S'", iSisFileName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
451 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
452 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
453 |
else |
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 |
LOG2( "Invalid PVersion %d, PANIC", protocolVer ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
456 |
Panic(EPanicAdmCmdInvalidProtocol); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
457 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
458 |
CleanupStack::PopAndDestroy(args); |
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 |
LOG3( "- ProcessCommandLineArgsL(): %d->%d", count, index ); |
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 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
464 |
// Read the information from the resume info file, if launched from the menu. |
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 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
467 |
TInt CADMAppUi::ReadResumeInfoL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
468 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
469 |
LOG( "+ ReadResumeInfo()" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
470 |
RArray< TPtrC > lineBuffer; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
471 |
TInt err = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
472 |
HBufC* buffer = ReadConfigFile( iRfs, KADMResumeInfoFile, lineBuffer, err ); |
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 |
if ( buffer && err == KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
475 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
476 |
// Read the main application name |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
477 |
TPtrC namePtr = GetConfigValue( KRFieldAppName, lineBuffer, err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
478 |
if ( err == KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
479 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
480 |
iMainAppName = namePtr.AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
481 |
LOG2( "Resuming '%S'", iMainAppName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
482 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
483 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
484 |
// Get BootstrapVersion from the resume info file |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
485 |
TPtrC bootstrapVersionLine = GetConfigValue( KRFieldBootstrap, lineBuffer, err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
486 |
if ( err == KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
487 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
488 |
TLex lex(bootstrapVersionLine); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
489 |
if ( lex.Val(iBootstrapVersion) == 0 ) |
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 |
LOG2( "(resume) Version: %d", iBootstrapVersion ); |
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 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
494 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
495 |
// TODO: Error: Can this ever happen?! |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
496 |
//LOG( "Incorrect version in the resume info" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
497 |
return KErrNotSupported; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
498 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
499 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
500 |
else |
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 |
LOG2( "Failed to read version from the resume info (%d)", err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
503 |
return err; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
504 |
} |
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 |
else |
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 |
LOG( "! No resume information, cannot continue" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
509 |
// Resume information file doesn't exist |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
510 |
return err; |
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 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
513 |
// Get the Wrapper uid |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
514 |
TPtrC uidPtr = GetConfigValue( KRFieldWrapperPkgUid, lineBuffer, err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
515 |
if ( err == KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
516 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
517 |
TLex lex(uidPtr); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
518 |
TUint32 uid = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
519 |
if ( lex.Val(uid, EDecimal ) == 0) |
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 |
LOG2( "Wrapper Uid: 0x%x", uid ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
522 |
iWrapperPackageUid = TUid::Uid(uid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
523 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
524 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
525 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
526 |
//LOG( "Incorrect wrapper UID in resume info" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
527 |
return KErrNotSupported; |
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 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
530 |
else |
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 |
LOG2( "Failed to read wrapper UID from the resume info (%d)", err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
533 |
return err; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
534 |
} |
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 |
switch (iBootstrapVersion) |
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 |
case 1: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
539 |
case 2: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
540 |
case 3: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
541 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
542 |
// Get AppFileName from the resume information file |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
543 |
TPtrC depFileNameLine = GetConfigValue( KRFieldDepFileName, lineBuffer, err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
544 |
if ( err == KErrNone ) |
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 |
iDepFileName = depFileNameLine.AllocL(); |
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 |
LOG2( "(resume) DepFileName = '%S'", iDepFileName ); |
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 |
if ( !BaflUtils::FileExists(iRfs, *iDepFileName) ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
551 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
552 |
LOG2( "(resume) DepFile '%S' missing, cannot continue!", iDepFileName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
553 |
return KErrNotFound; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
554 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
555 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
556 |
else |
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 |
LOG2( "Failed to read from the resume info (%d)", err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
559 |
return err; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
560 |
} |
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 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
563 |
case 4: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
564 |
default: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
565 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
566 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
567 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
568 |
switch (iBootstrapVersion) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
569 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
570 |
case 1: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
571 |
case 2: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
572 |
case 4: |
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 |
// Get AppFileName from the resume info file |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
575 |
TPtrC appFileNameLine = GetConfigValue( KRFieldAppFileName, lineBuffer, err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
576 |
if ( err == KErrNone ) |
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 |
iSisFileName = appFileNameLine.AllocL(); |
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 |
LOG2( "(resume) AppSis = '%S'", iSisFileName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
581 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
582 |
if ( !BaflUtils::FileExists(iRfs, *iSisFileName) ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
583 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
584 |
LOG2( "(resume) AppSis '%S' missing, cannot continue!", iSisFileName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
585 |
return KErrNotFound; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
586 |
} |
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 |
LOG2( "Failed to read from the resume info (%d)", err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
591 |
return err; |
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 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
594 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
595 |
case 3: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
596 |
default: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
597 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
598 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
599 |
LOG2( "- ReadResumeInfo(): ret=%d", err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
600 |
return err; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
601 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
602 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
603 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
604 |
// Handles WindowServer events. Used to catch 'End Call' key. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
605 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
606 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
607 |
void CADMAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
608 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
609 |
if ( aEvent.Key()->iCode == EKeyPhoneEnd ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
610 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
611 |
iStateMachine->HandleUserResponse( EKeyPhoneEnd ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
612 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
613 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
614 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
615 |
CEikAppUi::HandleWsEventL( aEvent, aDestination ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
616 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
617 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
618 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
619 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
620 |
// CADMAppUi::HandleCommandL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
621 |
// Takes care of command handling. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
622 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
623 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
624 |
void CADMAppUi::HandleCommandL(TInt aCommand) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
625 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
626 |
switch (aCommand) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
627 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
628 |
case EEikCmdExit: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
629 |
case EAknSoftkeyExit: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
630 |
Exit(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
631 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
632 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
633 |
default: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
634 |
Panic(EPanicAdmUi); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
635 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
636 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
637 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
638 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
639 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
640 |
// Callback CGlobalWaitNote |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
641 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
642 |
// Called when global wait note was cancelled |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
643 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
644 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
645 |
void CADMAppUi::WaitNoteCancelled() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
646 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
647 |
LOG2( "! Wait note cancelled (%d)", iStateMachine->StateIndex() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
648 |
iStateMachine->HandleUserResponse( EAknSoftkeyCancel ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
649 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
650 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
651 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
652 |
// Callback CProgressDialog |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
653 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
654 |
// Called when progress dialog was cancelled |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
655 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
656 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
657 |
void CADMAppUi::ProgressDialogCancelled() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
658 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
659 |
LOG2( "! Progress dialog cancelled (%d)", iStateMachine->StateIndex() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
660 |
iStateMachine->HandleUserResponse( EAknSoftkeyCancel ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
661 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
662 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
663 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
664 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
665 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
666 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
667 |
void CADMAppUi::HandleGlobalQueryResponseL(const TInt aResponse) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
668 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
669 |
LOG2( "+ HandleGlobalQueryResponseL(): %d", aResponse ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
670 |
iStateMachine->HandleUserResponse( aResponse ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
671 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
672 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
673 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
674 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
675 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
676 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
677 |
void CADMAppUi::ShowDownloadQueryL(const TInt aResourceId, const TInt aInfoResourceId) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
678 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
679 |
const TInt KMaxDownloadSizeMsg = 32; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
680 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
681 |
if ( iGlobalQueryObserver ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
682 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
683 |
iGlobalQueryObserver->Cancel(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
684 |
delete iGlobalQueryObserver; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
685 |
iGlobalQueryObserver = NULL; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
686 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
687 |
iGlobalQueryObserver = CGlobalQueryObserver::NewL(this, EFalse); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
688 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
689 |
DELETE_IF_NONNULL( iGlobalConfirmationQuery ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
690 |
DELETE_IF_NONNULL( iQueryMessage ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
691 |
iGlobalConfirmationQuery = CAknGlobalConfirmationQuery::NewL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
692 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
693 |
TBuf<KMaxDownloadSizeMsg> dlSizeDescr; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
694 |
PrettyPrint( iStateMachine->TotalDownloadSize(), dlSizeDescr ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
695 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
696 |
CDesCArrayFlat* strings = new (ELeave) CDesCArrayFlat(3); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
697 |
CleanupStack::PushL(strings); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
698 |
HBufC* msg = StringLoader::LoadLC( R_ADM_SW_UPDATE_REQUIRED_TEXT, iEikonEnv ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
699 |
HBufC* info; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
700 |
if (aInfoResourceId != -1) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
701 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
702 |
info = StringLoader::LoadLC( aInfoResourceId, iEikonEnv ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
703 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
704 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
705 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
706 |
info = KNullDesC().AllocLC(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
707 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
708 |
strings->AppendL(*msg); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
709 |
strings->AppendL(*info); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
710 |
strings->AppendL(dlSizeDescr); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
711 |
iQueryMessage = StringLoader::LoadL( aResourceId, *strings, iEikonEnv ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
712 |
CleanupStack::PopAndDestroy(3, strings); // strings, msg, info |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
713 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
714 |
// Cancel the progress dialog just before querying the user to reduce flicker |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
715 |
CancelProgressBar(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
716 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
717 |
iGlobalConfirmationQuery->ShowConfirmationQueryL( |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
718 |
iGlobalQueryObserver->iStatus, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
719 |
*iQueryMessage, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
720 |
0 |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
721 |
); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
722 |
iGlobalQueryObserver->Start(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
723 |
#if 0 |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
724 |
const TInt KMaxDownloadSizeMsg = 32; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
725 |
TBuf<KMaxDownloadSizeMsg> dlSizeDescr; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
726 |
PrettyPrint( iDepTree->GetTotalDownloadSize(), dlSizeDescr ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
727 |
HBufC* string = StringLoader::LoadLC( aResourceId, dlSizeDescr, iEikonEnv ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
728 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
729 |
CAknQueryDialog* dlg = CAknQueryDialog::NewL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
730 |
const TInt ret = dlg->ExecuteLD( R_AVKON_DIALOG_EMPTY_MENUBAR, *string ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
731 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
732 |
CleanupStack::PopAndDestroy(); // string |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
733 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
734 |
return ret; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
735 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
736 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
737 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
738 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
739 |
// Shows the application launch query dialog |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
740 |
// @param aAppName Application name, caption, to be shown to the user |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
741 |
// @param aIconFilename Full path to the application icon, KNullDesC if none. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
742 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
743 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
744 |
void CADMAppUi::ShowLaunchPromptL(const TDesC& aAppName, const TDesC& aIconFilename) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
745 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
746 |
if ( iGlobalQueryObserver ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
747 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
748 |
iGlobalQueryObserver->Cancel(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
749 |
delete iGlobalQueryObserver; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
750 |
iGlobalQueryObserver = NULL; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
751 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
752 |
iGlobalQueryObserver = CGlobalQueryObserver::NewL(this, EFalse); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
753 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
754 |
DELETE_IF_NONNULL( iGlobalConfirmationQuery ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
755 |
DELETE_IF_NONNULL( iQueryMessage ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
756 |
iGlobalConfirmationQuery = CAknGlobalConfirmationQuery::NewL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
757 |
iQueryMessage = StringLoader::LoadL( R_ADM_LAUNCH_APP_TEXT, aAppName, iEikonEnv ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
758 |
iGlobalConfirmationQuery->ShowConfirmationQueryL( |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
759 |
iGlobalQueryObserver->iStatus, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
760 |
*iQueryMessage, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
761 |
0, // Softkeys |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
762 |
0, // Animation |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
763 |
aIconFilename, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
764 |
EMbmAdmAdm, // BitmapId |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
765 |
EMbmAdmAdm_mask // MaskId |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
766 |
); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
767 |
iGlobalQueryObserver->Start(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
768 |
// Cancel the progress dialog and notes after creating the note to reduce flicker |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
769 |
CancelProgressBar(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
770 |
CancelWaitNote(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
771 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
772 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
773 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
774 |
// @param aType Global note type. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
775 |
// @param aResourceId Resource ID to text to be displayed. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
776 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
777 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
778 |
TInt CADMAppUi::ShowGlobalNoteL( const TAknGlobalNoteType aType, const TInt aResourceId ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
779 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
780 |
// Allocate TBuf with constant length. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
781 |
TBuf<KMaxMsgSize> text( NULL ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
782 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
783 |
// Do we have a valid resource ID for the note? |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
784 |
if (aResourceId != -1) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
785 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
786 |
// Reads a resource into a descriptor. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
787 |
iEikonEnv->ReadResourceL( text, aResourceId ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
788 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
789 |
if ( iStateMachine->FailedState() == CStateFactory::EStateLast && |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
790 |
iExitReason != EExitNoError) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
791 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
792 |
const TInt error = iStateMachine->FailedState() * 100 + iExitReason; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
793 |
text.Append('\n'); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
794 |
text.AppendNum( error ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
795 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
796 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
797 |
// Cancel any progress dialog |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
798 |
CancelProgressBar(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
799 |
// Cancel any wait notes |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
800 |
CancelWaitNote(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
801 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
802 |
if (aType == EAknGlobalErrorNote ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
803 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
804 |
CAknQueryDialog* dlg = CAknQueryDialog::NewL( CAknQueryDialog::EErrorTone ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
805 |
return dlg->ExecuteLD( R_ADM_EXIT_QUERY, text ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
806 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
807 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
808 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
809 |
// Create new CAknGlobalNote instance. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
810 |
CAknGlobalNote* globalNote = CAknGlobalNote::NewLC(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
811 |
globalNote->ShowNoteL( aType, text ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
812 |
CleanupStack::PopAndDestroy(globalNote); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
813 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
814 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
815 |
return KErrNone; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
816 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
817 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
818 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
819 |
// Shows the exit note with information, how the interrupted/cancelled installation |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
820 |
// can be continued. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
821 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
822 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
823 |
TInt CADMAppUi::ShowExitNoteL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
824 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
825 |
TInt ret = KErrNone; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
826 |
// The order of this table must match TExitReason order |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
827 |
static const TInt errorNotes[ELastExitState] = { |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
828 |
/* EExitNoError 0 */ -1, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
829 |
/* EUserCancelled 1 */ -1, //R_ADM_INST_CAN_BE_RESUMED_TEXT, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
830 |
/* EDownloadFailed 2 */ R_ADM_ERR_DOWNLOAD_FAILED_TEXT, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
831 |
/* EInsufficientMemory 3 */ R_ADM_ERR_INSTALLATION_NOT_ENOUGH_SPACE_TEXT, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
832 |
/* EDeviceNotSupported 4 */ R_ADM_ERR_INSTALLATION_UNSUPPORTED_DEVICE_TEXT, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
833 |
/* EInstallationFailed 5 */ R_ADM_ERR_INSTALLATION_FAILED_TEXT, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
834 |
/* ERootInstallationFailed */ -1 |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
835 |
}; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
836 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
837 |
// First, show an error note describing what went wrong |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
838 |
if (errorNotes[iExitReason] > 0) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
839 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
840 |
CAknErrorNote* note = new (ELeave) CAknErrorNote( ETrue ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
841 |
HBufC* msg = StringLoader::LoadLC( errorNotes[iExitReason], iEikonEnv ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
842 |
note->ExecuteLD( *msg ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
843 |
CleanupStack::PopAndDestroy(); // msg |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
844 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
845 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
846 |
if (iExitReason != EDeviceNotSupported) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
847 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
848 |
// Then show the "installation can be continued later" information |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
849 |
// but only if the device is a supported one. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
850 |
CAknQueryDialog* dlg = CAknQueryDialog::NewL( CAknQueryDialog::EErrorTone ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
851 |
HBufC* oviMsg = NULL; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
852 |
if (iOviStoreRunning) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
853 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
854 |
// TODO: Change ADM so root node would always contain the main application sis information |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
855 |
HBufC* caption = iStateMachine->LaunchCaption(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
856 |
if (!caption) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
857 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
858 |
caption = KNullDesC().AllocL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
859 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
860 |
oviMsg = StringLoader::LoadLC( |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
861 |
R_ADM_INST_CAN_BE_RESUMED_OVI_TEXT, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
862 |
*caption, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
863 |
iEikonEnv |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
864 |
); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
865 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
866 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
867 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
868 |
oviMsg = KNullDesC().AllocLC(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
869 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
870 |
HBufC* mainMsg = StringLoader::LoadLC( |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
871 |
R_ADM_INST_CAN_BE_RESUMED_TEXT, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
872 |
*oviMsg, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
873 |
iEikonEnv |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
874 |
); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
875 |
ret = dlg->ExecuteLD( R_ADM_EXIT_QUERY, *mainMsg ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
876 |
CleanupStack::PopAndDestroy(2, oviMsg); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
877 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
878 |
return ret; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
879 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
880 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
881 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
882 |
// Creates a wait note displaying given resource ID. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
883 |
// @param aResourceId Resource ID to be shown |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
884 |
// @param aCancellable ETrue, if wait note is cancellable |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
885 |
// @param aDetailedResourceId Additional resource ID to be shown, -1 if none |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
886 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
887 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
888 |
void CADMAppUi::ShowWaitNoteL( const TInt aResourceId, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
889 |
const TBool aCancellable, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
890 |
const TInt aDetailedResourceId |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
891 |
) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
892 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
893 |
TBuf<KMaxMsgSize> resourceMsg; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
894 |
CancelWaitNote(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
895 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
896 |
if (aDetailedResourceId != -1) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
897 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
898 |
iEikonEnv->ReadResourceL( resourceMsg, aDetailedResourceId ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
899 |
HBufC* msg = StringLoader::LoadL( aResourceId, resourceMsg, iEikonEnv ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
900 |
resourceMsg.Copy( *msg ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
901 |
delete msg; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
902 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
903 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
904 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
905 |
iEikonEnv->ReadResourceL( resourceMsg, aResourceId ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
906 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
907 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
908 |
iWaitNote = CGlobalWaitNote::NewL(*this, aCancellable ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
909 |
iWaitNote->ShowNoteL( resourceMsg ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
910 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
911 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
912 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
913 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
914 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
915 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
916 |
void CADMAppUi::ShowWaitNoteNumL( const TInt aResourceId, const TInt aCurrent, const TInt aLast) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
917 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
918 |
CancelWaitNote(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
919 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
920 |
CArrayFix<TInt>* vals = new (ELeave) CArrayFixFlat<TInt>(2); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
921 |
CleanupStack::PushL(vals); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
922 |
vals->AppendL(aCurrent); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
923 |
vals->AppendL(aLast); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
924 |
HBufC* msg = StringLoader::LoadLC( aResourceId, *vals, iEikonEnv ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
925 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
926 |
iWaitNote = CGlobalWaitNote::NewL( *this, ETrue ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
927 |
iWaitNote->ShowNoteL( *msg ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
928 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
929 |
CleanupStack::PopAndDestroy(2, vals); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
930 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
931 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
932 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
933 |
// Removes currently shown wait note. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
934 |
// -----------------------------------------------------------------------------// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
935 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
936 |
void CADMAppUi::CancelWaitNote() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
937 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
938 |
if ( iWaitNote ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
939 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
940 |
TRAP_IGNORE( iWaitNote->CancelNoteL() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
941 |
delete iWaitNote; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
942 |
iWaitNote = NULL; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
943 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
944 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
945 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
946 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
947 |
// Removes currently shown progress bar. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
948 |
// -----------------------------------------------------------------------------// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
949 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
950 |
void CADMAppUi::CancelProgressBar() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
951 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
952 |
if ( iProgress ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
953 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
954 |
iProgress->Cancel(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
955 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
956 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
957 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
958 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
959 |
// ShowGlobalProgressL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
960 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
961 |
// aResourceId Resource ID of the text to be shown on the progress bar |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
962 |
// aStartValue Progress bar start value |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
963 |
// aEndValue Progress bar end value |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
964 |
// aCurrent Resource string value0 |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
965 |
// aLast Resource string value1 |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
966 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
967 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
968 |
void CADMAppUi::ShowGlobalProgressL(const TInt aResourceId, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
969 |
const TInt aStartValue, const TInt aEndValue, |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
970 |
const TInt aCurrent, const TInt aLast) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
971 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
972 |
HBufC *msg = NULL; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
973 |
CArrayFix<TInt>* vals = new (ELeave) CArrayFixFlat<TInt>(2); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
974 |
CleanupStack::PushL(vals); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
975 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
976 |
if (aCurrent != -1) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
977 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
978 |
vals->AppendL(aCurrent); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
979 |
vals->AppendL(aLast); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
980 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
981 |
// Read the resource |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
982 |
msg = StringLoader::LoadLC( aResourceId, *vals, iEikonEnv ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
983 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
984 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
985 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
986 |
// Read the resource |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
987 |
msg = iEikonEnv->AllocReadResourceLC( aResourceId ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
988 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
989 |
// Special case: append the application name to the string |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
990 |
if (aResourceId == R_ADM_CONTINUING_INST_TEXT) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
991 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
992 |
if (iMainAppName && iMainAppName->Length() > 0) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
993 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
994 |
HBufC* newmsg = HBufC::NewL(msg->Length() + iMainAppName->Length() + 3); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
995 |
newmsg->Des().Copy(*msg); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
996 |
newmsg->Des().Append('\n'); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
997 |
newmsg->Des().Append('\''); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
998 |
newmsg->Des().Append(*iMainAppName); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
999 |
newmsg->Des().Append('\''); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1000 |
CleanupStack::PopAndDestroy(msg); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1001 |
msg = newmsg; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1002 |
CleanupStack::PushL(msg); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1003 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1004 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1005 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1006 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1007 |
iProgress->Cancel(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1008 |
iProgress->StartL( *msg, aEndValue ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1009 |
iProgress->Update(aStartValue, aEndValue); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1010 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1011 |
CleanupStack::PopAndDestroy(2, vals); // msg, vals |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1012 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1013 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1014 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1015 |
// Shows a proper wait note before the cleanup starts. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1016 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1017 |
// This function MUST NOT LEAVE. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1018 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1019 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1020 |
void CADMAppUi::HandleFailure() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1021 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1022 |
LOG3( "+ CADMAppUi::HandleFailure(): %d. err=%d", iStateMachine->StateIndex(), iExitReason); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1023 |
// Disable wait note and progress bar, if any |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1024 |
CancelProgressBar(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1025 |
CancelWaitNote(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1026 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1027 |
// Delete the dep file |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1028 |
if ( iDepFileName ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1029 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1030 |
// We need to ignore, if delete leaves as we are currently already |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1031 |
// handling an error case. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1032 |
// TODO: Remove if(), DeleteFile() copes with NULL filenames. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1033 |
DeleteFile( *iDepFileName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1034 |
// TODO: Should we 'delete iDepFileName;' and set it to NULL? |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1035 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1036 |
TInt err = KErrNone; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1037 |
TInt waitNoteResource; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1038 |
TInt detailedInfoResource = -1; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1039 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1040 |
switch (iExitReason) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1041 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1042 |
case EDownloadFailed: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1043 |
waitNoteResource = R_ADM_DETAILED_CANCELLING_INSTALLATION_WAIT_TEXT; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1044 |
detailedInfoResource = R_ADM_ERR_CONN_LOST_TEXT; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1045 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1046 |
case EUserCancelled: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1047 |
case EInstallationFailed: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1048 |
waitNoteResource = R_ADM_CANCELLING_INSTALLATION_WAIT_TEXT; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1049 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1050 |
default: |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1051 |
waitNoteResource = R_ADM_REVERTING_CHANGES_WAIT_TEXT; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1052 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1053 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1054 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1055 |
// Do the cleanup depending on the state that experienced failure |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1056 |
if ( iStateMachine->FailedState() >= CStateFactory::EStateDownloadChangesFile ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1057 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1058 |
TRAP(err, ShowWaitNoteL( waitNoteResource, EFalse, detailedInfoResource )); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1059 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1060 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1061 |
LOG2( "- CADMAppUi::HandleFailure(): %d", err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1062 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1063 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1064 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1065 |
// Shows the final error message and exits application |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1066 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1067 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1068 |
void CADMAppUi::ExitApp() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1069 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1070 |
LOG3( "+ CADMAppUi::ExitApp(): %d, %d", iExitReason, iAppLaunch ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1071 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1072 |
// Remove any progress bar |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1073 |
CancelProgressBar(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1074 |
// Remove any wait note |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1075 |
CancelWaitNote(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1076 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1077 |
// Just checking that iExitReason is in the proper range |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1078 |
if ( iExitReason >= 0 && iExitReason < ELastExitState ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1079 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1080 |
// If we have an additional note to display, show it. We need to |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1081 |
// trap any leaves. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1082 |
TRAP_IGNORE( |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1083 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1084 |
if ( iSilentInstallationOk && iExitReason == EExitNoError ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1085 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1086 |
// If we used non-silent installation, the "Installation complete" note |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1087 |
// was already shown by S60 Installer. Don't show it here again. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1088 |
// If the user has launched the application, don't show the note |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1089 |
if (!iNonSilentInstallation && !iAppLaunch) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1090 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1091 |
ShowGlobalNoteL( EAknGlobalConfirmationNote, R_ADM_INSTALLATION_OK_TEXT ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1092 |
// We need to wait 350ms to show the note as the call to Exit() below would kill |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1093 |
// the AppUi and also the note. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1094 |
User::After(350000); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1095 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1096 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1097 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1098 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1099 |
if (!iNonSilentInstallation) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1100 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1101 |
// Show ADM again in task list. This is because we're using |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1102 |
// CAknQueryDialog: we don't want that to get hidden. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1103 |
HideApplicationFromFSW(EFalse); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1104 |
// This call returns after user has dismissed the error dialog |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1105 |
ShowExitNoteL(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1106 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1107 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1108 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1109 |
); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1110 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1111 |
#ifdef _DEBUG |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1112 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1113 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1114 |
LOG2( "Invalid exit reason %d", iExitReason ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1115 |
User::Invariant(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1116 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1117 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1118 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1119 |
// Set the ADM icon hidden, if everything went smoothly or any resume info file exists. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1120 |
const TBool hideAdm = !( (iExitReason != EExitNoError || iExitReason == EDeviceNotSupported) && iIsResumeRequired ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1121 |
const TInt err = CUtils::HideApplicationFromMenu( KUidADMApp.iUid, hideAdm ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1122 |
LOG3( "ADM icon hidden: %d (%d)", hideAdm, err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1123 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1124 |
RunAppShutter(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1125 |
Exit(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1126 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1127 |
LOG( "- CADMAppUi::ExitApp()" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1128 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1129 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1130 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1131 |
// Delete a file pointed by aFilename. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1132 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1133 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1134 |
void CADMAppUi::DeleteFile(const TDesC& aFilename) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1135 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1136 |
iRfs.Delete(aFilename); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1137 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1138 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1139 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1140 |
// Pretty prints number as text string using KiB, MiB and GiB prefixes when needed. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1141 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1142 |
// aSize Number to pretty print. Only positive integers supported. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1143 |
// aDescr Descriptor holding the pretty printed number string. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1144 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1145 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1146 |
void CADMAppUi::PrettyPrint(const TUint32 aSize, TDes& aDescr) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1147 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1148 |
_LIT(KFmtDecimals, "%02d"); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1149 |
TLocale locale; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1150 |
TUint32 size = aSize, rem; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1151 |
TPtrC sizePrefix( iPrefixKb ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1152 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1153 |
// We don't pretty print bytes because "bytes" would a new string |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1154 |
// to localize. This is just to minimize that work. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1155 |
if (aSize < 1024*1024) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1156 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1157 |
size /= 1024; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1158 |
rem = (aSize * 100 / 1024) % 100; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1159 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1160 |
else if (aSize < 1024*1024*1024) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1161 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1162 |
size /= 1024*1024; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1163 |
rem = (aSize * 100 / (1024*1024)) % 100; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1164 |
sizePrefix.Set( iPrefixMb ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1165 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1166 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1167 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1168 |
// TInt64 is needed, because aSize*100 will overflow on big values of aSize |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1169 |
TInt64 remBig( aSize ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1170 |
remBig = ((remBig * 100) / (1024*1024*1024)) % 100; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1171 |
rem = remBig; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1172 |
size /= 1024*1024*1024; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1173 |
sizePrefix.Set( iPrefixGb ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1174 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1175 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1176 |
aDescr.Num(size); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1177 |
// Add decimals only if they != .00 |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1178 |
if (rem) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1179 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1180 |
aDescr.Append(locale.DecimalSeparator()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1181 |
aDescr.AppendFormat(KFmtDecimals, rem); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1182 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1183 |
// if (aSize > 999) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1184 |
// aDescr.Insert(aDescr.Length() - 6, iLocale.ThousandsSeparator()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1185 |
aDescr.Append(sizePrefix); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1186 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1187 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1188 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1189 |
// Gets detailed phone information and stores it internally. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1190 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1191 |
// Returns KErrNone, if fetching of machine UID was succesful |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1192 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1193 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1194 |
TInt CADMAppUi::GetPhoneInformation() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1195 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1196 |
LOG( "+ GetPhoneInformation()" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1197 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1198 |
//TODO: Remove unnecessary information, currently MachineUid is only needed |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1199 |
TInt r = HAL::Get(HALData::EMachineUid, iMachineUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1200 |
#if _DEBUG |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1201 |
HAL::Get(HALData::EManufacturer, iManufacturer); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1202 |
HAL::Get(HALData::EManufacturerHardwareRev, iHardwareRev); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1203 |
HAL::Get(HALData::EManufacturerSoftwareRev, iSoftwareRev); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1204 |
HAL::Get(HALData::EModel, iModel); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1205 |
HAL::Get(HALData::EDeviceFamily, iDeviceFamily); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1206 |
HAL::Get(HALData::EDeviceFamilyRev, iDeviceFamilyRev); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1207 |
HAL::Get(HALData::ECPUArch, iCpuArch); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1208 |
HAL::Get(HALData::ECPUABI, iCpuABI ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1209 |
HAL::Get(HALData::ECPUSpeed, iCpuSpeed ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1210 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1211 |
TPtr swVer(iSwVersion->Des()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1212 |
SysUtil::GetSWVersion(swVer); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1213 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1214 |
LOG8_2( " machine uid = 0x%08x", iMachineUid); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1215 |
#if _DEBUG |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1216 |
LOG8_2( " model = 0x%08x", iModel); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1217 |
LOG8_2( " manufacturer = %d", iManufacturer); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1218 |
LOG8_2( " hardware rev = %d", iHardwareRev); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1219 |
LOG8_2( " software rev = %d", iSoftwareRev); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1220 |
LOG8_2( " device family = %d", iDeviceFamily); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1221 |
LOG8_2( " device family rev = %d", iDeviceFamilyRev); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1222 |
LOG8_2( " CPU architecture = 0x%08x", iCpuArch); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1223 |
LOG8_2( " CPU ABI = %d", iCpuABI); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1224 |
LOG8_2( " CPU speed = %d", iCpuSpeed); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1225 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1226 |
LOG2(" Sw Ver = %S", iSwVersion); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1227 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1228 |
LOG8_2( "- GetPhoneInformation (%d)", r); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1229 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1230 |
return r; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1231 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1232 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1233 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1234 |
// Returns true if the phone is roaming |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1235 |
// ----------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1236 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1237 |
TBool CADMAppUi::RegisteredRoaming() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1238 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1239 |
LOG( "+ RegisteredRoaming()" ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1240 |
// Get registeration status |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1241 |
TRequestStatus status; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1242 |
TInt ret = EFalse; // Default to not roaming |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1243 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1244 |
RMobilePhone::TMobilePhoneRegistrationStatus regStatus( |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1245 |
RMobilePhone::ERegistrationUnknown ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1246 |
iPhone.GetNetworkRegistrationStatus( status, regStatus ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1247 |
User::WaitForRequest( status ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1248 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1249 |
if ( RMobilePhone::ERegisteredRoaming == regStatus ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1250 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1251 |
ret = ETrue; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1252 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1253 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1254 |
LOG2( "- RegisteredRoaming: %d", ret ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1255 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1256 |
return ret; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1257 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1258 |
#if 0 |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1259 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1260 |
// CADMAppUi::PhoneMemoryDrive |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1261 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1262 |
// @return Drive number for phone memory. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1263 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1264 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1265 |
TInt CADMAppUi::PhoneMemoryDrive() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1266 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1267 |
TInt res = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1268 |
TInt err = RFs::CharToDrive( PathInfo::PhoneMemoryRootPath()[0], res ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1269 |
__ASSERT_ALWAYS( !err, Panic( EPanicAdmFileSystemAccess ) ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1270 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1271 |
return res; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1272 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1273 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1274 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1275 |
// CADMAppUi::MemoryCardDrive |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1276 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1277 |
// @return Drive number for memory card. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1278 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1279 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1280 |
TInt CADMAppUi::MemoryCardDrive() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1281 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1282 |
TInt res = 0; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1283 |
TInt err = RFs::CharToDrive( PathInfo::MemoryCardRootPath()[0], res ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1284 |
__ASSERT_ALWAYS( !err, Panic( EPanicAdmFileSystemAccess ) ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1285 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1286 |
return res; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1287 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1288 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1289 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1290 |
// CADMAppUi::ReadStaticResourcesL |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1291 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1292 |
// @return KErrNone if configuration was read correctly, error code otherwise |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1293 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1294 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1295 |
void CADMAppUi::ReadStaticResourcesL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1296 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1297 |
iEikonEnv->ReadResourceL( iPrefixKb, R_KB ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1298 |
iEikonEnv->ReadResourceL( iPrefixMb, R_MB ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1299 |
iEikonEnv->ReadResourceL( iPrefixGb, R_GB ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1300 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1301 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1302 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1303 |
// CADMAppUi::UsingWLAN |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1304 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1305 |
// @return ETrue, if selected bearer is WLAN |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1306 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1307 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1308 |
TBool CADMAppUi::UsingWLAN() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1309 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1310 |
return BearerType() == EBearerWLAN; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1311 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1312 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1313 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1314 |
// CADMAppUi::CheckBearerTypeL |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1315 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1316 |
// @return Bearer type |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1317 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1318 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1319 |
TInt CADMAppUi::BearerType() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1320 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1321 |
LOG2( "+ BearerType(): IAP=%d", iIAP ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1322 |
RConnectionMonitor monitor; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1323 |
TRequestStatus status = KRequestPending; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1324 |
TUint iapId(0); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1325 |
TInt bearer( 0 ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1326 |
TUint count; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1327 |
TUint ids[ 15 ]; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1328 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1329 |
TRAPD( err, monitor.ConnectL() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1330 |
if (err != KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1331 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1332 |
LOG2( "BearerType: Connect to RConnMon failed. %d", err ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1333 |
return err; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1334 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1335 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1336 |
// Get the connection count |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1337 |
monitor.GetConnectionCount( count, status ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1338 |
User::WaitForRequest( status ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1339 |
if ( status.Int() != KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1340 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1341 |
LOG2( "GetConnCount failed. %d", status.Int() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1342 |
monitor.Close(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1343 |
return status.Int(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1344 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1345 |
#ifdef DO_LOG |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1346 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1347 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1348 |
LOG2( "BearerType: %d connections:", count); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1349 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1350 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1351 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1352 |
// Get the connection info for each connection |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1353 |
TUint numSubConnections; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1354 |
TInt i; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1355 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1356 |
for ( i = 1; i <= count; i++ ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1357 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1358 |
TInt ret = monitor.GetConnectionInfo( i, ids[ i-1 ], numSubConnections ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1359 |
if ( ret == KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1360 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1361 |
LOG3( "BearerType: ConnID[%d] = %d" , i, ids[ i-1 ] ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1362 |
// Get the IAP Id of the connection |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1363 |
monitor.GetUintAttribute( ids[ i-1 ], 0, KIAPId, iapId, status ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1364 |
User::WaitForRequest( status ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1365 |
if ( status.Int() != KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1366 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1367 |
LOG2( "GetIapId failed. %d", status.Int() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1368 |
// try next connection |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1369 |
continue; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1370 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1371 |
#ifdef DO_LOG |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1372 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1373 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1374 |
LOG3( "BearerType: IapId = %d, IAP = %d", iapId, iIAP ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1375 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1376 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1377 |
// If the IAP matches with the one set in ADM |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1378 |
// iIAP is initialized to KInvalidIapId |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1379 |
if ( iapId == iIAP || iIAP == KInvalidIapId ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1380 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1381 |
#ifdef DO_LOG |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1382 |
LOG2( "BearerType: Getting bearer for IapId %d", iapId ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1383 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1384 |
// Get the Bearer of the IAP Id. |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1385 |
monitor.GetIntAttribute( ids[ i-1 ], 0, KBearer, bearer, status ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1386 |
User::WaitForRequest( status ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1387 |
if ( status.Int() != KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1388 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1389 |
LOG2( "BearerType: GetBearerType failed. %d", status.Int() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1390 |
// try next connection |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1391 |
continue; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1392 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1393 |
#ifdef DO_LOG |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1394 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1395 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1396 |
LOG3( "BearerType: IapId %d: bearer = %d", iapId, bearer ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1397 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1398 |
#endif |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1399 |
// we found matching IAP ID, break out of the loop |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1400 |
break; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1401 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1402 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1403 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1404 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1405 |
LOG2( "GetConnInfo failed. %d", ret ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1406 |
return ret; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1407 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1408 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1409 |
TBuf<KConnMonMaxStringAttributeLength> iapName; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1410 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1411 |
// Get the string attrib of the IAP Id |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1412 |
monitor.GetStringAttribute( ids[ i-1 ], 0, KIAPName, iapName, status ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1413 |
User::WaitForRequest( status ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1414 |
if ( status.Int() != KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1415 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1416 |
LOG2( "BearerType: GetStrAttr failed. %d", status.Int() ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1417 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1418 |
else |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1419 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1420 |
LOG5( "* Selected IAP %d (%d), conn %d '%S'", iapId, bearer, ids[i-1], &iapName ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1421 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1422 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1423 |
// Close the RConnMon object |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1424 |
monitor.Close(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1425 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1426 |
LOG2( "- BearerType(): %d", bearer ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1427 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1428 |
return bearer; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1429 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1430 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1431 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1432 |
// CADMAppUi::ReadConfiguration |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1433 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1434 |
// @return KErrNone if configuration was read correctly, error code otherwise |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1435 |
// --------------------------------------------------------------------------- |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1436 |
// |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1437 |
TInt CADMAppUi::ReadConfigurationL() |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1438 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1439 |
TFileName configFile; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1440 |
RArray< TPtrC > lineBuffer; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1441 |
TInt ret( KErrNone ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1442 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1443 |
// Find the configuration file from the private directory |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1444 |
ret = iRfs.PrivatePath(configFile); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1445 |
if (ret == KErrNone) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1446 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1447 |
TBuf<2> appDrive; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1448 |
// Insert the drive of the running application |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1449 |
appDrive.Copy(Application()->AppFullName().Left(2)); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1450 |
configFile.Insert(0, appDrive); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1451 |
// Append the configuration 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
|
1452 |
configFile.Append(KConfigFile); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1453 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1454 |
LOG2( "configFile = %S", &configFile ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1455 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1456 |
HBufC* buffer = ReadConfigFile(iRfs, configFile, lineBuffer, ret ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1457 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1458 |
if ( buffer && ret == KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1459 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1460 |
TPtrC line = GetConfigValue( KCfgTagUrl, lineBuffer, ret ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1461 |
if ( ret == KErrNone ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1462 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1463 |
iConfigUrl = HBufC8::NewL(line.Length()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1464 |
iConfigUrl->Des().Copy(line); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1465 |
LOG8_2( "configUrl = %S", iConfigUrl ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1466 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1467 |
delete buffer; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1468 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1469 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1470 |
if ( !iConfigUrl ) |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1471 |
{ |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1472 |
// Error occured while reading the configuration, use default URL |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1473 |
iConfigUrl = HBufC8::NewL(KDefaultDepServerUrl().Length()); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1474 |
*iConfigUrl = KDefaultDepServerUrl; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1475 |
LOG8_2( "configUrl = %S (default)", iConfigUrl ); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1476 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1477 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1478 |
lineBuffer.Close(); |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1479 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1480 |
return ret; |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1481 |
} |
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1482 |
|
364021cecc90
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1483 |
// End of File |