61 // Defined for the install. |
61 // Defined for the install. |
62 iSifOptions->AddIntL( Usif::KSifInParam_InstallOptionalItems, Usif::EAllowed ); |
62 iSifOptions->AddIntL( Usif::KSifInParam_InstallOptionalItems, Usif::EAllowed ); |
63 iSifOptions->AddIntL( Usif::KSifInParam_IgnoreOCSPWarnings, Usif::EAllowed ); |
63 iSifOptions->AddIntL( Usif::KSifInParam_IgnoreOCSPWarnings, Usif::EAllowed ); |
64 iSifOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, Usif::EAllowed ); |
64 iSifOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, Usif::EAllowed ); |
65 iSifOptions->AddIntL( Usif::KSifInParam_AllowDownload, Usif::EAllowed ); |
65 iSifOptions->AddIntL( Usif::KSifInParam_AllowDownload, Usif::EAllowed ); |
66 iSifOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, Usif::EAllowed ); |
66 iSifOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, Usif::EAllowed ); |
67 |
|
68 // TODO: is this defined in USIF? |
|
69 //iSifOptions->AddIntL( Usif::KSifInParam_Languages, NULL ); |
|
70 } |
67 } |
71 |
68 |
72 // ----------------------------------------------------------------------------- |
69 // ----------------------------------------------------------------------------- |
73 // CSilentLauncher::NewL |
70 // CSilentLauncher::NewL |
74 // Two-phased constructor. |
71 // Two-phased constructor. |
99 } |
96 } |
100 |
97 |
101 delete iDrive; |
98 delete iDrive; |
102 } |
99 } |
103 |
100 |
104 |
|
105 // ----------------------------------------------------------------------------- |
101 // ----------------------------------------------------------------------------- |
106 // CSilentLauncher::InstallL |
102 // CSilentLauncher::InstallL |
107 // Perform installation with file handle. |
103 // Perform installation with file handle. |
108 // ----------------------------------------------------------------------------- |
104 // ----------------------------------------------------------------------------- |
109 // |
105 // |
110 void CSilentLauncher::InstallL( RFile& aFileHandle, |
106 void CSilentLauncher::InstallL( RFile& aFileHandle, TRequestStatus& aStatus ) |
111 const TDesC& aFile, |
|
112 TRequestStatus& aStatus ) |
|
113 { |
107 { |
114 FLOG( _L("Daemon: CSilentLauncher::InstallL (aFileHandle) START") ); |
108 FLOG( _L("Daemon: CSilentLauncher::InstallL (aFileHandle) START") ); |
115 |
109 |
116 if ( !iConnected ) |
110 if ( !iConnected ) |
117 { |
111 { |
118 FLOG( _L("Daemon: Connect to sif installer server") ); |
112 FLOG( _L("Daemon: Connect to sif installer server") ); |
119 User::LeaveIfError( iSWInstallerFW.Connect() ); |
113 User::LeaveIfError( iSWInstallerFW.Connect() ); |
120 iConnected = ETrue; |
114 iConnected = ETrue; |
121 } |
115 } |
122 |
116 |
123 // Set drive for installer. |
117 // Get drive number from file path. by default SWI Daemon installs |
|
118 // package to drive where PA sis or SA sis is found. |
124 TInt driveNumber = 0; |
119 TInt driveNumber = 0; |
125 TDriveInfo driveInfo; |
120 TDriveInfo driveInfo; |
126 aFileHandle.Drive( driveNumber, driveInfo ); |
121 aFileHandle.Drive( driveNumber, driveInfo ); |
127 FLOG_1( _L("Daemon: Drive number = %d"), driveNumber ); |
122 FLOG_1( _L("Daemon: Drive number = %d"), driveNumber ); |
128 // TODO: Use TUint array for drive numbers when plugin does support it. |
123 |
129 iSifOptions->AddIntL( Usif::KSifInParam_Drive, driveNumber ); |
124 RArray<TInt> driveArray; |
130 |
125 CleanupClosePushL( driveArray ); |
|
126 User::LeaveIfError( driveArray.Append( driveNumber ) ); |
|
127 iSifOptions->AddIntArrayL( Usif::KSifInParam_Drive, driveArray ); |
|
128 CleanupStack::PopAndDestroy( &driveArray ); |
|
129 |
131 FLOG( _L("Daemon: Launch install") ); |
130 FLOG( _L("Daemon: Launch install") ); |
132 iSWInstallerFW.Install( aFileHandle, |
131 iSWInstallerFW.Install( aFileHandle, |
133 *iSifOptions, |
132 *iSifOptions, |
134 *iSifResults, |
133 *iSifResults, |
135 aStatus, |
134 aStatus, |
136 ETrue ); |
135 ETrue ); |
137 |
136 |
138 FLOG( _L("Daemon: CSilentLauncher::InstallL (aFileHandle) END") ); |
137 FLOG( _L("Daemon: CSilentLauncher::InstallL (aFileHandle) END") ); |
139 } |
138 } |
140 |
139 |
141 // ----------------------------------------------------------------------------- |
140 // ----------------------------------------------------------------------------- |
142 // CSilentLauncher::Cancel |
141 // CSilentLauncher::Cancel |