ncdengine/provider/client/src/ncdsilentinstalloperationproxy.cpp
branchRCL_3
changeset 25 7333d7932ef7
parent 11 3ba40be8e484
child 26 8b7f4e561641
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
    37     MNcdOperationProxyRemoveHandler* aRemoveHandler,
    37     MNcdOperationProxyRemoveHandler* aRemoveHandler,
    38     CNcdNodeProxy* aNode,
    38     CNcdNodeProxy* aNode,
    39     CNcdNodeManagerProxy* aNodeManager,
    39     CNcdNodeManagerProxy* aNodeManager,
    40     MNcdInstallOperationObserver* aObserver,
    40     MNcdInstallOperationObserver* aObserver,
    41     MNcdInstallationService& aInstallationService,
    41     MNcdInstallationService& aInstallationService,
    42     const SwiUI::TInstallOptions& aInstallOptions )
    42     Usif::COpaqueNamedParams* aInstallOptions )
    43     {
    43     {
    44     CNcdSilentInstallOperationProxy* self =
    44     CNcdSilentInstallOperationProxy* self =
    45         new( ELeave ) CNcdSilentInstallOperationProxy( aInstallationService, 
    45         new( ELeave ) CNcdSilentInstallOperationProxy( aInstallationService, 
    46                                                        aInstallOptions );
    46                                                        aInstallOptions );
    47     
    47     
    57 // Constructor
    57 // Constructor
    58 // ---------------------------------------------------------------------------
    58 // ---------------------------------------------------------------------------
    59 //
    59 //
    60 CNcdSilentInstallOperationProxy::CNcdSilentInstallOperationProxy( 
    60 CNcdSilentInstallOperationProxy::CNcdSilentInstallOperationProxy( 
    61     MNcdInstallationService& aInstallationService,
    61     MNcdInstallationService& aInstallationService,
    62     const SwiUI::TInstallOptions& aInstallOptions )
    62     /*const*/ Usif::COpaqueNamedParams* aInstallOptions )
    63 : CNcdInstallOperationProxy( aInstallationService )
    63 : CNcdInstallOperationProxy( aInstallationService )
    64     {
    64     {
    65     // Copy all the install options into the buffer that will be used
    65     // Copy all the install options into the buffer that will be used
    66     // when silent installation is delegated to the installer.
    66     // when silent installation is delegated to the installer.
    67     iInstallOptionsPackage = aInstallOptions;
    67     iInstallOptions = aInstallOptions;
    68     }
    68     }
    69 
       
    70 
    69 
    71 // ---------------------------------------------------------------------------
    70 // ---------------------------------------------------------------------------
    72 // Destructor
    71 // Destructor
    73 // ---------------------------------------------------------------------------
    72 // ---------------------------------------------------------------------------
    74 //
    73 //
    75 CNcdSilentInstallOperationProxy::~CNcdSilentInstallOperationProxy()
    74 CNcdSilentInstallOperationProxy::~CNcdSilentInstallOperationProxy()
    76     {
    75     {
    77     DLTRACEIN(( "" ));
    76     DLTRACEIN(( "" ));
       
    77     
       
    78     delete iInstallOptions;
       
    79     
    78     // Cancel must be called here because base class will only call its own
    80     // Cancel must be called here because base class will only call its own
    79     // DoCancel()
    81     // DoCancel()
    80     Cancel();
    82     Cancel();
    81     DLTRACEOUT(( "" ));    
    83     DLTRACEOUT(( "" ));    
    82     }
    84     }
   188             {            
   190             {            
   189             Installer().SilentInstallL(
   191             Installer().SilentInstallL(
   190                 iFileHandle, 
   192                 iFileHandle, 
   191                 aFile.MimeType(), 
   193                 aFile.MimeType(), 
   192                 aFile.Purpose(), 
   194                 aFile.Purpose(), 
   193                 SilentInstallOptionsPackage() );
   195                 SilentInstallOptions() ); 
   194             break;
   196             break;
   195             }
   197             }
   196         
   198         
   197         case CNcdInstallInfo::ENcdInstallJar: // flow through
   199         case CNcdInstallInfo::ENcdInstallJar: // flow through
   198         case CNcdInstallInfo::ENcdInstallJad:
   200         case CNcdInstallInfo::ENcdInstallJad:
   199             {
   201             {
   200             Installer().SilentInstallJavaL( 
   202             Installer().SilentInstallJavaL( 
   201                 iFileHandle, 
   203                 iFileHandle, 
   202                 aFile.MimeType(), 
   204                 aFile.MimeType(), 
   203                 aFile.Data(),
   205                 aFile.Data(),
   204                 SilentInstallOptionsPackage() );             
   206                 SilentInstallOptions() );             
   205             break;
   207             break;
   206             }            
   208             }            
   207 
   209 
   208         // Call the corresponding installing function according to the type value.
   210         // Call the corresponding installing function according to the type value.
   209         // MimeType info is missing here but SWI will figure out the mimetype via file handler
   211         // MimeType info is missing here but SWI will figure out the mimetype via file handler
   210         // and call the corresponding plugin.
   212         // and call the corresponding plugin.
   211         case CNcdInstallInfo::ENcdInstallWidget:
   213         case CNcdInstallInfo::ENcdInstallWidget:
   212             {
   214             {
   213             Installer().SilentInstallWidgetL(
   215             Installer().SilentInstallWidgetL(
   214                     iFileHandle, 
   216                     iFileHandle, 
   215                     SilentInstallOptionsPackage() );
   217                     SilentInstallOptions() );
   216    
   218    
   217             break;
   219             break;
   218             }
   220             }
   219         
   221         
   220         default:
   222         default:
   225             }
   227             }
   226         }
   228         }
   227     DLTRACEOUT((""));   
   229     DLTRACEOUT((""));   
   228     }
   230     }
   229 
   231 
   230 
   232 const Usif::COpaqueNamedParams* CNcdSilentInstallOperationProxy::SilentInstallOptions() const
   231 const SwiUI::TInstallOptionsPckg& CNcdSilentInstallOperationProxy::SilentInstallOptionsPackage() const
       
   232     {
   233     {
   233     DLTRACEIN((""));
   234     DLTRACEIN((""));
   234     return iInstallOptionsPackage;
   235     return iInstallOptions;
   235     }
   236     }