xref: /haiku/src/add-ons/kernel/file_systems/udf/PhysicalPartition.h (revision 893988af824e65e49e55f517b157db8386e8002b)
1 //----------------------------------------------------------------------
2 //  This software is part of the OpenBeOS distribution and is covered
3 //  by the OpenBeOS license.
4 //
5 //  Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
6 //---------------------------------------------------------------------
7 #ifndef _UDF_PHYSICAL_PARTITION_H
8 #define _UDF_PHYSICAL_PARTITION_H
9 
10 /*! \file PhysicalPartition.h
11 */
12 
13 #include <util/kernel_cpp.h>
14 
15 #include "Partition.h"
16 #include "UdfDebug.h"
17 
18 /*! \brief Standard type 1 physical partition
19 
20 	PhysicalPartitions map logical block numbers directly to physical
21 	block numbers.
22 
23 	See also: ECMA-167 10.7.2
24 */
25 class PhysicalPartition : public Partition {
26 public:
27 	PhysicalPartition(uint16 number, uint32 start, uint32 length);
28 	virtual ~PhysicalPartition();
29 	virtual status_t MapBlock(uint32 logicalBlock, off_t &physicalBlock);
30 
31 	uint16 Number() const { return fNumber; }
32 	uint32 Start() const { return fStart; }
33 	uint32 Length() const { return fLength; }
34 private:
35 	uint16 fNumber;
36 	uint32 fStart;
37 	uint32 fLength;
38 };
39 
40 #endif	// _UDF_PHYSICAL_PARTITION_H
41