idlehomescreen/sapiwrapper/hspswrapper/src/hspswrapper.cpp
branchRCL_3
changeset 31 89165693e770
parent 25 137ebc85284b
equal deleted inserted replaced
28:d721605b30d0 31:89165693e770
    67 _LIT8( KConfState, "state" );
    67 _LIT8( KConfState, "state" );
    68 _LIT8( KRequestNotification, "RequestNotification" );
    68 _LIT8( KRequestNotification, "RequestNotification" );
    69 _LIT8( KHSPSCommandRestoreConfigurations, "RestoreConfigurations" );
    69 _LIT8( KHSPSCommandRestoreConfigurations, "RestoreConfigurations" );
    70 _LIT8( KRestore, "restore" );
    70 _LIT8( KRestore, "restore" );
    71 _LIT8( KRestoreDefault, "default" );
    71 _LIT8( KRestoreDefault, "default" );
       
    72 _LIT8( KRestoreAll, "all" );
    72 _LIT8( KRestoreRom, "rom" );
    73 _LIT8( KRestoreRom, "rom" );
    73 _LIT8( KRestoreViews, "views" );
    74 _LIT8( KRestoreViews, "views" );
    74 _LIT8( K0, "0" );
    75 _LIT8( K0, "0" );
    75 _LIT8( K1, "1" );
    76 _LIT8( K1, "1" );
    76 _LIT8( KPluginIdNotSet, "-1" );
    77 _LIT8( KPluginIdNotSet, "-1" );
   828     CLiwGenericParamList& outParamList = iServiceHandler->OutParamListL();
   829     CLiwGenericParamList& outParamList = iServiceHandler->OutParamListL();
   829          
   830          
   830     // Compose Liw message
   831     // Compose Liw message
   831     TLiwGenericParam restoreTypeParam;
   832     TLiwGenericParam restoreTypeParam;
   832     restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KRestoreRom ) );
   833     restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KRestoreRom ) );
       
   834     restoreTypeParam.PushL();
       
   835     inParamList.AppendL( restoreTypeParam );
       
   836     CleanupStack::Pop( &restoreTypeParam );
       
   837     restoreTypeParam.Reset();
       
   838       
       
   839     iHspsInterface->ExecuteCmdL( KHSPSCommandRestoreConfigurations, 
       
   840                                  inParamList, 
       
   841                                  outParamList ); 
       
   842       
       
   843     inParamList.Reset();
       
   844       
       
   845     // check success
       
   846     const TLiwGenericParam* outParam = NULL;
       
   847     TInt pos(0);
       
   848     outParam = outParamList.FindFirst( pos, KOutKeyStatus );
       
   849     TInt status(KErrGeneral);
       
   850     
       
   851     if ( outParam )
       
   852         {
       
   853         status = outParam->Value().AsTInt32();
       
   854         }
       
   855     outParamList.Reset();
       
   856     return status;
       
   857     }
       
   858 
       
   859 // ---------------------------------------------------------------------------
       
   860 // ---------------------------------------------------------------------------
       
   861 //
       
   862 EXPORT_C TInt CHspsWrapper::RestoreAllConfL()
       
   863     {
       
   864     CLiwGenericParamList& inParamList = iServiceHandler->InParamListL();
       
   865     CLiwGenericParamList& outParamList = iServiceHandler->OutParamListL();
       
   866          
       
   867     // Compose Liw message
       
   868     TLiwGenericParam restoreTypeParam;
       
   869     restoreTypeParam.SetNameAndValueL( KRestore, TLiwVariant( KRestoreAll ) );
   833     restoreTypeParam.PushL();
   870     restoreTypeParam.PushL();
   834     inParamList.AppendL( restoreTypeParam );
   871     inParamList.AppendL( restoreTypeParam );
   835     CleanupStack::Pop( &restoreTypeParam );
   872     CleanupStack::Pop( &restoreTypeParam );
   836     restoreTypeParam.Reset();
   873     restoreTypeParam.Reset();
   837       
   874