author | Santosh V Patil <santosh.v.patil@nokia.com> |
Fri, 19 Feb 2010 15:03:34 +0530 | |
branch | ADM |
changeset 14 | 343c622c9f65 |
permissions | -rw-r--r-- |
14
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
1 |
/* |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
8 |
* |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
11 |
* |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
13 |
* |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
15 |
* CInstallObserver class implementation. |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
16 |
* |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
17 |
* |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
18 |
*/ |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
19 |
|
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
20 |
|
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
21 |
#include <e32base.h> |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
22 |
#include <swinstdefs.h> |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
23 |
#include "bootstrapinstallationobserver.h" |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
24 |
#include "bootstrapappui.h" |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
25 |
|
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
26 |
CInstallObserver::CInstallObserver(CBootstrapAppUi* aBsAppUiObj) : |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
27 |
CActive(CActive::EPriorityStandard), |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
28 |
iBsAppUiObj(aBsAppUiObj) |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
29 |
{ |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
30 |
CActiveScheduler::Add(this); |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
31 |
} |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
32 |
|
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
33 |
CInstallObserver::~CInstallObserver() |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
34 |
{ |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
35 |
Cancel(); |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
36 |
} |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
37 |
|
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
38 |
void CInstallObserver::RunL() |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
39 |
{ |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
40 |
// Invoke the handler function installation complete, |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
41 |
// passing the status |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
42 |
iBsAppUiObj->HandleInstallCompleteL(iStatus.Int()); |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
43 |
} |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
44 |
|
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
45 |
TInt CInstallObserver::RunError(TInt aError) |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
46 |
{ |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
47 |
// TODO: HACK! We just ignore the RunError. |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
48 |
// This will get called when ADM is downloaded/installed and |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
49 |
// when bootstrap tries to exit, we get run error -1003. |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
50 |
// RDebug::Print(_L("BOOTSTRAP: CInstallObserver::RunError(%d)"), aError); |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
51 |
/* |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
52 |
iBsAppUiObj->ExitWithError(R_INSTALLATION_FAILURE_ERR); |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
53 |
*/ |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
54 |
return KErrNone; |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
55 |
} |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
56 |
|
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
57 |
void CInstallObserver::DoCancel() |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
58 |
{ |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
59 |
} |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
60 |
|
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
61 |
void CInstallObserver::Start() |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
62 |
{ |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
63 |
SetActive(); |
343c622c9f65
Contribution of bootstrap component of the Nokia Smart Installer (beta)
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff
changeset
|
64 |
} |