xref: /haiku/src/add-ons/kernel/file_systems/udf/PhysicalPartition.h (revision 1214ef1b2100f2b3299fc9d8d6142e46f70a4c3f)
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 <kernel_cpp.h>
14 
15 #include "Partition.h"
16 #include "UdfDebug.h"
17 
18 namespace Udf {
19 
20 /*! \brief Standard type 1 physical partition
21 
22 	PhysicalPartitions map logical block numbers directly to physical
23 	block numbers.
24 
25 	See also: ECMA-167 10.7.2
26 */
27 class PhysicalPartition : public Partition {
28 public:
29 	PhysicalPartition(uint16 number, uint32 start, uint32 length);
30 	virtual ~PhysicalPartition();
31 	virtual status_t MapBlock(uint32 logicalBlock, off_t &physicalBlock);
32 
33 	uint16 Number() const { return fNumber; }
34 	uint32 Start() const { return fStart; }
35 	uint32 Length() const { return fLength; }
36 private:
37 	uint16 fNumber;
38 	uint32 fStart;
39 	uint32 fLength;
40 };
41 
42 };	// namespace Udf
43 
44 #endif	// _UDF_PHYSICAL_PARTITION_H
45