smartinstaller/bootstrap/src/bootstrapglobalwaitnoteobserver.cpp
author Santosh V Patil <santosh.v.patil@nokia.com>
Wed, 30 Jun 2010 11:01:26 +0530
branchADM
changeset 48 364021cecc90
permissions -rw-r--r--
SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     1
/*
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     8
*
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    11
*
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    12
* Contributors:
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    13
*
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    14
* Description:
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    15
*     CGlobalWaitNoteObserver class implementation.
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    16
*
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    17
*
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    18
*/
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    19
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    20
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    21
#include "bootstrapglobalwaitnoteobserver.h"
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    22
#include "bootstrapappui.h"
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    23
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    24
CGlobalWaitNoteObserver::CGlobalWaitNoteObserver(CBootstrapAppUi* aBsAppUiObj) :
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    25
	CActive(CActive::EPriorityStandard),
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    26
	iBsAppUiObj(aBsAppUiObj)
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    27
	{
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    28
	CActiveScheduler::Add(this);
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    29
	}
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    30
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    31
CGlobalWaitNoteObserver::~CGlobalWaitNoteObserver()
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    32
	{
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    33
	Cancel();
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    34
	}
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    35
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    36
void CGlobalWaitNoteObserver::RunL()
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    37
	{
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    38
	// Invoke the handler function for cancel
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    39
	iBsAppUiObj->HandleGlobalWaitNoteCancel(iStatus.Int());
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    40
	}
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    41
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    42
TInt CGlobalWaitNoteObserver::RunError(TInt aError)
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    43
	{
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    44
	return KErrNone;
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    45
	}
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    46
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    47
void CGlobalWaitNoteObserver::DoCancel()
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    48
	{
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    49
	}
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    50
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    51
void CGlobalWaitNoteObserver::Start()
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    52
	{
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    53
	SetActive();
364021cecc90 SmartInstaller contribution based on the Nokia Qt SDK 1.0 release
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    54
	}