sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef TMSMEMMAP_H sl@0: #define TMSMEMMAP_H sl@0: sl@0: sl@0: sl@0: class TMsDataMemMap sl@0: { sl@0: public: sl@0: static const TInt KSectorSize = 0x200; // 512 sl@0: static const TInt KFormatSectorShift = 9; sl@0: sl@0: TMsDataMemMap(); sl@0: void Reset(); sl@0: sl@0: void InitDataArea(TUint32 aFirstDataSector, TUint32 aNumSectors); sl@0: void InitDataArea(TUint64 aSize); sl@0: sl@0: TInt BlockLength() const; sl@0: TUint64 DataSize() const; sl@0: sl@0: TInt64 GetDataPos(TInt64 aPos) const; sl@0: TInt TranslateDataPos(TInt64& aPos, TInt& aLength) const; sl@0: TInt CheckBlockInRange(TInt64& aPos, TInt aLength) const; sl@0: sl@0: private: sl@0: // Whole media sl@0: // Size sl@0: TUint64 iSize; sl@0: sl@0: // Data Area sl@0: // Offset sl@0: TInt64 iDataOffset; sl@0: }; sl@0: sl@0: #include "tmsmemmap.inl" sl@0: sl@0: #endif // TMSMEMMAP_H