smartinstaller/bootstrap/src/bootstrapinstallationobserver.cpp
branchADM
changeset 48 364021cecc90
equal deleted inserted replaced
47:3f419852be07 48:364021cecc90
       
     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 "bootstrapstatemachine.h"
       
    25 
       
    26 CInstallObserver::CInstallObserver(CStateMachine* aStateMachineObj) :
       
    27 	CActive(CActive::EPriorityStandard),
       
    28 	iStateMachineObj(aStateMachineObj)
       
    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 	iStateMachineObj->HandleInstallCompleteL(iStatus.Int());
       
    43 	}
       
    44 
       
    45 TInt CInstallObserver::RunError(TInt aError)
       
    46 	{
       
    47 	iStateMachineObj->HandleFailure(aError);
       
    48 	return KErrNone;
       
    49 	}
       
    50 
       
    51 void CInstallObserver::DoCancel()
       
    52 	{
       
    53 	}
       
    54 
       
    55 void CInstallObserver::Start()
       
    56 	{
       
    57 	SetActive();
       
    58 	}