--- a/userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.h Fri Apr 16 16:24:37 2010 +0300
+++ b/userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.h Fri Apr 23 21:54:44 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Eclipse Public License v1.0"
@@ -26,21 +26,20 @@
class TMsDataMemMap
{
public:
- static const TInt KSectorSize = 0x200; // 512
- static const TInt KFormatSectorShift = 9;
TMsDataMemMap();
void Reset();
- void InitDataArea(TUint32 aFirstDataSector, TUint32 aNumSectors);
+ void InitDataArea(TUint32 aFirstDataSector, TUint32 aNumSectors, TUint32 aSectorSize);
void InitDataArea(TUint64 aSize);
- TInt BlockLength() const;
+ TUint32 BlockLength() const;
TUint64 DataSize() const;
TInt64 GetDataPos(TInt64 aPos) const;
TInt TranslateDataPos(TInt64& aPos, TInt& aLength) const;
TInt CheckBlockInRange(TInt64& aPos, TInt aLength) const;
+ TInt FormatSectorShift() const;
private:
// Whole media
@@ -50,6 +49,12 @@
// Data Area
// Offset
TInt64 iDataOffset;
+
+ // Sector Size (Media Block Size)
+ TUint32 iSectorSize;
+
+ // Sector-size dependant
+ TInt iFormatSectorShift;
};
#include "tmsmemmap.inl"