author | William Roberts <williamr@symbian.org> |
Tue, 06 Jul 2010 13:05:35 +0100 | |
branch | GCC_SURGE |
changeset 195 | 3411883d8fcf |
parent 109 | b3a1d9898418 |
permissions | -rw-r--r-- |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1 |
// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 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 |
||
30 |
TMsDataMemMap(); |
|
31 |
void Reset(); |
|
32 |
||
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
33 |
void InitDataArea(TUint32 aFirstDataSector, TUint32 aNumSectors, TUint32 aSectorSize); |
0 | 34 |
void InitDataArea(TUint64 aSize); |
35 |
||
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
36 |
TUint32 BlockLength() const; |
0 | 37 |
TUint64 DataSize() const; |
38 |
||
39 |
TInt64 GetDataPos(TInt64 aPos) const; |
|
40 |
TInt TranslateDataPos(TInt64& aPos, TInt& aLength) const; |
|
41 |
TInt CheckBlockInRange(TInt64& aPos, TInt aLength) const; |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
42 |
TInt FormatSectorShift() const; |
0 | 43 |
|
44 |
private: |
|
45 |
// Whole media |
|
46 |
// Size |
|
47 |
TUint64 iSize; |
|
48 |
||
49 |
// Data Area |
|
50 |
// Offset |
|
51 |
TInt64 iDataOffset; |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
52 |
|
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
53 |
// Sector Size (Media Block Size) |
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
54 |
TUint32 iSectorSize; |
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
55 |
|
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
56 |
// Sector-size dependant |
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
57 |
TInt iFormatSectorShift; |
0 | 58 |
}; |
59 |
||
60 |
#include "tmsmemmap.inl" |
|
61 |
||
62 |
#endif // TMSMEMMAP_H |