userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.h
changeset 109 b3a1d9898418
parent 0 a41df078684a
--- a/userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.h	Mon May 03 13:47:38 2010 +0300
+++ b/userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.h	Fri May 14 17:13:29 2010 +0300
@@ -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"