|
1 /* |
|
2 * Copyright (c) 2008 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: Installs HSPS configurations. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef C_CHSPSINSTALLER_H |
|
21 #define C_CHSPSINSTALLER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <f32file.h> |
|
25 #include "hspsthememanagement.h" |
|
26 |
|
27 class ChspsThemeServer; |
|
28 class ChspsInstallationHandler; |
|
29 |
|
30 /** |
|
31 * @ingroup group_hspsserver |
|
32 * HSPS Installer |
|
33 * @lib hspsThemeServer.exe |
|
34 * @since S60 5.0 |
|
35 */ |
|
36 class CHSPSInstaller : public CActive |
|
37 { |
|
38 public: // Constructors and destructors |
|
39 /** |
|
40 * NewL. |
|
41 * Two-phased constructor. |
|
42 * Creates a CHSPSInstaller object using two phase construction, |
|
43 * and return a pointer to the created object. |
|
44 * @since S60 5.0 |
|
45 * @param aServer is a reference to HSPS Theme Server |
|
46 * @return A pointer to the created instance of CHSPSInstaller. |
|
47 */ |
|
48 static CHSPSInstaller* NewL( |
|
49 ChspsThemeServer& aServer ); |
|
50 |
|
51 /** |
|
52 * ~CHSPSInstaller. |
|
53 * Destructor. |
|
54 * Destroys the object and release all memory objects. |
|
55 * @since S60 5.0 |
|
56 */ |
|
57 virtual ~CHSPSInstaller(); |
|
58 |
|
59 public: // New functions |
|
60 |
|
61 /** |
|
62 * InstallConfigurationL |
|
63 * Synchronous service for installing configurations from provided manifest files. |
|
64 * @since S60 5.0 |
|
65 * @param aFileName is name of the manifest file (full path) to be installed. |
|
66 * @return ThspsServiceCompletedMessage error code |
|
67 */ |
|
68 ThspsServiceCompletedMessage InstallConfigurationL( |
|
69 const TDesC& aFileName ); |
|
70 |
|
71 /** |
|
72 * Get installation handler. |
|
73 */ |
|
74 ChspsInstallationHandler& InstallationHandler(); |
|
75 |
|
76 public: // Functions from base classes |
|
77 |
|
78 /** |
|
79 * RunL. |
|
80 * From CActive, callback function. |
|
81 * Invoked to handle responses from the server. |
|
82 * @since S60 5.0 |
|
83 */ |
|
84 void RunL(); |
|
85 |
|
86 /** |
|
87 * DoCancel. |
|
88 * From CActive, cancels any outstanding operation. |
|
89 * @since S60 5.0 |
|
90 */ |
|
91 void DoCancel(); |
|
92 |
|
93 /** |
|
94 * RunError. |
|
95 * From CActive Called when asynchronous request has failed |
|
96 * @since S60 5.0 |
|
97 */ |
|
98 TInt RunError( |
|
99 TInt aError ); |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * CHSPSInstaller. |
|
105 * Performs the first phase of two phase construction. |
|
106 * @since S60 5.0 |
|
107 * @param aServer is a reference to the HSPS Theme Server |
|
108 */ |
|
109 CHSPSInstaller( |
|
110 ChspsThemeServer& aServer ); |
|
111 |
|
112 /** |
|
113 * ConstructL. |
|
114 * Performs the second phase construction of a CHSPSInstaller object. |
|
115 * @since S60 5.0 |
|
116 */ |
|
117 void ConstructL(); |
|
118 |
|
119 private: // Data |
|
120 |
|
121 // Reference to HSPS Theme Server |
|
122 ChspsThemeServer& iServer; |
|
123 |
|
124 // Installation handler |
|
125 ChspsInstallationHandler* iInstallationHandler; |
|
126 |
|
127 // Installation status |
|
128 ThspsServiceCompletedMessage iRet; |
|
129 |
|
130 // Required by the installation process |
|
131 TBuf8<KMaxHeaderDataLength8> iHeaderData; |
|
132 |
|
133 // Active scheduler nested wait loop |
|
134 CActiveSchedulerWait* iLoop; |
|
135 |
|
136 }; |
|
137 |
|
138 |
|
139 #endif // C_CHSPSINSTALLER_H |
|
140 |
|
141 // End of File |