|
1 /* |
|
2 * Copyright (c) 2009-2010 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: |
|
15 * CInstallObserver class implementation. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <swinstdefs.h> |
|
23 #include "bootstrapinstallationobserver.h" |
|
24 #include "bootstrapappui.h" |
|
25 |
|
26 CInstallObserver::CInstallObserver(CBootstrapAppUi* aBsAppUiObj) : |
|
27 CActive(CActive::EPriorityStandard), |
|
28 iBsAppUiObj(aBsAppUiObj) |
|
29 { |
|
30 CActiveScheduler::Add(this); |
|
31 } |
|
32 |
|
33 CInstallObserver::~CInstallObserver() |
|
34 { |
|
35 Cancel(); |
|
36 } |
|
37 |
|
38 void CInstallObserver::RunL() |
|
39 { |
|
40 // Invoke the handler function installation complete, |
|
41 // passing the status |
|
42 iBsAppUiObj->HandleInstallCompleteL(iStatus.Int()); |
|
43 } |
|
44 |
|
45 TInt CInstallObserver::RunError(TInt aError) |
|
46 { |
|
47 // TODO: HACK! We just ignore the RunError. |
|
48 // This will get called when ADM is downloaded/installed and |
|
49 // when bootstrap tries to exit, we get run error -1003. |
|
50 // RDebug::Print(_L("BOOTSTRAP: CInstallObserver::RunError(%d)"), aError); |
|
51 /* |
|
52 iBsAppUiObj->ExitWithError(R_INSTALLATION_FAILURE_ERR); |
|
53 */ |
|
54 return KErrNone; |
|
55 } |
|
56 |
|
57 void CInstallObserver::DoCancel() |
|
58 { |
|
59 } |
|
60 |
|
61 void CInstallObserver::Start() |
|
62 { |
|
63 SetActive(); |
|
64 } |