equal
deleted
inserted
replaced
|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef TMSMEMMAP_H |
|
22 #define TMSMEMMAP_H |
|
23 |
|
24 |
|
25 |
|
26 class TMsDataMemMap |
|
27 { |
|
28 public: |
|
29 static const TInt KSectorSize = 0x200; // 512 |
|
30 static const TInt KFormatSectorShift = 9; |
|
31 |
|
32 TMsDataMemMap(); |
|
33 void Reset(); |
|
34 |
|
35 void InitDataArea(TUint32 aFirstDataSector, TUint32 aNumSectors); |
|
36 void InitDataArea(TUint64 aSize); |
|
37 |
|
38 TInt BlockLength() const; |
|
39 TUint64 DataSize() const; |
|
40 |
|
41 TInt64 GetDataPos(TInt64 aPos) const; |
|
42 TInt TranslateDataPos(TInt64& aPos, TInt& aLength) const; |
|
43 TInt CheckBlockInRange(TInt64& aPos, TInt aLength) const; |
|
44 |
|
45 private: |
|
46 // Whole media |
|
47 // Size |
|
48 TUint64 iSize; |
|
49 |
|
50 // Data Area |
|
51 // Offset |
|
52 TInt64 iDataOffset; |
|
53 }; |
|
54 |
|
55 #include "tmsmemmap.inl" |
|
56 |
|
57 #endif // TMSMEMMAP_H |