ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h
changeset 44 329d304c1aa1
parent 25 98b66e4fb0be
child 69 b18a4bf55ddb
equal deleted inserted replaced
42:d17dc5398051 44:329d304c1aa1
    24 #include <AknsSrvClient.h>
    24 #include <AknsSrvClient.h>
    25 #include <swi/sisregistrysession.h>
    25 #include <swi/sisregistrysession.h>
    26 #include <swi/sisregistryentry.h>
    26 #include <swi/sisregistryentry.h>
    27 #include <apgcli.h>
    27 #include <apgcli.h>
    28 #include <centralrepository.h>
    28 #include <centralrepository.h>
    29 #include <SWInstApi.h>
    29 #include <usif/sif/sif.h>
    30 #include <WidgetRegistryClient.h>
    30 #include <usif/scr/scr.h>
    31 
    31 
    32 #include "ncdinstallationservice.h"
    32 #include "ncdinstallationservice.h"
    33 #include "ncditempurpose.h"
    33 #include "ncditempurpose.h"
    34 #include "ncdasyncoperationobserver.h"
    34 #include "ncdasyncoperationobserver.h"
    35 #include "ncdasyncsilentinstallobserver.h"
    35 #include "ncdasyncsilentinstallobserver.h"
    36 
    36 
    37 #include "ncdwidgetregistrydata.h"
    37 #include "ncdwidgetregistrydata.h"
    38 
       
    39 /**
       
    40  * New Java registry API was introduced in 3.2. We start using it 
       
    41  * from 5.0 onwards because it seems that some 3.2 devices don't support
       
    42  * it entirely
       
    43  */
       
    44  
       
    45  /*  HLa - temporary java remove
       
    46 #if defined( __SERIES60_30__ ) || defined( __SERIES60_31__ ) || defined ( __S60_32__ )
       
    47     #define USE_OLD_JAVA_API
       
    48     class MJavaRegistrySuiteEntry;
       
    49     class MJavaRegistry;
       
    50 #else
       
    51     namespace Java
       
    52         {
       
    53         class CJavaRegistry;
       
    54         }
       
    55 #endif
       
    56 */
       
    57 
    38 
    58 class CDocumentHandler;
    39 class CDocumentHandler;
    59 
    40 
    60 class MNcdInstallationServiceObserver;
    41 class MNcdInstallationServiceObserver;
    61 class TCatalogsVersion;
    42 class TCatalogsVersion;
   138      * @see MNcdInstallationService::SilentInstallL
   119      * @see MNcdInstallationService::SilentInstallL
   139      */
   120      */
   140     void SilentInstallL( RFile& aFile,
   121     void SilentInstallL( RFile& aFile,
   141                          const TDesC& aMimeType,
   122                          const TDesC& aMimeType,
   142                          const TNcdItemPurpose& aPurpose,
   123                          const TNcdItemPurpose& aPurpose,
   143                          const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg );
   124                          const Usif::COpaqueNamedParams* aInstallOptionsPckg );
   144     
   125     
   145     /**
   126     /**
   146      * @see MNcdInstallationService::SilentInstallJavaL
   127      * @see MNcdInstallationService::SilentInstallJavaL
   147      */
   128      */
   148     void SilentInstallJavaL( RFile& aFile,
   129     void SilentInstallJavaL( RFile& aFile,
   149                              const TDesC& aMimeType,
   130                              const TDesC& aMimeType,
   150                              const TDesC8& aDescriptorData,
   131                              const TDesC8& aDescriptorData,
   151                              const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg );
   132                              const Usif::COpaqueNamedParams* aInstallOptionsPckg );
   152     
   133     
   153     /**
   134     /**
   154      * @see MNcdInstallationService::SilentInstallWidgetJavaL
   135      * @see MNcdInstallationService::SilentInstallWidgetJavaL
   155      */
   136      */
   156     void SilentInstallWidgetL( RFile& aFile,
   137     void SilentInstallWidgetL( RFile& aFile,
   157                                const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg );
   138                                const Usif::COpaqueNamedParams* aInstallOptionsPckg );
   158     
   139     
   159     /**
   140     /**
   160      * @see MNcdInstallationService::MNcdCancelSilentInstall
   141      * @see MNcdInstallationService::MNcdCancelSilentInstall
   161      */
   142      */
   162     void CancelSilentInstall( HBufC*& aFileName,
   143     void CancelSilentInstall( HBufC*& aFileName,
   310      * options. Ownership is not transferred.
   291      * options. Ownership is not transferred.
   311      */
   292      */
   312     void InstallL( RFile& aFile,
   293     void InstallL( RFile& aFile,
   313                    const TDesC& aMimeType,
   294                    const TDesC& aMimeType,
   314                    const TNcdItemPurpose& aPurpose,
   295                    const TNcdItemPurpose& aPurpose,
   315                    const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg );
   296                    const Usif::COpaqueNamedParams* aSilentInstallOptions );
   316 
   297 
   317     /**
   298     /**
   318      * @see MNcdInstallationService::InstallJavaL
   299      * @see MNcdInstallationService::InstallJavaL
   319      * @param aSilentInstallOptionsPckg If NULL, then installation is done normally.
   300      * @param aSilentInstallOptionsPckg If NULL, then installation is done normally.
   320      * If not NULL, then the installation is done silently by using the given 
   301      * If not NULL, then the installation is done silently by using the given 
   321      * options. Ownership is not transferred.
   302      * options. Ownership is not transferred.
   322      */
   303      */
   323     void InstallJavaL( RFile& aFile,
   304     void InstallJavaL( RFile& aFile,
   324                        const TDesC& aMimeType,
   305                        const TDesC& aMimeType,
   325                        const TDesC8& aDescriptorData,
   306                        const TDesC8& aDescriptorData,
   326                        const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg );
   307                        const Usif::COpaqueNamedParams* aSilentInstallOptions );
   327 
   308 
   328     
   309     
   329     void InstallWidgetL( 
   310     void InstallWidgetL( 
   330         RFile& aFile,
   311         RFile& aFile,
   331         const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg );
   312         const Usif::COpaqueNamedParams* aSilentInstallOptions );
   332         
   313         
   333 
   314 
   334     // Sets correct values for member variables after installation has finished
   315     // Sets correct values for member variables after installation has finished
   335     // or if it has been cancelled.
   316     // or if it has been cancelled.
   336     void InstallationFinishedSetup( TInt aReason );
   317     void InstallationFinishedSetup( TInt aReason );
   383      * 
   364      * 
   384      * @param aUid 
   365      * @param aUid 
   385      * @return ETrue if UID was found in the ROM UID list
   366      * @return ETrue if UID was found in the ROM UID list
   386      */
   367      */
   387     TBool IsRomApplication( const TUid& aUid ) const;
   368     TBool IsRomApplication( const TUid& aUid ) const;
   388     
       
   389     
       
   390     /**
       
   391      * Gets the UID of the latest installed midlet by using the 
       
   392      * Java installer's P&S key
       
   393      * 
       
   394      * @param aJavaRegistry Java registry
       
   395      * @return Midlet UID
       
   396      */
       
   397      
       
   398      /* HLa - temporary java remove
       
   399 #ifdef USE_OLD_JAVA_API
       
   400     TUid LatestMidletUidL( MJavaRegistry& aJavaRegistry ) const;
       
   401 #else    
       
   402     TUid LatestMidletUidL( Java::CJavaRegistry& aJavaRegistry ) const;
       
   403 #endif
       
   404     */
       
   405     
   369     
   406     static TBool MatchJava( const TDesC& aMime );
   370     static TBool MatchJava( const TDesC& aMime );
   407     
   371     
   408     TUid InstalledMidletUidL();
   372     TUid InstalledMidletUidL();
   409     
   373     
   457     // Java handling
   421     // Java handling
   458 
   422 
   459     // When installing java with JAD, the JAD path is stored here
   423     // When installing java with JAD, the JAD path is stored here
   460     HBufC* iJadFileName;
   424     HBufC* iJadFileName;
   461     
   425     
   462 #ifdef USE_OLD_JAVA_API    
       
   463     // For comparing installed midlet uids to find out the uid for the newly 
       
   464     // installed java app.
       
   465     RArray<TUid> iMIDletUids;
       
   466 #endif
       
   467 
   426 
   468     // Theme handling
   427     // Theme handling
   469     // Server session
   428     // Server session
   470     RAknsSrvSession iAknsSrv;
   429     RAknsSrvSession iAknsSrv;
   471     // Array of skin information packages
   430     // Array of skin information packages
   485     // Observer
   444     // Observer
   486     CNcdSilentInstallActiveObserver* iSilentInstallActiveObserver;
   445     CNcdSilentInstallActiveObserver* iSilentInstallActiveObserver;
   487     
   446     
   488     CNcdActiveOperationObserver* iInstallStatusObserver;
   447     CNcdActiveOperationObserver* iInstallStatusObserver;
   489 
   448 
   490     SwiUI::RSWInstLauncher iInstaller;
   449     //SwiUI::RSWInstLauncher iInstaller;
   491         
   450     Usif::RSoftwareInstall iInstaller;
       
   451     Usif::COpaqueNamedParams* iArguments; 
       
   452     Usif::COpaqueNamedParams* iResults;
       
   453     
   492     // ROM application UIDS
   454     // ROM application UIDS
   493     RArray<TUid> iRomUids; 
   455     RArray<TUid> iRomUids; 
   494     
   456     
   495     // needed for cancelling install correctly
   457     //RWidgetRegistryClientSession iWidgetRegistry; 
   496     SwiUI::TServerRequest iCancelCode;  
   458     Usif::RSoftwareComponentRegistry iScrSession;
   497     
   459     
   498     
   460     //RWidgetInfoArray iInstalledWidgets;    
   499     RWidgetRegistryClientSession iWidgetRegistry;    
       
   500     
       
   501     RWidgetInfoArray iInstalledWidgets;    
       
   502     RPointerArray<CExtendedWidgetInfo> iInstalledWidgetsInfos; 
   461     RPointerArray<CExtendedWidgetInfo> iInstalledWidgetsInfos; 
   503     };
   462     };
   504 
   463 
   505 #endif // C_NCD_INSTALLATION_SERVICE_IMPL_H
   464 #endif // C_NCD_INSTALLATION_SERVICE_IMPL_H