1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: CSConAppInstaller header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _SCONINSTALLER_H_ |
|
20 #define _SCONINSTALLER_H_ |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <e32cons.h> |
|
26 #include <usif/sif/sif.h> |
|
27 |
|
28 #include "sconinstqueue.h" |
|
29 |
|
30 class CSConUninstall; |
|
31 |
|
32 //============================================================ |
|
33 // Class CSConAppInstaller declaration |
|
34 //============================================================ |
|
35 NONSHARABLE_CLASS ( CSConAppInstaller ): public CActive |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Constructor |
|
40 * @param aQueue The address of CSConInstallerQueu |
|
41 * @return none |
|
42 */ |
|
43 static CSConAppInstaller* NewL( CSConInstallerQueue* aQueue, RFs& aFs ); |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 * @return none |
|
48 */ |
|
49 ~CSConAppInstaller(); |
|
50 |
|
51 /** |
|
52 * Starts the installer task |
|
53 * @param aTaskId Task number |
|
54 * @return none |
|
55 */ |
|
56 void StartInstaller( TInt& aTaskId ); |
|
57 /** |
|
58 * Stops the installer task |
|
59 * @return none |
|
60 */ |
|
61 void StopInstaller( TInt& aTaskId ); |
|
62 |
|
63 /** |
|
64 * Returns the active status of the installer |
|
65 * @return ETrue if installer is active, else EFalse |
|
66 */ |
|
67 TBool InstallerActive() const; |
|
68 |
|
69 private: |
|
70 /** |
|
71 * Constructor |
|
72 * @param aQueue The address of CSConInstallerQueu |
|
73 * @return none |
|
74 */ |
|
75 CSConAppInstaller( CSConInstallerQueue* aQueue, RFs& aFs ); |
|
76 |
|
77 void ConstructL(); |
|
78 /** |
|
79 * Implementation of CActive::DoCancel() |
|
80 * @return none |
|
81 */ |
|
82 void DoCancel(); |
|
83 /** |
|
84 * Implementation of CActive::RunL() |
|
85 * @return none |
|
86 */ |
|
87 void RunL(); |
|
88 |
|
89 void WriteTaskDataL( CSConTask& aTask ); |
|
90 |
|
91 void ExternalizeResultArrayIntValL( const TDesC& aName, RWriteStream& aStream ); |
|
92 void ExternalizeResultIntValL( const TDesC& aName, RWriteStream& aStream ); |
|
93 void ExternalizeResultStringValL( const TDesC& aName, RWriteStream& aStream ); |
|
94 /** |
|
95 * Executes ListInstalledApps task |
|
96 * @return none |
|
97 */ |
|
98 void ProcessListInstalledAppsL(); |
|
99 /** |
|
100 * Executes Install task |
|
101 * @param CSConInstall install params |
|
102 * @return none |
|
103 */ |
|
104 void ProcessInstallL( const CSConInstall& aInstallParams ); |
|
105 /** |
|
106 * Executes UnInstall task |
|
107 * @param CSConUninstall uninstall params |
|
108 * @return none |
|
109 */ |
|
110 void ProcessUninstallL( const CSConUninstall& aUninstallParams ); |
|
111 |
|
112 //void UninstallSisL( const CSConUninstall& aUninstallParams ); |
|
113 //void UninstallJavaL( const TUid& aUid, const TSConInstallMode aMode ); |
|
114 //void UninstallWidget( const TUid& aUid, const TSConInstallMode aMode ); |
|
115 void DeleteFile( const TDesC& aPath ); |
|
116 |
|
117 private: |
|
118 enum TInstallerState |
|
119 { |
|
120 EIdle = 0, |
|
121 EInstalling, |
|
122 ESilentInstalling, |
|
123 EUninstalling, |
|
124 ESilentUninstalling, |
|
125 ECustomUninstalling, |
|
126 ESilentCustomUnistalling, |
|
127 EListingInstalledApps |
|
128 }; |
|
129 //TInstallerState iInstallerState; |
|
130 CSConInstallerQueue* iQueue; // Not owned |
|
131 //SwiUI::RSWInstLauncher iSWInst; |
|
132 //SwiUI::TInstallOptions iOptions; |
|
133 //SwiUI::TInstallOptionsPckg iOptionsPckg; |
|
134 Usif::RSoftwareInstall iSwInstaller; |
|
135 Usif::COpaqueNamedParams* iSifOptions; |
|
136 Usif::COpaqueNamedParams* iSifResults; |
|
137 TInt iCurrentTask; |
|
138 RFs& iFs; |
|
139 }; |
|
140 |
|
141 #endif // _SCONINSTALLER_H_ |
|
142 |
|
143 // End of file |
|