--- a/idlehomescreen/sapiwrapper/hspswrapper/src/hspswrapper.cpp Tue May 11 16:02:39 2010 +0300
+++ b/idlehomescreen/sapiwrapper/hspswrapper/src/hspswrapper.cpp Tue May 25 12:29:32 2010 +0300
@@ -68,8 +68,9 @@
_LIT8( KRequestNotification, "RequestNotification" );
_LIT8( KHSPSCommandRestoreConfigurations, "RestoreConfigurations" );
_LIT8( KRestore, "restore" );
-_LIT8( KActive, "active" );
-_LIT8( KAll, "all" );
+_LIT8( KRestoreDefault, "default" );
+_LIT8( KRestoreRom, "rom" );
+_LIT8( KRestoreViews, "views" );
_LIT8( K0, "0" );
_LIT8( K1, "1" );
_LIT8( KPluginIdNotSet, "-1" );
@@ -785,14 +786,50 @@
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
//
-EXPORT_C TInt CHspsWrapper::RestoreRootL()
+EXPORT_C TInt CHspsWrapper::RestoreViewsL()
{
CLiwGenericParamList& inParamList = iServiceHandler->InParamListL();
CLiwGenericParamList& outParamList = iServiceHandler->OutParamListL();
// Compose Liw message
TLiwGenericParam restoreTypeParam;
- restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KAll ) );
+ restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KRestoreViews ) );
+ restoreTypeParam.PushL();
+ inParamList.AppendL( restoreTypeParam );
+ CleanupStack::Pop( &restoreTypeParam );
+ restoreTypeParam.Reset();
+
+ iHspsInterface->ExecuteCmdL( KHSPSCommandRestoreConfigurations,
+ inParamList,
+ outParamList );
+
+ inParamList.Reset();
+
+ // check success
+ const TLiwGenericParam* outParam = NULL;
+ TInt pos(0);
+ outParam = outParamList.FindFirst( pos, KOutKeyStatus );
+ TInt status(KErrGeneral);
+
+ if ( outParam )
+ {
+ status = outParam->Value().AsTInt32();
+ }
+ outParamList.Reset();
+ return status;
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CHspsWrapper::RestoreRomConfL()
+ {
+ CLiwGenericParamList& inParamList = iServiceHandler->InParamListL();
+ CLiwGenericParamList& outParamList = iServiceHandler->OutParamListL();
+
+ // Compose Liw message
+ TLiwGenericParam restoreTypeParam;
+ restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KRestoreRom ) );
restoreTypeParam.PushL();
inParamList.AppendL( restoreTypeParam );
CleanupStack::Pop( &restoreTypeParam );
@@ -828,7 +865,7 @@
// Compose Liw message
TLiwGenericParam restoreTypeParam;
- restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KActive ) );
+ restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KRestoreDefault ) );
restoreTypeParam.PushL();
inParamList.AppendL( restoreTypeParam );
CleanupStack::Pop( &restoreTypeParam );