1 /* |
|
2 * Copyright (c) 2005 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: Synchronisation server alert and application launcher notifier. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSYNCMLFWUPDNOTIFIER_H |
|
21 #define CSYNCMLFWUPDNOTIFIER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <SyncMLNotifierParams.h> |
|
25 #include "SyncMLNotifierBase.h" // Base class |
|
26 #include "SyncMLMessageQueryDialog.h" |
|
27 #include <SyncService.h> |
|
28 |
|
29 // CONSTANTS |
|
30 // Taken from S60\OmaDSAppUi\inc\NSmlDMSyncPrivateCRKeys.h |
|
31 const TUid KCRUidNSmlDMSyncApp = {0x101f6de5}; |
|
32 const TUint32 KNSmlDMFotaConfigurationKey = 0x00000001; |
|
33 const TUint KNSmlDMFotaEnableFotaViewFlag = 0x0004; |
|
34 |
|
35 //Constants required to indicate key presses in dialogs |
|
36 enum |
|
37 { |
|
38 ESyncMLDlgRespKeyNone = -3, |
|
39 ESyncMLDlgRespKeyOk = -2, |
|
40 ESyncMLDlgRespKeyOthers = -1, |
|
41 ESyncMLDlgRespKeyCancel = 0 |
|
42 }; |
|
43 |
|
44 |
|
45 //Constants used when update happen NSC/DM |
|
46 enum { |
|
47 EFotaUpdateNSC=1, |
|
48 EFotaUpdateNSCBg, |
|
49 EFotaUpdateDM |
|
50 }; |
|
51 |
|
52 // CLASS DECLARATION |
|
53 /** |
|
54 * Notifier for showing the rsult of the firmware |
|
55 * update to the user. |
|
56 * |
|
57 * @lib SyncMLNotifier |
|
58 * @since Series 60 3.1 |
|
59 */ |
|
60 NONSHARABLE_CLASS( CSyncMLFwUpdNotifier ) : public CSyncMLNotifierBase |
|
61 { |
|
62 public: // Constructors and destructor |
|
63 |
|
64 /** |
|
65 * Two-phased constructor. |
|
66 */ |
|
67 static CSyncMLFwUpdNotifier* NewL(); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 virtual ~CSyncMLFwUpdNotifier(); |
|
73 |
|
74 private: // New functions |
|
75 |
|
76 /** |
|
77 * Shows a note describing the error situation that has been encountered |
|
78 * when checking the prerequisites for firmware update. |
|
79 * @param None |
|
80 * @return Result to the query |
|
81 */ |
|
82 TInt ShowUpdateErrorNoteL(); |
|
83 |
|
84 /** |
|
85 * Shows a note describing the result of firmware update. |
|
86 * @param None |
|
87 * @return Result to the query |
|
88 */ |
|
89 TInt ShowUpdateResultNoteL(); |
|
90 |
|
91 /** |
|
92 * Informs the user about the firmware update and its consequences. |
|
93 * Queries if the user wants to continue with the update. |
|
94 * @param None |
|
95 * @return Result to the query |
|
96 */ |
|
97 TInt ShowUpdateStartQueryL(); |
|
98 |
|
99 /** |
|
100 * Informs the user about the firmware update while encrypted phone memory. |
|
101 * Queries if the user wants to continue with the update. |
|
102 * @param None |
|
103 * @return Result to the query |
|
104 */ |
|
105 TInt ShowUpdateStartQueryEncryptionL(); |
|
106 |
|
107 /** |
|
108 * Shows a note describing the result of firmware update. Also queries |
|
109 * user to encrypt memory |
|
110 * @param None |
|
111 * @return Result to the query |
|
112 */ |
|
113 TInt ShowUpdateResultWithEncryptionNoteL(); |
|
114 |
|
115 /** |
|
116 * Retrieves the profile name using the profile identifier stored |
|
117 * in iNoteInfo. |
|
118 * @param aServerName Returns the clear-text name of the corresponding server. |
|
119 * @return None |
|
120 */ |
|
121 void RetrieveProfileNameL( TDes& aServerName ); |
|
122 /*Information note shown to the user after selecting No reminder case in |
|
123 * the reminder dialog. This note informs the user that downloaded package |
|
124 * can be installed manually. |
|
125 */ |
|
126 |
|
127 TInt ShowNoReminderQueryL(); |
|
128 |
|
129 /*Message query note shown to the user when ever there is no enough memory |
|
130 * space to download the update package |
|
131 */ |
|
132 TInt ShowNotEnoughMemoryL( TInt &aMemoryNeeded ,TBool aOmaDL ); |
|
133 |
|
134 /*Message query note shown to the user when ever the user cancels the download |
|
135 * and whether the user wants to resume the download at a later point of time. |
|
136 * @param None |
|
137 * @return Result to the query |
|
138 */ |
|
139 TInt ShowDownloadUserCancelL(); |
|
140 |
|
141 /*Message note shown to the user when ever |
|
142 * the user postponds the download |
|
143 * @param None |
|
144 * @return Result to the query |
|
145 */ |
|
146 TInt ShowDownloadPostponedL(); |
|
147 |
|
148 /*Message note shown to the user when ever |
|
149 * the user cancels the download |
|
150 * @param None |
|
151 * @return Result to the query |
|
152 */ |
|
153 TInt ShowDownloadCancelledL(); |
|
154 |
|
155 /*Message note shown to the user when ever |
|
156 * the user wants to resume the download. |
|
157 * @param None |
|
158 * @return Result to the query |
|
159 */ |
|
160 TInt ShowDownloadResumeL(); |
|
161 private: // Functions from base classes |
|
162 |
|
163 /** |
|
164 * From CSyncMLNotifierBase Called when a notifier is first loaded. |
|
165 * @param None. |
|
166 * @return A structure containing priority and channel info. |
|
167 */ |
|
168 TNotifierInfo RegisterL(); |
|
169 |
|
170 /** |
|
171 * From CSyncMLNotifierBase The notifier has been deactivated |
|
172 * so resources can be freed and outstanding messages completed. |
|
173 * @param None. |
|
174 * @return None. |
|
175 */ |
|
176 void Cancel(); |
|
177 |
|
178 /** |
|
179 * From CSyncMLNotifierBase Gets called when a request completes. |
|
180 * @param None. |
|
181 * @return None. |
|
182 */ |
|
183 void RunL(); |
|
184 |
|
185 /** |
|
186 * From CSyncMLNotifierBase Used in asynchronous notifier launch to |
|
187 * store received parameters into members variables and |
|
188 * make needed initializations. |
|
189 * @param aBuffer A buffer containing received parameters |
|
190 * @param aReturnVal The return value to be passed back. |
|
191 * @param aMessage Should be completed when the notifier is deactivated. |
|
192 * @return None. |
|
193 */ |
|
194 void GetParamsL( const TDesC8& aBuffer, |
|
195 TInt aReplySlot, |
|
196 const RMessagePtr2& aMessage ); |
|
197 /** |
|
198 * IsLanguageSupported |
|
199 * @param ret |
|
200 * @return True if the language is supported. |
|
201 */ |
|
202 TBool IsLanguageSupportedL(); |
|
203 private: |
|
204 |
|
205 /** |
|
206 * C++ default constructor. |
|
207 */ |
|
208 CSyncMLFwUpdNotifier(); |
|
209 |
|
210 private: // Data |
|
211 // Type of note to be shown |
|
212 TSyncMLFwUpdNoteTypes iNoteType; |
|
213 |
|
214 // Possible additional information required by the note |
|
215 TInt iNoteInfo; |
|
216 |
|
217 //Memory needed for the for the fota update package to be downloaded |
|
218 // #ifdef RD_FOTA_FLEXIBLE_MEMORY_USAGE |
|
219 TInt iFotaMemoryNeeded; |
|
220 // #endif |
|
221 //Checks whether dialog from RUNL popped and waiting for user input |
|
222 TBool iRunLhang; |
|
223 |
|
224 //Reference to the Dialog launched from RunL |
|
225 CSyncMLMessageQueryDialog* iDlg; |
|
226 |
|
227 //To decide on encryption note or default note. |
|
228 TBool iFotaEncryptReq; |
|
229 |
|
230 }; |
|
231 |
|
232 |
|
233 #endif // CSYNCMLFWUPDNOTIFIER_H |
|
234 |
|
235 // End of File |
|