|
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 public: // Functions from base classes |
|
72 |
|
73 /** |
|
74 * RunL. |
|
75 * From CActive, callback function. |
|
76 * Invoked to handle responses from the server. |
|
77 * @since S60 5.0 |
|
78 */ |
|
79 void RunL(); |
|
80 |
|
81 /** |
|
82 * DoCancel. |
|
83 * From CActive, cancels any outstanding operation. |
|
84 * @since S60 5.0 |
|
85 */ |
|
86 void DoCancel(); |
|
87 |
|
88 /** |
|
89 * RunError. |
|
90 * From CActive Called when asynchronous request has failed |
|
91 * @since S60 5.0 |
|
92 */ |
|
93 TInt RunError( |
|
94 TInt aError ); |
|
95 |
|
96 private: |
|
97 |
|
98 /** |
|
99 * CHSPSInstaller. |
|
100 * Performs the first phase of two phase construction. |
|
101 * @since S60 5.0 |
|
102 * @param aServer is a reference to the HSPS Theme Server |
|
103 */ |
|
104 CHSPSInstaller( |
|
105 ChspsThemeServer& aServer ); |
|
106 |
|
107 /** |
|
108 * ConstructL. |
|
109 * Performs the second phase construction of a CHSPSInstaller object. |
|
110 * @since S60 5.0 |
|
111 */ |
|
112 void ConstructL(); |
|
113 |
|
114 private: // Data |
|
115 |
|
116 // Reference to HSPS Theme Server |
|
117 ChspsThemeServer& iServer; |
|
118 |
|
119 // Installation handler |
|
120 ChspsInstallationHandler* iInstallationHandler; |
|
121 |
|
122 // Installation status |
|
123 ThspsServiceCompletedMessage iRet; |
|
124 |
|
125 // Required by the installation process |
|
126 TBuf8<KMaxHeaderDataLength8> iHeaderData; |
|
127 |
|
128 // Active scheduler nested wait loop |
|
129 CActiveSchedulerWait* iLoop; |
|
130 |
|
131 }; |
|
132 |
|
133 |
|
134 #endif // C_CHSPSINSTALLER_H |
|
135 |
|
136 // End of File |