48 |
48 |
49 iSifOptions = Usif::COpaqueNamedParams::NewL(); |
49 iSifOptions = Usif::COpaqueNamedParams::NewL(); |
50 iSifResults = Usif::COpaqueNamedParams::NewL(); |
50 iSifResults = Usif::COpaqueNamedParams::NewL(); |
51 |
51 |
52 // Set needed parameters for silent install. |
52 // Set needed parameters for silent install. |
53 iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue ); |
53 FLOG( _L("Daemon: CSilentLauncher::ConstructL: InstallSilently") ); |
54 /* |
54 iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue ); |
|
55 |
55 iSifOptions->AddIntL( Usif::KSifInParam_PerformOCSP, EFalse ); |
56 iSifOptions->AddIntL( Usif::KSifInParam_PerformOCSP, EFalse ); |
56 // Note if upgrade is allowed, see NeedsInstallingL function. |
57 // Note if upgrade is allowed, see NeedsInstallingL function. |
57 iSifOptions->AddIntL( Usif::KSifInParam_AllowUpgrade, EFalse ); |
58 iSifOptions->AddIntL( Usif::KSifInParam_AllowUpgrade, EFalse ); |
58 iSifOptions->AddIntL( Usif::KSifInParam_AllowUntrusted, EFalse ); |
59 iSifOptions->AddIntL( Usif::KSifInParam_AllowUntrusted, EFalse ); |
59 iSifOptions->AddIntL( Usif::KSifInParam_GrantCapabilities, EFalse ); |
60 iSifOptions->AddIntL( Usif::KSifInParam_GrantCapabilities, EFalse ); |
63 iSifOptions->AddIntL( Usif::KSifInParam_DisplayPackageInfo, ETrue ); |
64 iSifOptions->AddIntL( Usif::KSifInParam_DisplayPackageInfo, ETrue ); |
64 iSifOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, ETrue ); |
65 iSifOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, ETrue ); |
65 iSifOptions->AddIntL( Usif::KSifInParam_AllowDownload, ETrue ); |
66 iSifOptions->AddIntL( Usif::KSifInParam_AllowDownload, ETrue ); |
66 iSifOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, ETrue ); |
67 iSifOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, ETrue ); |
67 iSifOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, ETrue ); |
68 iSifOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, ETrue ); |
68 */ |
69 |
69 // TODO: is this defined in USIF? |
70 // TODO: is this defined in USIF? |
70 //iSifOptions->AddIntL( Usif::KSifInParam_Languages, NULL ); |
71 //iSifOptions->AddIntL( Usif::KSifInParam_Languages, NULL ); |
71 |
72 |
72 // TODO: remove old params. |
73 // TODO: remove old params. |
73 /* |
74 /* |
107 // CSilentLauncher::~CSilentLauncher() |
108 // CSilentLauncher::~CSilentLauncher() |
108 // Destructor. |
109 // Destructor. |
109 // ----------------------------------------------------------------------------- |
110 // ----------------------------------------------------------------------------- |
110 // |
111 // |
111 CSilentLauncher::~CSilentLauncher() |
112 CSilentLauncher::~CSilentLauncher() |
112 { |
113 { |
113 delete iSifOptions; |
114 delete iSifOptions; |
114 delete iSifResults; |
115 delete iSifResults; |
115 |
116 |
116 if ( iConnected ) |
117 if ( iConnected ) |
117 { |
118 { |
118 iSWInstallerFW.Close(); |
119 iSWInstallerFW.Close(); |
119 } |
120 } |
|
121 |
|
122 delete iDrive; |
120 } |
123 } |
|
124 |
121 |
125 |
122 // ----------------------------------------------------------------------------- |
126 // ----------------------------------------------------------------------------- |
123 // CSilentLauncher::InstallL |
127 // CSilentLauncher::InstallL |
124 // Perform installation. |
128 // Perform installation with file handle. |
125 // (other items were commented in a header). |
|
126 // ----------------------------------------------------------------------------- |
129 // ----------------------------------------------------------------------------- |
127 // |
130 // |
128 void CSilentLauncher::InstallL( const TDesC& aFile, TRequestStatus& aStatus ) |
131 void CSilentLauncher::InstallL( RFile& aFileHandle, |
|
132 const TDesC& aFile, |
|
133 TRequestStatus& aStatus ) |
129 { |
134 { |
130 FLOG( _L("Daemon: CSilentLauncher::InstallL START") ); |
135 FLOG( _L("Daemon: CSilentLauncher::InstallL (aFileHandle) START") ); |
131 |
136 |
132 if ( !iConnected ) |
137 if ( !iConnected ) |
133 { |
138 { |
134 FLOG( _L("Daemon: Connect to sif installer server") ); |
139 FLOG( _L("Daemon: Connect to sif installer server") ); |
135 User::LeaveIfError( iSWInstallerFW.Connect() ); |
140 User::LeaveIfError( iSWInstallerFW.Connect() ); |
139 // Set drive for installer. |
144 // Set drive for installer. |
140 // delete iDrive |
145 // delete iDrive |
141 // iDrive = NULL; |
146 // iDrive = NULL; |
142 // iDrive = HBufC::NewLC( 8 ); |
147 // iDrive = HBufC::NewLC( 8 ); |
143 // TPtr drivePtr = iDrive->Des(); |
148 // TPtr drivePtr = iDrive->Des(); |
144 // drivePtr.Append( aFile[0] ); |
149 // |
145 |
150 // TInt driveNumber = 0; |
|
151 // TDriveInfo driveInfo; |
|
152 // aFileHandle.Drive( driveNumber, driveInfo ); |
146 // TODO: how is this used? Is this drive letter? |
153 // TODO: how is this used? Is this drive letter? |
147 // iSifOptions->AddStringL( Usif::KSifInParam_Drive , *drive ); |
154 // iSifOptions->AddStringL( Usif::KSifInParam_Drive , *drive ); |
148 // |
155 |
149 FLOG( _L("Daemon: Launch install") ); |
156 FLOG( _L("Daemon: Launch install") ); |
150 iSWInstallerFW.Install( aFile, |
157 iSWInstallerFW.Install( aFileHandle, |
151 *iSifOptions, |
158 *iSifOptions, |
152 *iSifResults, |
159 *iSifResults, |
153 aStatus, |
160 aStatus, |
154 ETrue ); |
161 ETrue ); |
155 |
162 |
156 FLOG( _L("Daemon: CSilentLauncher::InstallL END") ); |
163 FLOG( _L("Daemon: CSilentLauncher::InstallL (aFileHandle) END") ); |
157 } |
164 } |
158 |
165 |
159 // ----------------------------------------------------------------------------- |
166 // ----------------------------------------------------------------------------- |
160 // CSilentLauncher::Cancel |
167 // CSilentLauncher::Cancel |
161 // Cancel the current installation. |
168 // Cancel the current installation. |