diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/src/appmngr2testcommand.cpp --- a/appinstall_plat/appmngr2runtimeapi/tsrc/src/appmngr2testcommand.cpp Thu Oct 14 14:11:30 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Async command handling for AppMngr2 Runtime API STIF tests -* -*/ - - -#include "appmngr2testcommand.h" // CAppMngr2TestCommand -#include "appmngr2testcommandobserver.h" // MAppMngr2TestCommandObserver -#include // CAppMngr2InfoBase - - -// ======== MEMBER FUNCTIONS ======== - -// ----------------------------------------------------------------------------- -// CAppMngr2TestCommand::NewL() -// ----------------------------------------------------------------------------- -// -CAppMngr2TestCommand* CAppMngr2TestCommand::NewL( CAppMngr2InfoBase& aInfo, - MAppMngr2TestCommandObserver& aObs ) - { - CAppMngr2TestCommand* self = new (ELeave) CAppMngr2TestCommand( aInfo, aObs ); - return self; - } - -// ----------------------------------------------------------------------------- -// CAppMngr2TestCommand::~CAppMngr2TestCommand() -// ----------------------------------------------------------------------------- -// -CAppMngr2TestCommand::~CAppMngr2TestCommand() - { - Cancel(); - } - -// ----------------------------------------------------------------------------- -// CAppMngr2TestCommand::DoCancel() -// ----------------------------------------------------------------------------- -// -void CAppMngr2TestCommand::DoCancel() - { - iInfo.CancelCommand(); - } - -// ----------------------------------------------------------------------------- -// CAppMngr2TestCommand::RunL() -// ----------------------------------------------------------------------------- -// -void CAppMngr2TestCommand::RunL() - { - // no need to trap, as RunError calls CommandResult if RunL leaves - iInfo.HandleCommandResultL( iStatus.Int() ); - iObs.CommandResult( *this, iStatus.Int() ); - } - -// ----------------------------------------------------------------------------- -// CAppMngr2TestCommand::RunError() -// ----------------------------------------------------------------------------- -// -TInt CAppMngr2TestCommand::RunError( TInt aError ) - { - iObs.CommandResult( *this, aError ); - return aError; - } - -// ----------------------------------------------------------------------------- -// CAppMngr2TestCommand::HandleCommandL() -// ----------------------------------------------------------------------------- -// -void CAppMngr2TestCommand::HandleCommandL( TInt aCommand ) - { - if( IsActive() ) - { - User::Leave( KErrInUse ); - } - iInfo.HandleCommandL( aCommand, iStatus ); - SetActive(); - } - -// ----------------------------------------------------------------------------- -// CAppMngr2TestCommand::CAppMngr2TestOperation() -// ----------------------------------------------------------------------------- -// -CAppMngr2TestCommand::CAppMngr2TestCommand( CAppMngr2InfoBase& aInfo, - MAppMngr2TestCommandObserver& aObs ) : - CActive( CActive::EPriorityStandard ), iInfo( aInfo ), iObs( aObs ) - { - CActiveScheduler::Add( this ); - } -