26 #include <ssl.h> |
26 #include <ssl.h> |
27 #include <swi/launcher.h> |
27 #include <swi/launcher.h> |
28 #include <swi/sisregistrysession.h> |
28 #include <swi/sisregistrysession.h> |
29 #include <swi/sisregistrypackage.h> |
29 #include <swi/sisregistrypackage.h> |
30 #include <swi/sisregistryentry.h> |
30 #include <swi/sisregistryentry.h> |
31 #include <downloadmgrclient.h> |
31 #include <hbprogressdialog.h> |
32 |
32 #include <hbmainwindow.h> |
|
33 #include <hbaction.h> |
|
34 #include <usif/sif/sif.h> |
|
35 #include <SWInstApi.h> |
|
36 #include <QGraphicsLinearLayout> |
33 #include "ApplicationManagementClientServer.h" |
37 #include "ApplicationManagementClientServer.h" |
34 #include "PlatformSecurityPolicies.h" |
38 #include "PlatformSecurityPolicies.h" |
35 #include "AMDeploymentComponent.h" |
39 #include "AMDeploymentComponent.h" |
36 #include "amstorage.h" |
40 #include "amstorage.h" |
37 #include "ApplicationManagementUtility.h" |
41 #include "ApplicationManagementUtility.h" |
38 #include "AMDownloaddb.h" |
42 #include "AMDownloaddb.h" |
39 |
43 #include "amwaitprogdialog.h" |
40 #include "AMDownloadManager.h" |
44 #include "AMDownloadStore.h" |
|
45 |
41 // CONSTANTS |
46 // CONSTANTS |
|
47 const TUid NProperty = {0x200267FB}; |
|
48 const TUint32 NInteger = 0x00000001; |
42 const TInt KBase64BufSize = 131072; |
49 const TInt KBase64BufSize = 131072; |
|
50 const QString path = "z:/resource/qt/translations/"; |
43 class CAppMgmtSrvApp; |
51 class CAppMgmtSrvApp; |
44 |
52 _LIT(KIndicatorParamDownloading, "Downloading"); |
45 namespace NApplicationManagement |
53 namespace NApplicationManagement |
46 { |
54 { |
47 |
55 |
48 // ----------------------------------------------------------- |
56 // ----------------------------------------------------------- |
49 // ApplicationManagement server panic codes |
57 // ApplicationManagement server panic codes |
53 EPanicGeneral, |
61 EPanicGeneral, |
54 EBadSubsessionHandle, |
62 EBadSubsessionHandle, |
55 EPanicIllegalFunction, |
63 EPanicIllegalFunction, |
56 EBadDescriptor |
64 EBadDescriptor |
57 }; |
65 }; |
58 |
66 // ----------------------------------------------------------- |
|
67 // Wait dialog types |
|
68 // ----------------------------------------------------------- |
|
69 enum TDialogType |
|
70 { |
|
71 EInstallWaitDlg, |
|
72 EUninstallWaitDlg |
|
73 }; |
59 // FUNCTION PROTOTYPES |
74 // FUNCTION PROTOTYPES |
60 |
75 |
61 void PanicClient(const RMessagePtr2& aMessage, |
76 void PanicClient(const RMessagePtr2& aMessage, |
62 TApplicationManagementPanic aPanic); |
77 TApplicationManagementPanic aPanic); |
63 |
78 |
80 /** |
95 /** |
81 * CApplicationManagementServer |
96 * CApplicationManagementServer |
82 * Description. |
97 * Description. |
83 */ |
98 */ |
84 |
99 |
85 class CApplicationManagementServer : public CAknAppServer, |
100 class CApplicationManagementServer : public CPolicyServer, |
86 public MDownloadMngrObserver |
101 public MDownloadMngrObserver,public MInstallerCallBack |
87 { |
102 { |
88 public: |
103 public: |
89 static CApplicationManagementServer* NewL(); |
104 static CServer2* NewL(HbMainWindow *mainWindow); |
90 ~CApplicationManagementServer(); |
105 ~CApplicationManagementServer(); |
91 |
106 |
92 void Panic(TInt aPanicCode); |
107 void Panic(TInt aPanicCode); |
93 void AddSession(); |
108 void AddSession(); |
94 void DropSession(); |
109 void DropSession(); |
95 |
110 |
96 CPolicyServer::TCustomResult CreateServiceSecurityCheckL( |
111 CPolicyServer::TCustomResult CreateServiceSecurityCheckL( |
97 TUid aServiceType, const RMessage2& aMsg, TInt& aAction, |
112 TUid aServiceType, const RMessage2& aMsg, TInt& aAction, |
98 TSecurityInfo& aMissing); |
113 TSecurityInfo& aMissing); |
99 private: |
114 private: |
100 |
115 |
101 CApplicationManagementServer(); |
116 CApplicationManagementServer(); |
102 virtual void ConstructL(const TDesC &aServerName); |
117 virtual void ConstructL(HbMainWindow *mainWindow); |
103 /*CSession2* NewSessionL(const TVersion& aVersion, |
118 CSession2* NewSessionL(const TVersion& aVersion, |
104 const RMessage2& aMessage) const;*/ |
119 const RMessage2& aMessage) const; |
105 |
120 |
106 //From CPolicyServer |
121 //From CPolicyServer |
107 CPolicyServer::TCustomResult |
122 CPolicyServer::TCustomResult |
108 CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, |
123 CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, |
109 TSecurityInfo& aMissing); |
124 TSecurityInfo& aMissing); |
239 void ComponentDownloadFailed(CDeploymentComponent *aComponent, |
254 void ComponentDownloadFailed(CDeploymentComponent *aComponent, |
240 TInt aReason); |
255 TInt aReason); |
241 |
256 |
242 void StartShutDownTimerL(); |
257 void StartShutDownTimerL(); |
243 |
258 |
244 void SendServerToBackground(); |
|
245 |
|
246 void BringServertoForeground(); |
|
247 |
|
248 void BringDMUItoForeground(); |
|
249 TBool IsInstalledAppRemovableL(TDriveNumber &iDrive); |
259 TBool IsInstalledAppRemovableL(TDriveNumber &iDrive); |
250 |
260 |
|
261 void InstallationCancelled(); |
251 private: |
262 private: |
252 |
263 |
253 /** |
264 /** |
254 * FullUpdateL updates target with source |
265 * FullUpdateL updates target with source |
255 * @param sid Source deployment component |
266 * @param sid Source deployment component |
335 void GenerateTempFileNameL(RFs &aFs, |
346 void GenerateTempFileNameL(RFs &aFs, |
336 const CDeploymentComponent& aCompo, TFileName &aFileName, |
347 const CDeploymentComponent& aCompo, TFileName &aFileName, |
337 TFileName &aMetaFileName) const; |
348 TFileName &aMetaFileName) const; |
338 |
349 |
339 CApaAppServiceBase* CreateServiceL(TUid aServiceType) const; |
350 CApaAppServiceBase* CreateServiceL(TUid aServiceType) const; |
340 |
351 public: |
341 public: |
|
342 |
|
343 CAppMgmtSrvApp* iParentApp; |
352 CAppMgmtSrvApp* iParentApp; |
344 |
353 private: |
345 private: |
|
346 |
|
347 TInt iSessionCount; |
354 TInt iSessionCount; |
348 CShutdown iShutdown; |
355 CShutdown iShutdown; |
349 CApplicationManagementUtility* iUtility; |
356 CApplicationManagementUtility* iUtility; |
350 CDeliveryComponentStorage *iStorage; |
357 CDeliveryComponentStorage *iStorage; |
351 TBool iInstallInProgress; |
358 TBool iInstallInProgress; |
352 |
359 |
353 //SwiUI::RSWInstSilentLauncher iInstaller; |
360 Usif::RSoftwareInstall iInstaller; |
354 SwiUI::RSWInstLauncher iInstaller; |
361 Usif::COpaqueNamedParams *iArgu; |
|
362 Usif::COpaqueNamedParams *iResults; |
355 SwiUI::TInstallOptionsPckg iInstallOptions; |
363 SwiUI::TInstallOptionsPckg iInstallOptions; |
356 SwiUI::TUninstallOptionsPckg iUninstallOptions; |
364 SwiUI::TUninstallOptionsPckg iUninstallOptions; |
357 SwiUI::TInstallReqPckg iInstallReq; |
365 SwiUI::TInstallReqPckg iInstallReq; |
358 |
366 TFileName iAppname; |
359 RFs iInstallRFs; |
367 RFs iInstallRFs; |
360 RFile iInstallFile; |
368 RFile iInstallFile; |
361 |
369 CAMDownloadStore* iDownloadMngr; |
362 CAMDownloadManager* iDownloadMngr; |
|
363 |
|
364 CAMDownloaddb* iAMServerDB; |
370 CAMDownloaddb* iAMServerDB; |
365 TBool iOMASCOMOEnabled; |
371 TBool iOMASCOMOEnabled; |
366 |
372 |
|
373 appmgmtdownloadmgr* m_DownloadMngr; |
|
374 QString m_appName; |
|
375 AMWaitProgDialog* m_Dlg; |
|
376 CDeploymentComponent* iComp; |
|
377 HbMainWindow* m_Window; |
|
378 int mUserCancelled; |
367 }; |
379 }; |
368 |
380 |
369 namespace NPolicyConstants |
381 namespace NPolicyConstants |
370 { |
382 { |
371 |
383 |
376 _LIT8( KUse, "Use" ); |
388 _LIT8( KUse, "Use" ); |
377 } |
389 } |
378 _LIT8( KResourceValue, "ApplicationManagement" ); |
390 _LIT8( KResourceValue, "ApplicationManagement" ); |
379 } |
391 } |
380 |
392 |
381 class CApplicationManagementSession : public CAknAppServiceBase |
393 class CApplicationManagementSession : public CSession2 |
382 { |
394 { |
383 public: |
395 public: |
384 inline CApplicationManagementSession(); |
396 inline CApplicationManagementSession(); |
385 inline CApplicationManagementSession(const TCertInfo &aInfo); |
397 inline CApplicationManagementSession(const TCertInfo &aInfo); |
386 void CreateL(); |
398 void CreateL(); |
432 RComponentIdArray &aArr,TDeploymentComponentState &aState) const; |
444 RComponentIdArray &aArr,TDeploymentComponentState &aState) const; |
433 |
445 |
434 void GenericAlertSentForIdL(const RMessage2& aMessage) const; |
446 void GenericAlertSentForIdL(const RMessage2& aMessage) const; |
435 |
447 |
436 void CheckStatusNodesValuesL(); |
448 void CheckStatusNodesValuesL(); |
437 |
|
438 void SetSCOMOTargetURI(const TDesC8& aURI) const; |
|
439 |
449 |
440 private: |
450 private: |
441 void LookupSisRegistryL(); |
451 void LookupSisRegistryL(); |
442 |
452 |
443 TCertInfo iCertInfo; |
453 TCertInfo iCertInfo; |
444 TBool iTrustAdded; |
454 TBool iTrustAdded; |
|
455 |
445 }; |
456 }; |
446 |
457 |
447 } |
458 } |
448 #endif //__APPLICATIONMANAGEMENTSERVER_H__ |
459 #endif //__APPLICATIONMANAGEMENTSERVER_H__ |
449 // End of File |
460 // End of File |