author | William Roberts <williamr@symbian.org> |
Mon, 04 Oct 2010 16:16:03 +0100 | |
changeset 282 | 664ff9a1a8fa |
parent 90 | 947f0dc9f7a8 |
permissions | -rw-r--r-- |
0 | 1 |
// Copyright (c) 1996-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 |
// f32\sfat32\inc\sl_bpb.inl |
|
15 |
// |
|
16 |
// |
|
17 |
||
18 |
#ifndef SL_BPB_INL |
|
19 |
#define SL_BPB_INL |
|
20 |
||
21 |
||
22 |
/** |
|
23 |
Defined cast of Fat directory entry data read to structure allowing |
|
24 |
access to data |
|
25 |
||
26 |
@internalTechnology |
|
27 |
*/ |
|
28 |
#define pDir ((SFatDirEntry*)&iData[0]) |
|
29 |
||
30 |
/** |
|
31 |
Returns Sectors in Fat table for 32 bit volume |
|
32 |
||
33 |
@return iFatSectors32 |
|
34 |
*/ |
|
35 |
inline TUint32 TFatBootSector::FatSectors32() const |
|
36 |
{return iFatSectors32;} |
|
37 |
/** |
|
38 |
Fat flags |
|
39 |
||
40 |
@return iFATFlags |
|
41 |
*/ |
|
42 |
inline TUint16 TFatBootSector::FATFlags() const |
|
43 |
{return iFATFlags;} |
|
44 |
/** |
|
45 |
Version number of the file system |
|
46 |
||
47 |
@return iVersionNumber |
|
48 |
*/ |
|
49 |
inline TUint16 TFatBootSector::VersionNumber() const |
|
50 |
{return iVersionNumber;} |
|
51 |
/** |
|
52 |
Cluster number of the root directory |
|
53 |
||
54 |
@return iRootClusterNum |
|
55 |
*/ |
|
56 |
inline TUint32 TFatBootSector::RootClusterNum() const |
|
57 |
{return iRootClusterNum;} |
|
58 |
/** |
|
59 |
Sector number containing the FSIInfo structure |
|
60 |
||
61 |
@return iFSInfoSectorNum |
|
62 |
*/ |
|
63 |
inline TUint16 TFatBootSector::FSInfoSectorNum() const |
|
64 |
{return iFSInfoSectorNum;} |
|
65 |
/** |
|
66 |
Backup boot sector |
|
67 |
||
68 |
@return iBkBootRecSector |
|
69 |
*/ |
|
70 |
inline TUint16 TFatBootSector::BkBootRecSector() const |
|
71 |
{return iBkBootRecSector;} |
|
72 |
/** |
|
73 |
Sets the number of sectors in Fat table for 32 bit volume |
|
74 |
||
75 |
@param aFatSectors32 |
|
76 |
*/ |
|
77 |
inline void TFatBootSector::SetFatSectors32(TUint32 aFatSectors32) |
|
78 |
{iFatSectors32 = aFatSectors32;} |
|
79 |
/** |
|
80 |
Sets the Fat flags |
|
81 |
||
82 |
@param aFATFlags |
|
83 |
*/ |
|
84 |
inline void TFatBootSector::SetFATFlags(TUint16 aFATFlags) |
|
85 |
{iFATFlags = aFATFlags;} |
|
86 |
/** |
|
87 |
Sets the version number of the file system |
|
88 |
||
89 |
@param aVersionNumber |
|
90 |
*/ |
|
91 |
inline void TFatBootSector::SetVersionNumber(TUint16 aVersionNumber) |
|
92 |
{iVersionNumber = aVersionNumber;} |
|
93 |
/** |
|
94 |
Sets the cluster number of the root directory |
|
95 |
||
96 |
@param aRootClusterNum |
|
97 |
*/ |
|
98 |
inline void TFatBootSector::SetRootClusterNum(TUint32 aRootClusterNum) |
|
99 |
{iRootClusterNum = aRootClusterNum;} |
|
100 |
/** |
|
101 |
Set the sector number containing the FSIInfo structure |
|
102 |
||
103 |
@param aFSInfoSectorNum |
|
104 |
*/ |
|
105 |
inline void TFatBootSector::SetFSInfoSectorNum(TUint16 aFSInfoSectorNum) |
|
106 |
{iFSInfoSectorNum = aFSInfoSectorNum;} |
|
107 |
/** |
|
108 |
Set the backup boot sector |
|
109 |
||
110 |
@param aBkBootRecSector |
|
111 |
*/ |
|
112 |
inline void TFatBootSector::SetBkBootRecSector(TUint16 aBkBootRecSector) |
|
113 |
{iBkBootRecSector = aBkBootRecSector;} |
|
114 |
||
115 |
/** |
|
116 |
Returns the vendor ID of the file system that formatted the volume |
|
117 |
||
118 |
@return A descriptor containing the vendor ID |
|
119 |
*/ |
|
120 |
inline const TPtrC8 TFatBootSector::VendorId() const |
|
121 |
{return TPtrC8(iVendorId,KVendorIdSize);} |
|
122 |
/** |
|
123 |
Return the bytes per sector |
|
124 |
||
125 |
@return iBytesPerSector |
|
126 |
*/ |
|
127 |
inline TUint16 TFatBootSector::BytesPerSector() const |
|
128 |
{return iBytesPerSector;} |
|
129 |
/** |
|
130 |
Returns the sectors per cluster ratio |
|
131 |
||
132 |
@return iSectorsPerCluster |
|
133 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
134 |
inline TUint8 TFatBootSector::SectorsPerCluster() const |
0 | 135 |
{return iSectorsPerCluster;} |
136 |
/** |
|
137 |
Returns the number of reserved sectors on the volume |
|
138 |
||
139 |
@return iReservedSectors |
|
140 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
141 |
inline TUint16 TFatBootSector::ReservedSectors() const |
0 | 142 |
{return iReservedSectors;} |
143 |
/** |
|
144 |
Returns the number of Fats on the volume |
|
145 |
||
146 |
@return iNumberOfFats |
|
147 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
148 |
inline TUint8 TFatBootSector::NumberOfFats() const |
0 | 149 |
{return iNumberOfFats;} |
150 |
/** |
|
151 |
Returns the number of entries allowed in the root directory, specific to Fat12/16, zero for FAT32 |
|
152 |
||
153 |
@return iRootDirEntries |
|
154 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
155 |
inline TUint16 TFatBootSector::RootDirEntries() const |
0 | 156 |
{return iRootDirEntries;} |
157 |
/** |
|
158 |
Returns the total sectors on the volume, zero for FAT32 |
|
159 |
||
160 |
@return iTotalSectors |
|
161 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
162 |
inline TUint16 TFatBootSector::TotalSectors() const |
0 | 163 |
{return iTotalSectors;} |
164 |
/** |
|
165 |
Returns the media descriptor |
|
166 |
||
167 |
@return iMediaDescriptor |
|
168 |
*/ |
|
169 |
inline TUint8 TFatBootSector::MediaDescriptor() const |
|
170 |
{return iMediaDescriptor;} |
|
171 |
/** |
|
172 |
Returns sectors used for the Fat table, zero for FAT32 |
|
173 |
||
174 |
@return iFatSectors |
|
175 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
176 |
inline TUint16 TFatBootSector::FatSectors() const |
0 | 177 |
{return iFatSectors;} |
178 |
/** |
|
179 |
Returns sectors per track |
|
180 |
||
181 |
@return iSectorsPerTrack |
|
182 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
183 |
inline TUint16 TFatBootSector::SectorsPerTrack() const |
0 | 184 |
{return iSectorsPerTrack;} |
185 |
/** |
|
186 |
Returns the number of heads |
|
187 |
||
188 |
@return iNumberOfHeads |
|
189 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
190 |
inline TUint16 TFatBootSector::NumberOfHeads() const |
0 | 191 |
{return iNumberOfHeads;} |
192 |
/** |
|
193 |
Returns the number of hidden sectors in the volume |
|
194 |
||
195 |
@return iHiddenSectors |
|
196 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
197 |
inline TUint32 TFatBootSector::HiddenSectors() const |
0 | 198 |
{return iHiddenSectors;} |
199 |
/** |
|
200 |
Returns total sectors in the volume, Used if totalSectors > 65535 |
|
201 |
||
202 |
@return iHugeSectors |
|
203 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
204 |
inline TUint32 TFatBootSector::HugeSectors() const |
0 | 205 |
{return iHugeSectors;} |
206 |
/** |
|
207 |
Returns the physical drive number, not used in Symbian OS |
|
208 |
||
209 |
@return iPhysicalDriveNumber |
|
210 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
211 |
inline TUint8 TFatBootSector::PhysicalDriveNumber() const |
0 | 212 |
{return iPhysicalDriveNumber;} |
213 |
/** |
|
214 |
Returns the extended boot signiture |
|
215 |
||
216 |
@return iExtendedBootSignature |
|
217 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
218 |
inline TUint8 TFatBootSector::ExtendedBootSignature() const |
0 | 219 |
{return iExtendedBootSignature;} |
220 |
/** |
|
221 |
Returns the unique volume ID |
|
222 |
||
223 |
@return iUniqueID |
|
224 |
*/ |
|
225 |
inline TUint32 TFatBootSector::UniqueID() const |
|
226 |
{return iUniqueID;} |
|
227 |
/** |
|
228 |
Returns the volume's label |
|
229 |
||
230 |
@return A descriptor containing the volume label |
|
231 |
*/ |
|
232 |
inline const TPtrC8 TFatBootSector::VolumeLabel() const |
|
233 |
{return TPtrC8(iVolumeLabel,KVolumeLabelSize);} |
|
234 |
/** |
|
235 |
Returns the file system type |
|
236 |
||
237 |
@return A descriptor containing the file system type |
|
238 |
*/ |
|
239 |
inline const TPtrC8 TFatBootSector::FileSysType() const |
|
240 |
{return TPtrC8(iFileSysType,KFileSysTypeSize);} |
|
241 |
/** |
|
242 |
Returns the boot sector signiture |
|
243 |
||
244 |
@return KBootSectorSignature |
|
245 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
246 |
inline TUint16 TFatBootSector::BootSectorSignature() const |
0 | 247 |
{return KBootSectorSignature;} |
248 |
/** |
|
249 |
Set the jump instruction |
|
250 |
*/ |
|
251 |
inline void TFatBootSector::SetJumpInstruction() |
|
252 |
{iJumpInstruction[0]=0xE9;iJumpInstruction[2]=0x90;} |
|
253 |
/** |
|
254 |
Set the vendor ID of the file system that formatted the volume |
|
255 |
||
256 |
@param aDes Descriptor containing the Vendor ID |
|
257 |
*/ |
|
258 |
inline void TFatBootSector::SetVendorID(const TDesC8& aDes) |
|
259 |
{ |
|
260 |
__ASSERT_DEBUG(aDes.Length()<=KVendorIdSize,Fault(EFatBadBootSectorParameter)); |
|
261 |
TPtr8 buf(iVendorId,KVendorIdSize); |
|
262 |
buf=aDes; |
|
263 |
} |
|
264 |
/** |
|
265 |
Sets the bytes per sector |
|
266 |
||
267 |
@param aBytesPerSector Number of bytes per sector |
|
268 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
269 |
inline void TFatBootSector::SetBytesPerSector(TUint16 aBytesPerSector) |
0 | 270 |
{ |
271 |
__ASSERT_DEBUG(!(aBytesPerSector&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
272 |
iBytesPerSector=aBytesPerSector; |
0 | 273 |
} |
274 |
/** |
|
275 |
Set the sectors per cluster ratio |
|
276 |
||
277 |
@param aSectorsPerCluster Number of sectors per cluster |
|
278 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
279 |
inline void TFatBootSector::SetSectorsPerCluster(TUint aSectorsPerCluster) |
0 | 280 |
{ |
281 |
__ASSERT_DEBUG(!(aSectorsPerCluster&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
|
282 |
iSectorsPerCluster=(TUint8)aSectorsPerCluster; |
|
283 |
} |
|
284 |
/** |
|
285 |
Sets the number of reserved sectors on the volume |
|
286 |
||
287 |
@param aReservedSectors Number of reserved sectors |
|
288 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
289 |
inline void TFatBootSector::SetReservedSectors(TUint aReservedSectors) |
0 | 290 |
{ |
291 |
__ASSERT_DEBUG(!(aReservedSectors&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
|
292 |
iReservedSectors=(TUint16)aReservedSectors; |
|
293 |
} |
|
294 |
/** |
|
295 |
Sets the number of Fats on the volume |
|
296 |
||
297 |
@param aNumberOfFats Number of fats |
|
298 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
299 |
inline void TFatBootSector::SetNumberOfFats(TUint8 aNumberOfFats) |
0 | 300 |
{ |
301 |
__ASSERT_DEBUG(!(aNumberOfFats&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
302 |
iNumberOfFats=aNumberOfFats; |
0 | 303 |
} |
304 |
/** |
|
305 |
Number of entries allowed in the root directory, specific to Fat12/16, zero for FAT32 |
|
306 |
||
307 |
@param aRootDirEntries |
|
308 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
309 |
inline void TFatBootSector::SetRootDirEntries(TUint16 aRootDirEntries) |
0 | 310 |
{ |
311 |
__ASSERT_DEBUG(!(aRootDirEntries&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
312 |
iRootDirEntries=aRootDirEntries; |
0 | 313 |
} |
314 |
/** |
|
315 |
Total sectors on the volume, zero for FAT32 |
|
316 |
||
317 |
@param aTotalSectors Total number of sectors |
|
318 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
319 |
inline void TFatBootSector::SetTotalSectors(TUint aTotalSectors) |
0 | 320 |
{ |
321 |
__ASSERT_DEBUG(!(aTotalSectors&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
|
322 |
iTotalSectors=(TUint16)aTotalSectors; |
|
323 |
} |
|
324 |
/** |
|
325 |
Set the media descriptor |
|
326 |
||
327 |
@param aMediaDescriptor |
|
328 |
*/ |
|
329 |
inline void TFatBootSector::SetMediaDescriptor(TUint8 aMediaDescriptor) |
|
330 |
{iMediaDescriptor=aMediaDescriptor;} |
|
331 |
/** |
|
332 |
Sectors used for the Fat table, zero for FAT32 |
|
333 |
||
334 |
@param aFatSectors Number of Fat sectors |
|
335 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
336 |
inline void TFatBootSector::SetFatSectors(TUint aFatSectors) |
0 | 337 |
{ |
338 |
__ASSERT_DEBUG(!(aFatSectors&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
|
339 |
iFatSectors=(TUint16)aFatSectors; |
|
340 |
} |
|
341 |
/** |
|
342 |
Set the sectors per track |
|
343 |
||
344 |
@param aSectorsPerTrack Number of sectors per track |
|
345 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
346 |
inline void TFatBootSector::SetSectorsPerTrack(TUint16 aSectorsPerTrack) |
0 | 347 |
{ |
348 |
__ASSERT_DEBUG(!(aSectorsPerTrack&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
349 |
iSectorsPerTrack=aSectorsPerTrack; |
0 | 350 |
} |
351 |
/** |
|
352 |
Set the number of heads |
|
353 |
||
354 |
@param aNumberOfHeads Number of heads |
|
355 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
356 |
inline void TFatBootSector::SetNumberOfHeads(TUint16 aNumberOfHeads) |
0 | 357 |
{ |
358 |
__ASSERT_DEBUG(!(aNumberOfHeads&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
359 |
iNumberOfHeads=aNumberOfHeads; |
0 | 360 |
} |
361 |
/** |
|
362 |
Set the number of hidden sectors in the volume |
|
363 |
||
364 |
@param aHiddenSectors Number of hidden sectors |
|
365 |
*/ |
|
366 |
inline void TFatBootSector::SetHiddenSectors(TUint32 aHiddenSectors) |
|
367 |
{ |
|
368 |
iHiddenSectors=aHiddenSectors; |
|
369 |
} |
|
370 |
/** |
|
371 |
Set the total sectors in the volume, Used if totalSectors > 65535 |
|
372 |
||
373 |
@param aHugeSectors |
|
374 |
*/ |
|
375 |
inline void TFatBootSector::SetHugeSectors(TUint32 aHugeSectors) |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
376 |
{ |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
377 |
iHugeSectors=aHugeSectors; |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
378 |
} |
0 | 379 |
/** |
380 |
Physical drive number, not used in Symbian OS |
|
381 |
||
382 |
@param aPhysicalDriveNumber Physical drive number |
|
383 |
*/ |
|
384 |
inline void TFatBootSector::SetPhysicalDriveNumber(TInt aPhysicalDriveNumber) |
|
385 |
{ |
|
386 |
__ASSERT_DEBUG(!(aPhysicalDriveNumber&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
|
387 |
iPhysicalDriveNumber=(TUint8)aPhysicalDriveNumber; |
|
388 |
} |
|
389 |
/** |
|
390 |
Set the reserved byte value |
|
391 |
||
392 |
@param aReservedByte Value for reserved byte |
|
393 |
*/ |
|
394 |
inline void TFatBootSector::SetReservedByte(TUint8 aReservedByte) |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
395 |
{ |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
396 |
iReserved=aReservedByte; |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
397 |
} |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
398 |
|
0 | 399 |
/** |
400 |
Set the extended boot signiture |
|
401 |
||
402 |
@param anExtendedBootSignature The extended boot signiture |
|
403 |
*/ |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
404 |
inline void TFatBootSector::SetExtendedBootSignature(TUint8 anExtendedBootSignature) |
0 | 405 |
{ |
406 |
__ASSERT_DEBUG(!(anExtendedBootSignature&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
407 |
iExtendedBootSignature=anExtendedBootSignature; |
0 | 408 |
} |
409 |
/** |
|
410 |
Set the unique volume ID |
|
411 |
||
412 |
@param anUniqueID Set the unique ID |
|
413 |
*/ |
|
414 |
inline void TFatBootSector::SetUniqueID(TUint32 anUniqueID) |
|
415 |
{iUniqueID=anUniqueID;} |
|
416 |
/** |
|
417 |
Set the volume's label |
|
418 |
||
419 |
@param aDes A descriptor containg the volume label |
|
420 |
*/ |
|
421 |
inline void TFatBootSector::SetVolumeLabel(const TDesC8& aDes) |
|
422 |
{ |
|
423 |
__ASSERT_DEBUG(aDes.Length()<=KVolumeLabelSize,Fault(EFatBadBootSectorParameter)); |
|
424 |
TPtr8 buf(iVolumeLabel,KVolumeLabelSize); |
|
425 |
buf=aDes; |
|
426 |
} |
|
427 |
/** |
|
428 |
Set the file system type |
|
429 |
||
430 |
@param aDes A descriptor containing the file system type |
|
431 |
*/ |
|
432 |
inline void TFatBootSector::SetFileSysType(const TDesC8& aDes) |
|
433 |
{ |
|
434 |
__ASSERT_DEBUG(aDes.Length()<=8,Fault(EFatBadBootSectorParameter)); |
|
435 |
TPtr8 buf(iFileSysType,8); |
|
436 |
buf=aDes; |
|
437 |
} |
|
438 |
||
439 |
||
440 |
/** |
|
441 |
Returns the number of free clusters |
|
442 |
||
443 |
@return iFreeCount |
|
444 |
*/ |
|
445 |
inline TUint32 TFSInfo::FreeClusterCount() const |
|
446 |
{return iFreeCount;} |
|
447 |
/** |
|
448 |
Returns the next free cluster |
|
449 |
||
450 |
@return iNextFree |
|
451 |
*/ |
|
452 |
inline TUint32 TFSInfo::NextFreeCluster() const |
|
453 |
{return iNextFree;} |
|
454 |
/** |
|
455 |
Sets the number of free clusters |
|
456 |
||
457 |
@param aFreeCount Number of free clusters |
|
458 |
*/ |
|
459 |
inline void TFSInfo::SetFreeClusterCount(TUint32 aFreeCount) |
|
460 |
{iFreeCount = aFreeCount;} |
|
461 |
/** |
|
462 |
Sets the next free cluster |
|
463 |
||
464 |
@param aNextCluster Cluster number of the next free cluster |
|
465 |
*/ |
|
466 |
inline void TFSInfo::SetNextFreeCluster(TUint32 aNextCluster) |
|
467 |
{iNextFree = aNextCluster;} |
|
468 |
||
469 |
#endif //SL_BPB_INL |