|
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: Defination of class CHspsConfigurationService |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_HSPSCONFIGURATIONSERVICE_H |
|
20 #define C_HSPSCONFIGURATIONSERVICE_H |
|
21 |
|
22 |
|
23 // SYSTEM INCLUDES |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <hspsthememanagement.h> |
|
27 #include <hspsrequestclient.h> |
|
28 #include <hspsodt.h> |
|
29 #include <hspsdomlist.h> |
|
30 #include <hspsdomdocument.h> |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class ChspsDomNode; |
|
34 class ChspsLogBus; |
|
35 class CHspsReqNotifCallback; |
|
36 |
|
37 class ChspsRequestNotificationParams; |
|
38 |
|
39 /** |
|
40 * @ingroup group_hsps_sapi |
|
41 * This class provides HSPS configuration services. |
|
42 * |
|
43 * @since S60 5.0 |
|
44 */ |
|
45 class CHspsConfigurationService : public CBase, public MhspsClientRequestServiceObserver |
|
46 { |
|
47 |
|
48 public: |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 * |
|
53 * @since S60 5.0 |
|
54 */ |
|
55 IMPORT_C static CHspsConfigurationService* NewL(); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CHspsConfigurationService(); |
|
61 |
|
62 private: |
|
63 |
|
64 /** |
|
65 * Constructor |
|
66 */ |
|
67 CHspsConfigurationService(); |
|
68 |
|
69 /** |
|
70 * Symbian Constructor |
|
71 */ |
|
72 void ConstructL(); |
|
73 |
|
74 |
|
75 public: // From base class MXnClientRequestServiceObserver |
|
76 |
|
77 /** |
|
78 * Realisation of MXnClientRequestServiceObserver Interface |
|
79 * @see MXnClientRequestServiceObserver |
|
80 * @since S60 5.0 |
|
81 * @param aMessage contains a service completion message returned from |
|
82 * the XnClientRequestHandler to its observer. |
|
83 */ |
|
84 void HandlehspsRequestClientMessageL( ThspsServiceCompletedMessage aMessage, |
|
85 ChspsRequestNotificationParams& aParams); |
|
86 |
|
87 public: // New methods |
|
88 |
|
89 /** |
|
90 * Gets Dom document. |
|
91 * |
|
92 * @since S60 5.0 |
|
93 * @return Dom document. |
|
94 */ |
|
95 IMPORT_C ChspsDomDocument& GetDOML( ); |
|
96 |
|
97 /** |
|
98 * Returns application configuration ODT for the defined application. |
|
99 * |
|
100 * @since S60 5.0 |
|
101 * @param aAppUid Application identifier. |
|
102 */ |
|
103 IMPORT_C void GetODTL( const TInt aAppUid ); |
|
104 |
|
105 /** |
|
106 * Gets application UID of active configuration. |
|
107 * |
|
108 * @since S60 5.0 |
|
109 * @param aAppUid requested application UID. |
|
110 */ |
|
111 IMPORT_C void GetAppUidL( TInt& aAppUid ); |
|
112 |
|
113 /* |
|
114 * Register observer to get notification from the server. |
|
115 * |
|
116 * @since S60 5.0 |
|
117 * @param aCallBack Pointer to callback instance. |
|
118 */ |
|
119 IMPORT_C TInt RegisterObserverL(CHspsReqNotifCallback* aCallBack ); |
|
120 |
|
121 /* |
|
122 * UnRegister observer to get notification from the server. |
|
123 * |
|
124 * @since S60 5.0 |
|
125 */ |
|
126 IMPORT_C void UnRegisterObserverL( ); |
|
127 |
|
128 /* |
|
129 * Set log bus. Empty implementation in product builds. |
|
130 * |
|
131 * @since S60 5.0 |
|
132 * @param aLogBus Log bus to be set. |
|
133 */ |
|
134 IMPORT_C void SetLogBus( ChspsLogBus* aLogBus ); |
|
135 |
|
136 /* |
|
137 * Invalidate stored(cached) ODT. |
|
138 * |
|
139 * If stored(cached) ODT is invalidate |
|
140 * then stored(cached) ODT will be refreshed |
|
141 * during next call to GetDOML. |
|
142 * |
|
143 * This method was implemented due to |
|
144 * performance improvements. |
|
145 * |
|
146 * @since S60 5.0 |
|
147 */ |
|
148 IMPORT_C void InvalidateODT(); |
|
149 |
|
150 /** |
|
151 * Gets active application configuration family |
|
152 * |
|
153 * @since S60 5.0 |
|
154 * @param aFamily requested application configuration family |
|
155 */ |
|
156 IMPORT_C void GetFamilyL( TUint32& aFamily ); |
|
157 |
|
158 private: // Methods |
|
159 |
|
160 TInt ParseNotificationDataL(ChspsRequestNotificationParams& aParams); |
|
161 |
|
162 |
|
163 |
|
164 private: // Data |
|
165 |
|
166 /** |
|
167 * Client-side implementation of MXnMaintenanceService API-definition. |
|
168 */ |
|
169 ChspsRequestClient* iHspsRequestClient; |
|
170 |
|
171 /** |
|
172 * ODT |
|
173 */ |
|
174 ChspsODT* iHspsODT; |
|
175 /** |
|
176 * CHspsReqNotifCallback |
|
177 */ |
|
178 CHspsReqNotifCallback* iCallback; |
|
179 /** |
|
180 * HSPS notification parameters |
|
181 */ |
|
182 ChspsRequestNotificationParams* iNotifyParams; |
|
183 /** |
|
184 * Notified PluginId array |
|
185 */ |
|
186 RArray<TInt> iPluginIds; |
|
187 #ifdef HSPS_LOG_ACTIVE |
|
188 /** |
|
189 * Log bus. not owned. |
|
190 */ |
|
191 ChspsLogBus* iLogBus; |
|
192 #endif |
|
193 /** |
|
194 * ETrue if iHspsODT is invalid. |
|
195 */ |
|
196 TBool iInvalidODT; |
|
197 }; |
|
198 |
|
199 |
|
200 #endif // C_HSPSCONFIGURATIONSERVICE_H |
|
201 |
|
202 // End of File. |