equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 #include <e32base.h> |
19 #include <iaupdate.rsg> |
|
20 #include <StringLoader.h> |
|
21 #include <aknmessagequerydialog.h> |
|
22 #include <aknnotewrappers.h> |
|
23 #include <DevManInternalCRKeys.h> |
19 #include <DevManInternalCRKeys.h> |
|
20 #include <centralrepository.h> |
24 #include <e32property.h> |
21 #include <e32property.h> |
25 |
22 |
26 #include "iaupdatefwupdatehandler.h" |
23 #include "iaupdatefwupdatehandler.h" |
27 #include "iaupdatefwfotamodel.h" |
24 #include "iaupdatefwfotamodel.h" |
28 #include "iaupdatefwsyncprofile.h" |
25 #include "iaupdatefwsyncprofile.h" |
137 { |
134 { |
138 switch ( iRequest ) |
135 switch ( iRequest ) |
139 { |
136 { |
140 case ENSU: |
137 case ENSU: |
141 { |
138 { |
142 HBufC* text1 = StringLoader::LoadLC( R_IAUPDATE_INFO_NSU_1 ); |
139 |
143 HBufC* text2 = StringLoader::LoadLC( R_IAUPDATE_INFO_NSU_2 ); |
|
144 |
|
145 HBufC* text = HBufC::NewLC( text1->Length() + |
|
146 text2->Length() ); |
|
147 |
|
148 text->Des() += *text1; |
|
149 text->Des() += *text2; |
|
150 |
|
151 HBufC* heading = StringLoader::LoadLC( R_IAUPDATE_NEW_SW_TITLE ); |
|
152 |
|
153 ShowDialogL( *text, *heading ); |
|
154 |
|
155 CleanupStack::PopAndDestroy( heading ); //text, heading |
|
156 CleanupStack::PopAndDestroy( text ); |
|
157 CleanupStack::PopAndDestroy( text2 ); |
|
158 CleanupStack::PopAndDestroy( text1 ); |
|
159 |
|
160 break; |
140 break; |
161 } |
141 } |
162 case EFOTA: |
142 case EFOTA: |
163 { |
143 { |
164 //check whether FOTA engine is available at the moment |
144 //check whether FOTA engine is available at the moment |
173 //if status is downloadcomplete or startingupdate |
153 //if status is downloadcomplete or startingupdate |
174 //still allow user to continue |
154 //still allow user to continue |
175 if ( ( fotamodelstate != RFotaEngineSession::EDownloadComplete ) && ( fotamodelstate != RFotaEngineSession::EStartingUpdate ) ) |
155 if ( ( fotamodelstate != RFotaEngineSession::EDownloadComplete ) && ( fotamodelstate != RFotaEngineSession::EStartingUpdate ) ) |
176 { |
156 { |
177 //if download is suspended, try to resume it. |
157 //if download is suspended, try to resume it. |
178 if ( fotamodelstate == RFotaEngineSession::EDownloadProgressingWithResume) |
158 if ( fotamodelstate == RFotaEngineSession::EDownloadProgressing) |
179 { |
159 { |
180 TInt result = iFotaModel->TryResumeFwUpdDownload(); |
160 TInt result = iFotaModel->TryResumeFwUpdDownload(); |
181 FLOG_NUM( "[IAUPDATEFW] TryResumeFwUpdDownload result = %d", result ); |
161 FLOG_NUM( "[IAUPDATEFW] TryResumeFwUpdDownload result = %d", result ); |
182 } |
162 } |
183 //anyway, DM is in use |
163 //anyway, DM is in use |
228 |
208 |
229 // ----------------------------------------------------------------------------- |
209 // ----------------------------------------------------------------------------- |
230 // CIAUpdateFWUpdateHandler::ShowDialogL() |
210 // CIAUpdateFWUpdateHandler::ShowDialogL() |
231 // ----------------------------------------------------------------------------- |
211 // ----------------------------------------------------------------------------- |
232 // |
212 // |
233 void CIAUpdateFWUpdateHandler::ShowDialogL(TDesC& aText, TDesC& aHeading ) |
213 void CIAUpdateFWUpdateHandler::ShowDialogL(TDesC& /*aText*/, TDesC& /*aHeading*/ ) |
234 { |
214 { |
235 CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( aText ); |
215 |
236 |
|
237 dlg->PrepareLC( R_IAUPDATE_MESSAGE_QUERY ); |
|
238 |
|
239 CAknPopupHeadingPane* headingPane = dlg->Heading(); |
|
240 headingPane->SetTextL( aHeading ); |
|
241 |
|
242 TInt ret = dlg->RunLD(); |
|
243 } |
216 } |
244 |
217 |
245 |
218 |
246 // ----------------------------------------------------------------------------- |
219 // ----------------------------------------------------------------------------- |
247 // CIAUpdateFWUpdateHandler::StartSyncL() |
220 // CIAUpdateFWUpdateHandler::StartSyncL() |
283 aUseFotaProgressNote ) ); |
256 aUseFotaProgressNote ) ); |
284 |
257 |
285 if (error != KErrNone) |
258 if (error != KErrNone) |
286 { |
259 { |
287 |
260 |
288 CAknInformationNote* queryDialog = new (ELeave) CAknInformationNote; |
261 //CAknInformationNote* queryDialog = new (ELeave) CAknInformationNote; |
289 |
262 |
290 HBufC* error = HBufC::NewL(20); |
263 //HBufC* error = HBufC::NewL(20); |
291 TPtr ptrerror = error->Des(); |
264 // TPtr ptrerror = error->Des(); |
292 ptrerror.Copy(_L("sync problem")); |
265 // ptrerror.Copy(_L("sync problem")); |
293 queryDialog->ExecuteLD( *error ); |
266 //queryDialog->ExecuteLD( *error ); |
294 } |
267 } |
295 } |
268 } |
296 |
269 |
297 //EOF |
270 //EOF |
298 |
271 |