Chameleon

Chameleon Svn Source Tree

Root/branches/xZen/i386/modules/Disk/include/Partition.hpp

Source at commit 1206 created 12 years 9 months ago.
By meklort, Update Disk + Partition classes
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
10#define INVALID_PARTITION (-1)
11
12class Disk;
13
14class Partition
15{
16public:
17 Partition(Disk* disk, UInt8 partitionNumber);
18 ~Partition();
19
20 virtual IOReturn Read(UInt64 sector, UInt64 size, UInt8* buffer);
21 virtual IOReturn Write(UInt64 sector, UInt64 size, UInt8* buffer);
22
23 virtual bool probe();
24
25 //virtual uuid_t getUUID();
26
27 virtual UInt32 getPartitionNumber() { return mPartitionNumber; };
28 virtual UInt8 getNumPartitions() { return mNumPartitions; };
29
30protected:
31 Disk *mDisk;
32 UInt64 mNumSectors;
33 UInt64 mBeginSector;
34 SInt8 mPartitionNumber;
35 UInt8 mNumPartitions;
36 //uuid_t mUUID;
37
38private:
39
40};
41
42
43class PartitionList
44{
45public:
46 Partition *entry;
47 PartitionList *next;
48};
49
50
51#endif /* PARTITION_H */
52

Archive Download this file

Revision: 1206