diff -r 000000000000 -r d0791faffa3f backupandrestore/backupengine/inc/sbedataownermanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/backupandrestore/backupengine/inc/sbedataownermanager.h Tue Feb 02 01:11:40 2010 +0200 @@ -0,0 +1,255 @@ +/** +* Copyright (c) 2005-2009 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: +* Declaration of CDataOwnerManager +* +* +*/ + + + +/** + @file +*/ +#ifndef __DATAOWNERMANAGER_H__ +#define __DATAOWNERMANAGER_H__ + +// System +#include +#include +#include +#include +#include +#include + +#include "sbeconfig.h" +#include "sbeparserproxy.h" +#include + + +// Forwards +class CBaBackupSessionWrapper; +class CARC4; + + + +namespace conn + { + // Forwards + class CDataOwner; + class CABServer; + class CBufferFileReader; + class CPackageDataTransfer; + class CDataOwnerManager; + class CJavaDataOwnerManager; + class CSecureBUREncryptKeySource; + class CSBEDecompressAndEncrypt; + + /** The current request state + @internalComponent + */ + enum TState + { + ENone, /*& aDataOwners); + void GetExpectedDataSizeL(CSBGenericTransferType* aGenericTransferType, TUint& aSize); + void GetPublicFileListL(CSBGenericDataType* aGenericDataType, TDriveNumber aDriveNumber, RFileArray& aFiles); + void GetRawPublicFileListL(CSBGenericDataType* aGenericDataType, TDriveNumber aDriveNumber, + RRestoreFileFilterArray& aRestoreFileFilter); + void GetXMLPublicFileListL(TSecureId aSID, TDriveNumber aDriveNumber, HBufC*& aBuffer); + + void SetSIDListForPartialBURL(TDesC8& aFlatArrayPtr); + void SIDStatusL(RSIDStatusArray& aSIDStatus); + void AllSnapshotsSuppliedL(); + void GetNextPublicFileL(CSBGenericDataType* aGenericDataType, TBool aReset, + TDriveNumber aDriveNumber, TEntry& aEntry); + + // Global heap + void SupplyDataL(CSBGenericTransferType* aGenericTransferType, TDesC8& aBuffer, + TBool aLastSection); + void RequestDataL(CSBGenericTransferType* aGenericTransferType, + TPtr8& aBuffer, TBool& aLastSection); + + // Accessors + void SetActiveBackupServer(CABServer* aABServer); + RFs& GetRFs(); + CABServer& ABServer(); + CDataOwner& DataOwnerL(TSecureId aSID); + + TDriveList& DriveList(); + TBURPartType BURType() const; + TBackupIncType IncType() const; + void AllSystemFilesRestoredL(); + + CSBEConfig& Config(); + inline CSBEParserProxy& ParserProxy(); + TBool IsSetForPartialL(TSecureId aSecureId) const; + + private: + // Constructor + void ConstructL(); + CDataOwnerManager(); + + // Methods + void FindDataOwnersL(); + CDataOwnerContainer* FindL(TSecureId aSID); + CPackageDataTransfer* FindPackageDataContainerL(TUid pid); + void StripSecureIdL(const TDesC& aStrip, TSecureId& aSecureId); + void UpdateDataOwnersPartialStateL(); + void FindImportPackagesL(Swi::RSisRegistrySession& aRegistry, RPointerArray& aDataOwners); + void FindRegistrationFilesL(const TDesC& aPath, CDesCArray& aFiles); + private: + RPointerArray iDataOwners; /* iPackageDataOwners; /* needed for active clients) + TDriveList iDriveList; /*