appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner_symbian.cpp
changeset 60 245df5276b97
parent 42 d17dc5398051
child 69 b18a4bf55ddb
equal deleted inserted replaced
53:ae54820ef82c 60:245df5276b97
    16 */
    16 */
    17 
    17 
    18 #include "activerunner_symbian.h"
    18 #include "activerunner_symbian.h"
    19 #include "activerunner.h"
    19 #include "activerunner.h"
    20 
    20 
       
    21 _LIT( KDefaultOcspResponderUrl, "http://4fil30423.noe.nokia.com:45000/" );
       
    22 
    21 
    23 
    22 ActiveRunnerPrivate::ActiveRunnerPrivate( ActiveRunner *aRunner ) :
    24 ActiveRunnerPrivate::ActiveRunnerPrivate( ActiveRunner *aRunner ) :
    23         CActive( CActive::EPriorityStandard ), q_ptr( aRunner )
    25         CActive( CActive::EPriorityStandard ), q_ptr( aRunner )
    24     {
    26     {
    25     CActiveScheduler::Add( this );
    27     CActiveScheduler::Add( this );
    46     {
    48     {
    47     TRAPD( err, DoInitializeL( aUseSif ) );
    49     TRAPD( err, DoInitializeL( aUseSif ) );
    48     return err;
    50     return err;
    49     }
    51     }
    50 
    52 
    51 TInt ActiveRunnerPrivate::Install( const QString& aFileName, bool aSilent, bool aOpenFile )
    53 TInt ActiveRunnerPrivate::Install( const QString& aFileName, bool aSilent, bool aOpenFile, bool aOcsp )
    52     {
    54     {
    53     TRAPD( err, DoInstallL( aFileName, aSilent, aOpenFile ) );
    55     TRAPD( err, DoInstallL( aFileName, aSilent, aOpenFile, aOcsp ) );
    54     return err;
    56     return err;
    55     }
    57     }
    56 
    58 
    57 TInt ActiveRunnerPrivate::Remove( const Usif::TComponentId& aComponentId, bool aSilent )
    59 TInt ActiveRunnerPrivate::Remove( const Usif::TComponentId& aComponentId, bool aSilent )
    58     {
    60     {
   112         {
   114         {
   113         User::LeaveIfError( iSWInstLauncher.Connect() );
   115         User::LeaveIfError( iSWInstLauncher.Connect() );
   114         }
   116         }
   115     }
   117     }
   116 
   118 
   117 void ActiveRunnerPrivate::DoInstallL( const QString& aFileName, bool aSilent, bool aOpenFile )
   119 void ActiveRunnerPrivate::DoInstallL( const QString& aFileName, bool aSilent, bool aOpenFile, bool aOcsp )
   118     {
   120     {
   119     if( iFileName )
   121     if( iFileName )
   120         {
   122         {
   121         delete iFileName;
   123         delete iFileName;
   122         iFileName = NULL;
   124         iFileName = NULL;
   143         CleanupClosePushL( fileHandle );
   145         CleanupClosePushL( fileHandle );
   144         }
   146         }
   145 
   147 
   146     if( iUseSif )
   148     if( iUseSif )
   147         {
   149         {
       
   150         delete iArguments;
       
   151         iArguments = NULL;
       
   152         iArguments = Usif::COpaqueNamedParams::NewL();
       
   153 
       
   154         delete iResults;
       
   155         iResults = NULL;
       
   156         iResults = Usif::COpaqueNamedParams::NewL();
       
   157 
   148         if( aSilent )
   158         if( aSilent )
   149             {
   159             {
   150             delete iArguments;
   160             iArguments->AddIntL( Usif::KSifInParam_InstallSilently, ETrue );
   151             iArguments = NULL;
   161             }
   152             iArguments = Usif::COpaqueNamedParams::NewL();
   162         if( aOcsp )
   153             iArguments->AddIntL( Usif::KSifInParam_InstallSilently, 1 );
   163             {
   154 
   164             iArguments->AddIntL( Usif::KSifInParam_PerformOCSP, Usif::EAllowed );
   155             delete iResults;
   165             iArguments->AddStringL( Usif::KSifInParam_OCSPUrl, KDefaultOcspResponderUrl );
   156             iResults = NULL;
   166             }
   157             iResults = Usif::COpaqueNamedParams::NewL();
   167 
   158 
   168         if( aOpenFile )
   159             if( aOpenFile )
   169             {
   160                 {
   170             iSoftwareInstall.Install( fileHandle, *iArguments, *iResults, iStatus );
   161                 iSoftwareInstall.Install( fileHandle, *iArguments, *iResults, iStatus );
       
   162                 }
       
   163             else
       
   164                 {
       
   165                 iSoftwareInstall.Install( fileName, *iArguments, *iResults, iStatus );
       
   166                 }
       
   167             }
   171             }
   168         else
   172         else
   169             {
   173             {
   170             if( aOpenFile )
   174             iSoftwareInstall.Install( fileName, *iArguments, *iResults, iStatus );
   171                 {
       
   172                 iSoftwareInstall.Install( fileHandle, iStatus );
       
   173                 }
       
   174             else
       
   175                 {
       
   176                 iSoftwareInstall.Install( fileName, iStatus );
       
   177                 }
       
   178             }
   175             }
   179         }
   176         }
   180     else
   177     else
   181         {
   178         {
   182         if( aSilent )
   179         if( aSilent )
   199                 {
   196                 {
   200                 iSWInstLauncher.Install( iStatus, fileHandle );
   197                 iSWInstLauncher.Install( iStatus, fileHandle );
   201                 }
   198                 }
   202             else
   199             else
   203                 {
   200                 {
   204                 iSWInstLauncher.Install( iStatus, fileName );
   201                 iSWInstLauncher.Install( iStatus, fileName  );
   205                 }
   202                 }
   206             }
   203             }
   207         }
   204         }
   208 
   205 
   209     if( aOpenFile )
   206     if( aOpenFile )