diff -r 7333d7932ef7 -r 8b7f4e561641 ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h --- a/ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h Tue Aug 31 15:21:33 2010 +0300 +++ b/ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h Wed Sep 01 12:22:02 2010 +0100 @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include "ncdinstallationservice.h" #include "ncditempurpose.h" @@ -36,6 +36,24 @@ #include "ncdwidgetregistrydata.h" + +/** + * New Java registry API was introduced in 3.2. We start using it + * from 5.0 onwards because it seems that some 3.2 devices don't support + * it entirely + */ +#if defined( __SERIES60_30__ ) || defined( __SERIES60_31__ ) || defined ( __S60_32__ ) + #define USE_OLD_JAVA_API + class MJavaRegistrySuiteEntry; + class MJavaRegistry; +#else + namespace Java + { + class CJavaRegistry; + } +#endif + + class CDocumentHandler; class MNcdInstallationServiceObserver; @@ -121,7 +139,7 @@ void SilentInstallL( RFile& aFile, const TDesC& aMimeType, const TNcdItemPurpose& aPurpose, - const Usif::COpaqueNamedParams* aInstallOptionsPckg ); + const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg ); /** * @see MNcdInstallationService::SilentInstallJavaL @@ -129,13 +147,13 @@ void SilentInstallJavaL( RFile& aFile, const TDesC& aMimeType, const TDesC8& aDescriptorData, - const Usif::COpaqueNamedParams* aInstallOptionsPckg ); + const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg ); /** * @see MNcdInstallationService::SilentInstallWidgetJavaL */ void SilentInstallWidgetL( RFile& aFile, - const Usif::COpaqueNamedParams* aInstallOptionsPckg ); + const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg ); /** * @see MNcdInstallationService::MNcdCancelSilentInstall @@ -293,7 +311,7 @@ void InstallL( RFile& aFile, const TDesC& aMimeType, const TNcdItemPurpose& aPurpose, - const Usif::COpaqueNamedParams* aSilentInstallOptions ); + const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg ); /** * @see MNcdInstallationService::InstallJavaL @@ -304,12 +322,12 @@ void InstallJavaL( RFile& aFile, const TDesC& aMimeType, const TDesC8& aDescriptorData, - const Usif::COpaqueNamedParams* aSilentInstallOptions ); + const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg ); void InstallWidgetL( RFile& aFile, - const Usif::COpaqueNamedParams* aSilentInstallOptions ); + const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg ); // Sets correct values for member variables after installation has finished @@ -367,6 +385,20 @@ */ TBool IsRomApplication( const TUid& aUid ) const; + + /** + * Gets the UID of the latest installed midlet by using the + * Java installer's P&S key + * + * @param aJavaRegistry Java registry + * @return Midlet UID + */ +#ifdef USE_OLD_JAVA_API + TUid LatestMidletUidL( MJavaRegistry& aJavaRegistry ) const; +#else + TUid LatestMidletUidL( Java::CJavaRegistry& aJavaRegistry ) const; +#endif + static TBool MatchJava( const TDesC& aMime ); TUid InstalledMidletUidL(); @@ -423,6 +455,11 @@ // When installing java with JAD, the JAD path is stored here HBufC* iJadFileName; +#ifdef USE_OLD_JAVA_API + // For comparing installed midlet uids to find out the uid for the newly + // installed java app. + RArray iMIDletUids; +#endif // Theme handling // Server session @@ -446,18 +483,18 @@ CNcdActiveOperationObserver* iInstallStatusObserver; - //SwiUI::RSWInstLauncher iInstaller; - Usif::RSoftwareInstall iInstaller; - Usif::COpaqueNamedParams* iArguments; - Usif::COpaqueNamedParams* iResults; - + SwiUI::RSWInstLauncher iInstaller; + // ROM application UIDS RArray iRomUids; - //RWidgetRegistryClientSession iWidgetRegistry; - Usif::RSoftwareComponentRegistry iScrSession; + // needed for cancelling install correctly + SwiUI::TServerRequest iCancelCode; + - //RWidgetInfoArray iInstalledWidgets; + RWidgetRegistryClientSession iWidgetRegistry; + + RWidgetInfoArray iInstalledWidgets; RPointerArray iInstalledWidgetsInfos; };