smartinstaller/adm/src/ADMGlobalProgressDialogHandler.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 *     CGlobalProgressDialogHandler implementation
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #include <avkon.hrh>
       
    22 #include "ADMGlobalProgressDialogHandler.h"
       
    23 
       
    24 CGlobalProgressDialogHandler::~CGlobalProgressDialogHandler()
       
    25 	{
       
    26 	Cancel();
       
    27 	}
       
    28 
       
    29 void CGlobalProgressDialogHandler::ConstructL()
       
    30 	{
       
    31 	CActiveScheduler::Add(this);
       
    32 	}
       
    33 
       
    34 CGlobalProgressDialogHandler* CGlobalProgressDialogHandler::NewLC(MGlobalProgressDialogObserver& aObserver)
       
    35 	{
       
    36 	CGlobalProgressDialogHandler* self = new (ELeave) CGlobalProgressDialogHandler(aObserver);
       
    37 	CleanupStack::PushL(self);
       
    38 	self->ConstructL();
       
    39 	return self;
       
    40 	}
       
    41 
       
    42 CGlobalProgressDialogHandler* CGlobalProgressDialogHandler::NewL(MGlobalProgressDialogObserver& aObserver)
       
    43 	{
       
    44 	CGlobalProgressDialogHandler* self = CGlobalProgressDialogHandler::NewLC(aObserver);
       
    45 	CleanupStack::Pop(self);
       
    46 	return self;
       
    47 	}
       
    48 
       
    49 void CGlobalProgressDialogHandler::DoCancel()
       
    50 	{
       
    51 	// Nothing to be done here
       
    52 	}
       
    53 
       
    54 void CGlobalProgressDialogHandler::StartHandler()
       
    55 	{
       
    56 	SetActive();
       
    57 	}
       
    58 
       
    59 void CGlobalProgressDialogHandler::RunL()
       
    60 	{
       
    61 	if(iStatus == EAknSoftkeyCancel)
       
    62 		{
       
    63 		iObserver.ProcessCancelOptionL();
       
    64 		}
       
    65 	else if(iStatus == EAknSoftkeyDone)
       
    66 		{
       
    67 		iObserver.ProcessDoneOptionL();
       
    68 		}
       
    69 	else
       
    70 		{
       
    71 		}
       
    72 	Cancel();
       
    73 	}
       
    74 //EOF