Root/
Source at commit 1086 created 12 years 10 months ago. By meklort, More disk changes... more to come too | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2011 Evan Lojewski. All rights reserved.␊ |
3 | *␊ |
4 | */␊ |
5 | #ifndef PARTITION_H␊ |
6 | #define PARTITION_H␊ |
7 | ␊ |
8 | #include <IOKit/IOTypes.h>␊ |
9 | #include <Disk.hpp>␊ |
10 | ␊ |
11 | #define INVALID_PARTITION (-1)␊ |
12 | ␊ |
13 | class Partition␊ |
14 | {␊ |
15 | public:␊ |
16 | Partition(Disk* disk, UInt8 partitionNumber);␊ |
17 | ~Partition();␊ |
18 | ␊ |
19 | virtual IOReturn Read(UInt64 sector, UInt64 size, UInt8* buffer);␊ |
20 | virtual IOReturn Write(UInt64 sector, UInt64 size, UInt8* buffer);␊ |
21 | ␊ |
22 | virtual bool probe(); ␊ |
23 | ␊ |
24 | protected:␊ |
25 | Disk *mDisk;␊ |
26 | UInt64 mNumSectors;␊ |
27 | UInt64 mBeginSector;␊ |
28 | SInt8 mPartitionNumber;␊ |
29 | UInt8 mNumPartitions;␊ |
30 | ␊ |
31 | private:␊ |
32 | ␊ |
33 | };␊ |
34 | ␊ |
35 | ␊ |
36 | #endif /* PARTITION_H */␊ |
37 |