32 |
32 |
33 const TInt KFreeSpaceTreshold = 128*1024; // bytes |
33 const TInt KFreeSpaceTreshold = 128*1024; // bytes |
34 |
34 |
35 // TODO: replace with proper tracing support |
35 // TODO: replace with proper tracing support |
36 #ifdef _DEBUG |
36 #ifdef _DEBUG |
37 #define FLOG(x) RDebug::Print(x); |
37 #define FLOG(x) RDebug::Print(x) |
38 #define FLOG_1(x,y) RDebug::Print(x, y); |
38 #define FLOG_1(x,y) RDebug::Print((x),(y)) |
39 #define FLOG_2(x,y,z) RDebug::Print(x, y, z); |
39 #define FLOG_2(x,y,z) RDebug::Print((x),(y),(z)) |
40 #else |
40 #else |
41 #define FLOG(x) |
41 #define FLOG(x) |
42 #define FLOG_1(x,y) |
42 #define FLOG_1(x,y) |
43 #define FLOG_2(x,y,z) |
43 #define FLOG_2(x,y,z) |
44 #endif |
44 #endif |
129 |
130 |
130 // TODO: localized UI string needed |
131 // TODO: localized UI string needed |
131 _LIT( KText, "Removal may stop other applications working. Continue?" ); |
132 _LIT( KText, "Removal may stop other applications working. Continue?" ); |
132 okToContinue = ShowQuestionL( KText ); |
133 okToContinue = ShowQuestionL( KText ); |
133 |
134 |
|
135 FLOG_1( _L("CSisxSifPluginUiHandler::DisplayDependencyBreakL, okToContinue=%d"), |
|
136 okToContinue ); |
134 return okToContinue; |
137 return okToContinue; |
135 } |
138 } |
136 |
139 |
137 // --------------------------------------------------------------------------- |
140 // --------------------------------------------------------------------------- |
138 // CSisxSifPluginUiHandler::DisplayApplicationsInUseL() |
141 // CSisxSifPluginUiHandler::DisplayApplicationsInUseL() |
199 TBool CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL( const Swi::CAppInfo& /*aAppInfo*/, |
203 TBool CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL( const Swi::CAppInfo& /*aAppInfo*/, |
200 const TCapabilitySet& aCapabilitySet ) |
204 const TCapabilitySet& aCapabilitySet ) |
201 { |
205 { |
202 FLOG( _L("CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL") ); |
206 FLOG( _L("CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL") ); |
203 TBool okToContinue = iSifUi->ShowGrantCapabilitiesL( aCapabilitySet ); |
207 TBool okToContinue = iSifUi->ShowGrantCapabilitiesL( aCapabilitySet ); |
|
208 FLOG_1( _L("CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL, okToContinue=%d"), |
|
209 okToContinue ); |
204 return okToContinue; |
210 return okToContinue; |
205 } |
211 } |
206 |
212 |
207 // --------------------------------------------------------------------------- |
213 // --------------------------------------------------------------------------- |
208 // CSisxSifPluginUiHandler::DisplayLanguageL() |
214 // CSisxSifPluginUiHandler::DisplayLanguageL() |
211 TInt CSisxSifPluginUiHandler::DisplayLanguageL( const Swi::CAppInfo& /*aAppInfo*/, |
217 TInt CSisxSifPluginUiHandler::DisplayLanguageL( const Swi::CAppInfo& /*aAppInfo*/, |
212 const RArray<TLanguage>& aLanguages ) |
218 const RArray<TLanguage>& aLanguages ) |
213 { |
219 { |
214 FLOG( _L("CSisxSifPluginUiHandler::DisplayLanguageL") ); |
220 FLOG( _L("CSisxSifPluginUiHandler::DisplayLanguageL") ); |
215 TInt langIndex = iSifUi->ShowSelectLanguageL( aLanguages ); |
221 TInt langIndex = iSifUi->ShowSelectLanguageL( aLanguages ); |
|
222 FLOG_1( _L("CSisxSifPluginUiHandler::DisplayLanguageL, langIndex=%d"), langIndex ); |
216 return langIndex; |
223 return langIndex; |
217 } |
224 } |
218 |
225 |
219 // --------------------------------------------------------------------------- |
226 // --------------------------------------------------------------------------- |
220 // CSisxSifPluginUiHandler::DisplayDriveL() |
227 // CSisxSifPluginUiHandler::DisplayDriveL() |
241 } |
248 } |
242 |
249 |
243 TInt index = aDriveLetters.Find( driveLetter ); |
250 TInt index = aDriveLetters.Find( driveLetter ); |
244 if( index >= 0 && index < aDriveLetters.Count() ) |
251 if( index >= 0 && index < aDriveLetters.Count() ) |
245 { |
252 { |
|
253 FLOG_1( _L("CSisxSifPluginUiHandler::DisplayDriveL, return %d"), index ); |
246 return index; |
254 return index; |
247 } |
255 } |
|
256 FLOG( _L("CSisxSifPluginUiHandler::DisplayDriveL, return default 0") ); |
248 return 0; |
257 return 0; |
249 } |
258 } |
250 |
259 |
251 // --------------------------------------------------------------------------- |
260 // --------------------------------------------------------------------------- |
252 // CSisxSifPluginUiHandler::DisplayUpgradeL() |
261 // CSisxSifPluginUiHandler::DisplayUpgradeL() |
284 for( TInt index = 0; index < selectionsCount; index++ ) |
293 for( TInt index = 0; index < selectionsCount; index++ ) |
285 { |
294 { |
286 aSelections[ index ] = ( selectedIndexes.Find( index ) != KErrNotFound ); |
295 aSelections[ index ] = ( selectedIndexes.Find( index ) != KErrNotFound ); |
287 } |
296 } |
288 } |
297 } |
|
298 FLOG_1( _L("CSisxSifPluginUiHandler::DisplayOptionsL, isSelected=%d"), isSelected ); |
289 return isSelected; |
299 return isSelected; |
290 } |
300 } |
291 |
301 |
292 // --------------------------------------------------------------------------- |
302 // --------------------------------------------------------------------------- |
293 // CSisxSifPluginUiHandler::HandleInstallEventL() |
303 // CSisxSifPluginUiHandler::HandleInstallEventL() |
294 // --------------------------------------------------------------------------- |
304 // --------------------------------------------------------------------------- |
295 // |
305 // |
296 TBool CSisxSifPluginUiHandler::HandleInstallEventL( const Swi::CAppInfo& aAppInfo, |
306 TBool CSisxSifPluginUiHandler::HandleInstallEventL( const Swi::CAppInfo& aAppInfo, |
297 Swi::TInstallEvent aEvent, TInt aValue, const TDesC& /*aDes*/ ) |
307 Swi::TInstallEvent aEvent, TInt aValue, const TDesC& /*aDes*/ ) |
298 { |
308 { |
299 FLOG_2( _L("CSisxSifPluginUiHandler::HandleInstallEventL: aEvent %d, aValue %d"), aEvent, aValue ); |
309 FLOG_2( _L("CSisxSifPluginUiHandler::HandleInstallEventL: aEvent=%d, aValue=%d"), |
|
310 aEvent, aValue ); |
300 TBool okToContinue = EFalse; |
311 TBool okToContinue = EFalse; |
301 |
312 |
302 if( !iSifUi->IsCancelled() ) |
313 if( !iSifUi->IsCancelled() ) |
303 { |
314 { |
304 okToContinue = ETrue; |
315 okToContinue = ETrue; |
347 // |
360 // |
348 void CSisxSifPluginUiHandler::HandleCancellableInstallEventL( const Swi::CAppInfo& aAppInfo, |
361 void CSisxSifPluginUiHandler::HandleCancellableInstallEventL( const Swi::CAppInfo& aAppInfo, |
349 Swi::TInstallCancellableEvent aEvent, Swi::MCancelHandler& aCancelHandler, |
362 Swi::TInstallCancellableEvent aEvent, Swi::MCancelHandler& aCancelHandler, |
350 TInt aValue, const TDesC& /*aDes*/ ) |
363 TInt aValue, const TDesC& /*aDes*/ ) |
351 { |
364 { |
352 FLOG_2( _L("CSisxSifPluginUiHandler::HandleCancellableInstallEventL: aEvent %d, aValue %d"), aEvent, aValue ); |
365 FLOG_2( _L("CSisxSifPluginUiHandler::HandleCancellableInstallEventL: aEvent=%d, aValue=%d"), |
|
366 aEvent, aValue ); |
353 |
367 |
354 if( iSifUi->IsCancelled() ) |
368 if( iSifUi->IsCancelled() ) |
355 { |
369 { |
|
370 FLOG( _L("CSisxSifPluginUiHandler::HandleCancellableInstallEventL: cancelling") ); |
356 aCancelHandler.HandleCancel(); |
371 aCancelHandler.HandleCancel(); |
357 } |
372 } |
358 else |
373 else |
359 { |
374 { |
360 switch( aEvent ) |
375 switch( aEvent ) |
522 // CSisxSifPluginUiHandler::CancelDialogs() |
539 // CSisxSifPluginUiHandler::CancelDialogs() |
523 // --------------------------------------------------------------------------- |
540 // --------------------------------------------------------------------------- |
524 // |
541 // |
525 void CSisxSifPluginUiHandler::CancelDialogs() |
542 void CSisxSifPluginUiHandler::CancelDialogs() |
526 { |
543 { |
|
544 FLOG( _L("CSisxSifPluginUiHandler::CancelDialogs") ); |
527 iSifUi->CancelDialogs(); |
545 iSifUi->CancelDialogs(); |
528 } |
546 } |
529 |
547 |
530 // --------------------------------------------------------------------------- |
548 // --------------------------------------------------------------------------- |
531 // CSisxSifPluginUiHandler::CSisxSifPluginUiHandler() |
549 // CSisxSifPluginUiHandler::CSisxSifPluginUiHandler() |