xref: /haiku/src/add-ons/kernel/file_systems/udf/PhysicalPartition.h (revision a1b5a724edc0e6fd4608de040e041f96dad62db4)
104106297STyler Dauwalder //----------------------------------------------------------------------
204106297STyler Dauwalder //  This software is part of the OpenBeOS distribution and is covered
304106297STyler Dauwalder //  by the OpenBeOS license.
404106297STyler Dauwalder //
504106297STyler Dauwalder //  Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
604106297STyler Dauwalder //---------------------------------------------------------------------
704106297STyler Dauwalder #ifndef _UDF_PHYSICAL_PARTITION_H
804106297STyler Dauwalder #define _UDF_PHYSICAL_PARTITION_H
904106297STyler Dauwalder 
1004106297STyler Dauwalder /*! \file PhysicalPartition.h
1104106297STyler Dauwalder */
1204106297STyler Dauwalder 
1304106297STyler Dauwalder #include <kernel_cpp.h>
1404106297STyler Dauwalder 
1504106297STyler Dauwalder #include "Partition.h"
1604106297STyler Dauwalder #include "UdfDebug.h"
1704106297STyler Dauwalder 
1804106297STyler Dauwalder namespace Udf {
1904106297STyler Dauwalder 
2004106297STyler Dauwalder /*! \brief Standard type 1 physical partition
2104106297STyler Dauwalder 
2204106297STyler Dauwalder 	PhysicalPartitions map logical block numbers directly to physical
2304106297STyler Dauwalder 	block numbers.
2404106297STyler Dauwalder 
2504106297STyler Dauwalder 	See also: ECMA-167 10.7.2
2604106297STyler Dauwalder */
2704106297STyler Dauwalder class PhysicalPartition : public Partition {
2804106297STyler Dauwalder public:
2904106297STyler Dauwalder 	PhysicalPartition(uint16 number, uint32 start, uint32 length);
3004106297STyler Dauwalder 	virtual ~PhysicalPartition();
31*a1b5a724STyler Dauwalder 	virtual status_t MapBlock(uint32 logicalBlock, off_t &physicalBlock);
3204106297STyler Dauwalder 
3304106297STyler Dauwalder 	uint16 Number() const { return fNumber; }
3404106297STyler Dauwalder 	uint32 Start() const { return fStart; }
3504106297STyler Dauwalder 	uint32 Length() const { return fLength; }
3604106297STyler Dauwalder private:
3704106297STyler Dauwalder 	uint16 fNumber;
3804106297STyler Dauwalder 	uint32 fStart;
3904106297STyler Dauwalder 	uint32 fLength;
4004106297STyler Dauwalder };
4104106297STyler Dauwalder 
4204106297STyler Dauwalder };	// namespace Udf
4304106297STyler Dauwalder 
4404106297STyler Dauwalder #endif	// _UDF_PHYSICAL_PARTITION_H
45