1191 // Manadatory parameter missing |
1191 // Manadatory parameter missing |
1192 User::Leave( KErrArgument ); |
1192 User::Leave( KErrArgument ); |
1193 } |
1193 } |
1194 |
1194 |
1195 TLiwVariant inParamVariant = inParam->Value(); |
1195 TLiwVariant inParamVariant = inParam->Value(); |
1196 TPtrC8 restore( inParamVariant.AsData() ); |
1196 TPtrC8 restorePtr( inParamVariant.AsData() ); |
1197 |
1197 |
1198 TBool restoreAll = EFalse; |
1198 CHspsPersonalisationService::TRestore operation( CHspsPersonalisationService::EDefault ); |
1199 if( restore.CompareF( KHspsLiwRestoreAll ) == 0 ) |
1199 if( restorePtr.CompareF( KHspsLiwRestoreDefault ) == 0 ) |
1200 { |
1200 { |
1201 restoreAll = ETrue; |
1201 operation = CHspsPersonalisationService::EDefault; |
1202 } |
1202 } |
1203 else if( restore.CompareF( KHspsLiwRestoreActive ) != 0 ) |
1203 else if( restorePtr.CompareF( KHspsLiwRestoreRom ) == 0 ) |
|
1204 { |
|
1205 operation = CHspsPersonalisationService::ERom; |
|
1206 } |
|
1207 else if( restorePtr.CompareF( KHspsLiwRestoreViews ) == 0 ) |
|
1208 { |
|
1209 operation = CHspsPersonalisationService::EViews; |
|
1210 } |
|
1211 else |
1204 { |
1212 { |
1205 User::Leave( KErrArgument ); |
1213 User::Leave( KErrArgument ); |
1206 } |
1214 } |
1207 |
1215 |
1208 // Get client application's uid |
1216 // Get client application's uid |
1209 TInt appUid; |
1217 TInt appUid; |
1210 iHspsConfigurationService->GetAppUidL( appUid ); |
1218 iHspsConfigurationService->GetAppUidL( appUid ); |
1211 |
1219 |
1212 iHspsPersonalisationService->RestoreConfigurationsL( appUid, restoreAll ); |
1220 iHspsPersonalisationService->RestoreConfigurationsL( appUid, operation ); |
1213 |
1221 |
1214 // Invalidate ODT. |
1222 // Invalidate ODT. |
1215 iHspsConfigurationService->InvalidateODT(); |
1223 iHspsConfigurationService->InvalidateODT(); |
1216 |
1224 |
1217 // Create output parameters |
1225 // Create output parameters |