diff -r 491b3ed49290 -r 65326cf895ed filemanager/src/fmbkupengine/src/CMMCScBkupStateGetDataOwnerStatuses.cpp --- a/filemanager/src/fmbkupengine/src/CMMCScBkupStateGetDataOwnerStatuses.cpp Tue Aug 31 15:06:05 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -/* -* Copyright (c) 2005 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: CMMCScBkupStateGetDataOwnerStatuses implementation -* -* -*/ - -#include "CMMCScBkupStateGetDataOwnerStatuses.h" - -// System includes -#include - -// User includes -#include "MMCScBkupLogger.h" -#include "CMMCScBkupDataOwnerInfo.h" -#include "CMMCScBkupDataOwnerCollection.h" - - - - -// ========================= MEMBER FUNCTIONS ================================ - -// --------------------------------------------------------------------------- -// CMMCScBkupStateGetDataOwnerStatuses::CMMCScBkupStateGetDataOwnerStatuses() -// -// C++ constructor. -// --------------------------------------------------------------------------- -CMMCScBkupStateGetDataOwnerStatuses::CMMCScBkupStateGetDataOwnerStatuses( MMMCScBkupDriver& aDriver ) -: CMMCScBkupState( aDriver ) - { - __LOG1("CMMCScBkupStateGetDataOwnerStatuses::CMMCScBkupStateGetDataOwnerStatuses() - 0x%08x", StateId().iUid ); - } - - -// --------------------------------------------------------------------------- -// CMMCScBkupStateGetDataOwnerStatuses::~CMMCScBkupStateGetDataOwnerStatuses() -// -// Destructor. -// --------------------------------------------------------------------------- -CMMCScBkupStateGetDataOwnerStatuses::~CMMCScBkupStateGetDataOwnerStatuses() - { - Cancel(); - // - iStatusArray.Close(); - } - - -// --------------------------------------------------------------------------- -// CMMCScBkupStateGetDataOwnerStatuses::NewL() -// -// -// --------------------------------------------------------------------------- -CMMCScBkupStateGetDataOwnerStatuses* CMMCScBkupStateGetDataOwnerStatuses::NewL( MMMCScBkupDriver& aDriver ) - { - CMMCScBkupStateGetDataOwnerStatuses* self = new(ELeave) CMMCScBkupStateGetDataOwnerStatuses( aDriver ); - return self; - } - - -// --------------------------------------------------------------------------- -// CMMCScBkupStateGetDataOwnerStatuses::StateId() -// -// -// --------------------------------------------------------------------------- -TMMCScBkupStateId CMMCScBkupStateGetDataOwnerStatuses::StateId() const - { - return KMMCScBkupStateIdGetDataOwnerStatuses; - } - - -// --------------------------------------------------------------------------- -// CMMCScBkupStateGetDataOwnerStatuses::NextStateId() -// -// -// --------------------------------------------------------------------------- -TMMCScBkupStateId CMMCScBkupStateGetDataOwnerStatuses::NextStateId() const - { - return KMMCScBkupStateIdArchiveOpActiveData; - } - - -// --------------------------------------------------------------------------- -// CMMCScBkupStateGetDataOwnerStatuses::PerformStateInitL() -// -// -// --------------------------------------------------------------------------- -void CMMCScBkupStateGetDataOwnerStatuses::PerformStateInitL() - { - SetState( EPrearingQuery ); - CompleteSelf(); - } - - -// --------------------------------------------------------------------------- -// CMMCScBkupStateGetDataOwnerStatuses::PerformAsynchronousStateStepL() -// -// -// --------------------------------------------------------------------------- -void CMMCScBkupStateGetDataOwnerStatuses::PerformAsynchronousStateStepL() - { - switch( State() ) - { - case EPrearingQuery: - PrepareQueryL(); - break; - case EGettingStatus: - Driver().DrvSecureBackupClient().SIDStatusL( iStatusArray ); - SetState( EProcessingResults ); - CompleteSelf(); - break; - case EProcessingResults: - ProcessStatusResultsL(); - break; - default: - ASSERT( EFalse ); - } - } - - -// --------------------------------------------------------------------------- -// CMMCScBkupStateGetDataOwnerStatuses::PrepareQueryL() -// -// -// --------------------------------------------------------------------------- -void CMMCScBkupStateGetDataOwnerStatuses::PrepareQueryL() - { - const TDataOwnerStatus KMMCScBkupDefaultOwnerStatus = EUnset; - const TInt KMMCScBkupDefaultOwnerStatusError = 0; - - // Build an array of all of the active data owners that we require - // the statuses for. - CMMCScBkupDataOwnerCollection& ownerCollection = Driver().DrvDataOwners(); - const TInt count = ownerCollection.Count(); - for(TInt i=0; iSetStatus( ownerStatus.iStatus ); - } - } - } - -