104106297STyler Dauwalder //---------------------------------------------------------------------- 204106297STyler Dauwalder // This software is part of the OpenBeOS distribution and is covered 3*b6f76ebeSAugustin Cavalier // by the MIT 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 13deac135dSSalvatore Benedetto #include <util/kernel_cpp.h> 1404106297STyler Dauwalder 1504106297STyler Dauwalder #include "Partition.h" 1604106297STyler Dauwalder #include "UdfDebug.h" 1704106297STyler Dauwalder 1804106297STyler Dauwalder /*! \brief Standard type 1 physical partition 1904106297STyler Dauwalder 2004106297STyler Dauwalder PhysicalPartitions map logical block numbers directly to physical 2104106297STyler Dauwalder block numbers. 2204106297STyler Dauwalder 2304106297STyler Dauwalder See also: ECMA-167 10.7.2 2404106297STyler Dauwalder */ 2504106297STyler Dauwalder class PhysicalPartition : public Partition { 2604106297STyler Dauwalder public: 2704106297STyler Dauwalder PhysicalPartition(uint16 number, uint32 start, uint32 length); 2804106297STyler Dauwalder virtual ~PhysicalPartition(); 29a1b5a724STyler Dauwalder virtual status_t MapBlock(uint32 logicalBlock, off_t &physicalBlock); 3004106297STyler Dauwalder 3104106297STyler Dauwalder uint16 Number() const { return fNumber; } 3204106297STyler Dauwalder uint32 Start() const { return fStart; } 3304106297STyler Dauwalder uint32 Length() const { return fLength; } 3404106297STyler Dauwalder private: 3504106297STyler Dauwalder uint16 fNumber; 3604106297STyler Dauwalder uint32 fStart; 3704106297STyler Dauwalder uint32 fLength; 3804106297STyler Dauwalder }; 3904106297STyler Dauwalder 4004106297STyler Dauwalder #endif // _UDF_PHYSICAL_PARTITION_H 41