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