129 /** |
129 /** |
130 Returns the sectors per cluster ratio |
130 Returns the sectors per cluster ratio |
131 |
131 |
132 @return iSectorsPerCluster |
132 @return iSectorsPerCluster |
133 */ |
133 */ |
134 inline TInt TFatBootSector::SectorsPerCluster() const |
134 inline TUint8 TFatBootSector::SectorsPerCluster() const |
135 {return iSectorsPerCluster;} |
135 {return iSectorsPerCluster;} |
136 /** |
136 /** |
137 Returns the number of reserved sectors on the volume |
137 Returns the number of reserved sectors on the volume |
138 |
138 |
139 @return iReservedSectors |
139 @return iReservedSectors |
140 */ |
140 */ |
141 inline TInt TFatBootSector::ReservedSectors() const |
141 inline TUint16 TFatBootSector::ReservedSectors() const |
142 {return iReservedSectors;} |
142 {return iReservedSectors;} |
143 /** |
143 /** |
144 Returns the number of Fats on the volume |
144 Returns the number of Fats on the volume |
145 |
145 |
146 @return iNumberOfFats |
146 @return iNumberOfFats |
147 */ |
147 */ |
148 inline TInt TFatBootSector::NumberOfFats() const |
148 inline TUint8 TFatBootSector::NumberOfFats() const |
149 {return iNumberOfFats;} |
149 {return iNumberOfFats;} |
150 /** |
150 /** |
151 Returns the number of entries allowed in the root directory, specific to Fat12/16, zero for FAT32 |
151 Returns the number of entries allowed in the root directory, specific to Fat12/16, zero for FAT32 |
152 |
152 |
153 @return iRootDirEntries |
153 @return iRootDirEntries |
154 */ |
154 */ |
155 inline TInt TFatBootSector::RootDirEntries() const |
155 inline TUint16 TFatBootSector::RootDirEntries() const |
156 {return iRootDirEntries;} |
156 {return iRootDirEntries;} |
157 /** |
157 /** |
158 Returns the total sectors on the volume, zero for FAT32 |
158 Returns the total sectors on the volume, zero for FAT32 |
159 |
159 |
160 @return iTotalSectors |
160 @return iTotalSectors |
161 */ |
161 */ |
162 inline TInt TFatBootSector::TotalSectors() const |
162 inline TUint16 TFatBootSector::TotalSectors() const |
163 {return iTotalSectors;} |
163 {return iTotalSectors;} |
164 /** |
164 /** |
165 Returns the media descriptor |
165 Returns the media descriptor |
166 |
166 |
167 @return iMediaDescriptor |
167 @return iMediaDescriptor |
171 /** |
171 /** |
172 Returns sectors used for the Fat table, zero for FAT32 |
172 Returns sectors used for the Fat table, zero for FAT32 |
173 |
173 |
174 @return iFatSectors |
174 @return iFatSectors |
175 */ |
175 */ |
176 inline TInt TFatBootSector::FatSectors() const |
176 inline TUint16 TFatBootSector::FatSectors() const |
177 {return iFatSectors;} |
177 {return iFatSectors;} |
178 /** |
178 /** |
179 Returns sectors per track |
179 Returns sectors per track |
180 |
180 |
181 @return iSectorsPerTrack |
181 @return iSectorsPerTrack |
182 */ |
182 */ |
183 inline TInt TFatBootSector::SectorsPerTrack() const |
183 inline TUint16 TFatBootSector::SectorsPerTrack() const |
184 {return iSectorsPerTrack;} |
184 {return iSectorsPerTrack;} |
185 /** |
185 /** |
186 Returns the number of heads |
186 Returns the number of heads |
187 |
187 |
188 @return iNumberOfHeads |
188 @return iNumberOfHeads |
189 */ |
189 */ |
190 inline TInt TFatBootSector::NumberOfHeads() const |
190 inline TUint16 TFatBootSector::NumberOfHeads() const |
191 {return iNumberOfHeads;} |
191 {return iNumberOfHeads;} |
192 /** |
192 /** |
193 Returns the number of hidden sectors in the volume |
193 Returns the number of hidden sectors in the volume |
194 |
194 |
195 @return iHiddenSectors |
195 @return iHiddenSectors |
196 */ |
196 */ |
197 inline TInt TFatBootSector::HiddenSectors() const |
197 inline TUint32 TFatBootSector::HiddenSectors() const |
198 {return iHiddenSectors;} |
198 {return iHiddenSectors;} |
199 /** |
199 /** |
200 Returns total sectors in the volume, Used if totalSectors > 65535 |
200 Returns total sectors in the volume, Used if totalSectors > 65535 |
201 |
201 |
202 @return iHugeSectors |
202 @return iHugeSectors |
203 */ |
203 */ |
204 inline TInt TFatBootSector::HugeSectors() const |
204 inline TUint32 TFatBootSector::HugeSectors() const |
205 {return iHugeSectors;} |
205 {return iHugeSectors;} |
206 /** |
206 /** |
207 Returns the physical drive number, not used in Symbian OS |
207 Returns the physical drive number, not used in Symbian OS |
208 |
208 |
209 @return iPhysicalDriveNumber |
209 @return iPhysicalDriveNumber |
210 */ |
210 */ |
211 inline TInt TFatBootSector::PhysicalDriveNumber() const |
211 inline TUint8 TFatBootSector::PhysicalDriveNumber() const |
212 {return iPhysicalDriveNumber;} |
212 {return iPhysicalDriveNumber;} |
213 /** |
213 /** |
214 Returns the extended boot signiture |
214 Returns the extended boot signiture |
215 |
215 |
216 @return iExtendedBootSignature |
216 @return iExtendedBootSignature |
217 */ |
217 */ |
218 inline TInt TFatBootSector::ExtendedBootSignature() const |
218 inline TUint8 TFatBootSector::ExtendedBootSignature() const |
219 {return iExtendedBootSignature;} |
219 {return iExtendedBootSignature;} |
220 /** |
220 /** |
221 Returns the unique volume ID |
221 Returns the unique volume ID |
222 |
222 |
223 @return iUniqueID |
223 @return iUniqueID |
264 /** |
264 /** |
265 Sets the bytes per sector |
265 Sets the bytes per sector |
266 |
266 |
267 @param aBytesPerSector Number of bytes per sector |
267 @param aBytesPerSector Number of bytes per sector |
268 */ |
268 */ |
269 inline void TFatBootSector::SetBytesPerSector(TInt aBytesPerSector) |
269 inline void TFatBootSector::SetBytesPerSector(TUint16 aBytesPerSector) |
270 { |
270 { |
271 __ASSERT_DEBUG(!(aBytesPerSector&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
271 __ASSERT_DEBUG(!(aBytesPerSector&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
272 iBytesPerSector=(TUint16)aBytesPerSector; |
272 iBytesPerSector=aBytesPerSector; |
273 } |
273 } |
274 /** |
274 /** |
275 Set the sectors per cluster ratio |
275 Set the sectors per cluster ratio |
276 |
276 |
277 @param aSectorsPerCluster Number of sectors per cluster |
277 @param aSectorsPerCluster Number of sectors per cluster |
278 */ |
278 */ |
279 inline void TFatBootSector::SetSectorsPerCluster(TInt aSectorsPerCluster) |
279 inline void TFatBootSector::SetSectorsPerCluster(TUint aSectorsPerCluster) |
280 { |
280 { |
281 __ASSERT_DEBUG(!(aSectorsPerCluster&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
281 __ASSERT_DEBUG(!(aSectorsPerCluster&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
282 iSectorsPerCluster=(TUint8)aSectorsPerCluster; |
282 iSectorsPerCluster=(TUint8)aSectorsPerCluster; |
283 } |
283 } |
284 /** |
284 /** |
285 Sets the number of reserved sectors on the volume |
285 Sets the number of reserved sectors on the volume |
286 |
286 |
287 @param aReservedSectors Number of reserved sectors |
287 @param aReservedSectors Number of reserved sectors |
288 */ |
288 */ |
289 inline void TFatBootSector::SetReservedSectors(TInt aReservedSectors) |
289 inline void TFatBootSector::SetReservedSectors(TUint aReservedSectors) |
290 { |
290 { |
291 __ASSERT_DEBUG(!(aReservedSectors&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
291 __ASSERT_DEBUG(!(aReservedSectors&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
292 iReservedSectors=(TUint16)aReservedSectors; |
292 iReservedSectors=(TUint16)aReservedSectors; |
293 } |
293 } |
294 /** |
294 /** |
295 Sets the number of Fats on the volume |
295 Sets the number of Fats on the volume |
296 |
296 |
297 @param aNumberOfFats Number of fats |
297 @param aNumberOfFats Number of fats |
298 */ |
298 */ |
299 inline void TFatBootSector::SetNumberOfFats(TInt aNumberOfFats) |
299 inline void TFatBootSector::SetNumberOfFats(TUint8 aNumberOfFats) |
300 { |
300 { |
301 __ASSERT_DEBUG(!(aNumberOfFats&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
301 __ASSERT_DEBUG(!(aNumberOfFats&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
302 iNumberOfFats=(TUint8)aNumberOfFats; |
302 iNumberOfFats=aNumberOfFats; |
303 } |
303 } |
304 /** |
304 /** |
305 Number of entries allowed in the root directory, specific to Fat12/16, zero for FAT32 |
305 Number of entries allowed in the root directory, specific to Fat12/16, zero for FAT32 |
306 |
306 |
307 @param aRootDirEntries |
307 @param aRootDirEntries |
308 */ |
308 */ |
309 inline void TFatBootSector::SetRootDirEntries(TInt aRootDirEntries) |
309 inline void TFatBootSector::SetRootDirEntries(TUint16 aRootDirEntries) |
310 { |
310 { |
311 __ASSERT_DEBUG(!(aRootDirEntries&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
311 __ASSERT_DEBUG(!(aRootDirEntries&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
312 iRootDirEntries=(TUint16)aRootDirEntries; |
312 iRootDirEntries=aRootDirEntries; |
313 } |
313 } |
314 /** |
314 /** |
315 Total sectors on the volume, zero for FAT32 |
315 Total sectors on the volume, zero for FAT32 |
316 |
316 |
317 @param aTotalSectors Total number of sectors |
317 @param aTotalSectors Total number of sectors |
318 */ |
318 */ |
319 inline void TFatBootSector::SetTotalSectors(TInt aTotalSectors) |
319 inline void TFatBootSector::SetTotalSectors(TUint aTotalSectors) |
320 { |
320 { |
321 __ASSERT_DEBUG(!(aTotalSectors&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
321 __ASSERT_DEBUG(!(aTotalSectors&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
322 iTotalSectors=(TUint16)aTotalSectors; |
322 iTotalSectors=(TUint16)aTotalSectors; |
323 } |
323 } |
324 /** |
324 /** |
331 /** |
331 /** |
332 Sectors used for the Fat table, zero for FAT32 |
332 Sectors used for the Fat table, zero for FAT32 |
333 |
333 |
334 @param aFatSectors Number of Fat sectors |
334 @param aFatSectors Number of Fat sectors |
335 */ |
335 */ |
336 inline void TFatBootSector::SetFatSectors(TInt aFatSectors) |
336 inline void TFatBootSector::SetFatSectors(TUint aFatSectors) |
337 { |
337 { |
338 __ASSERT_DEBUG(!(aFatSectors&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
338 __ASSERT_DEBUG(!(aFatSectors&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
339 iFatSectors=(TUint16)aFatSectors; |
339 iFatSectors=(TUint16)aFatSectors; |
340 } |
340 } |
341 /** |
341 /** |
342 Set the sectors per track |
342 Set the sectors per track |
343 |
343 |
344 @param aSectorsPerTrack Number of sectors per track |
344 @param aSectorsPerTrack Number of sectors per track |
345 */ |
345 */ |
346 inline void TFatBootSector::SetSectorsPerTrack(TInt aSectorsPerTrack) |
346 inline void TFatBootSector::SetSectorsPerTrack(TUint16 aSectorsPerTrack) |
347 { |
347 { |
348 __ASSERT_DEBUG(!(aSectorsPerTrack&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
348 __ASSERT_DEBUG(!(aSectorsPerTrack&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
349 iSectorsPerTrack=(TUint16)aSectorsPerTrack; |
349 iSectorsPerTrack=aSectorsPerTrack; |
350 } |
350 } |
351 /** |
351 /** |
352 Set the number of heads |
352 Set the number of heads |
353 |
353 |
354 @param aNumberOfHeads Number of heads |
354 @param aNumberOfHeads Number of heads |
355 */ |
355 */ |
356 inline void TFatBootSector::SetNumberOfHeads(TInt aNumberOfHeads) |
356 inline void TFatBootSector::SetNumberOfHeads(TUint16 aNumberOfHeads) |
357 { |
357 { |
358 __ASSERT_DEBUG(!(aNumberOfHeads&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
358 __ASSERT_DEBUG(!(aNumberOfHeads&~KMaxTUint16),Fault(EFatBadBootSectorParameter)); |
359 iNumberOfHeads=(TUint16)aNumberOfHeads; |
359 iNumberOfHeads=aNumberOfHeads; |
360 } |
360 } |
361 /** |
361 /** |
362 Set the number of hidden sectors in the volume |
362 Set the number of hidden sectors in the volume |
363 |
363 |
364 @param aHiddenSectors Number of hidden sectors |
364 @param aHiddenSectors Number of hidden sectors |
388 Set the reserved byte value |
390 Set the reserved byte value |
389 |
391 |
390 @param aReservedByte Value for reserved byte |
392 @param aReservedByte Value for reserved byte |
391 */ |
393 */ |
392 inline void TFatBootSector::SetReservedByte(TUint8 aReservedByte) |
394 inline void TFatBootSector::SetReservedByte(TUint8 aReservedByte) |
393 {iReserved=aReservedByte;} |
395 { |
|
396 iReserved=aReservedByte; |
|
397 } |
|
398 |
394 /** |
399 /** |
395 Set the extended boot signiture |
400 Set the extended boot signiture |
396 |
401 |
397 @param anExtendedBootSignature The extended boot signiture |
402 @param anExtendedBootSignature The extended boot signiture |
398 */ |
403 */ |
399 inline void TFatBootSector::SetExtendedBootSignature(TInt anExtendedBootSignature) |
404 inline void TFatBootSector::SetExtendedBootSignature(TUint8 anExtendedBootSignature) |
400 { |
405 { |
401 __ASSERT_DEBUG(!(anExtendedBootSignature&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
406 __ASSERT_DEBUG(!(anExtendedBootSignature&~KMaxTUint8),Fault(EFatBadBootSectorParameter)); |
402 iExtendedBootSignature=(TUint8)anExtendedBootSignature; |
407 iExtendedBootSignature=anExtendedBootSignature; |
403 } |
408 } |
404 /** |
409 /** |
405 Set the unique volume ID |
410 Set the unique volume ID |
406 |
411 |
407 @param anUniqueID Set the unique ID |
412 @param anUniqueID Set the unique ID |