Root/
Source at commit 1081 created 13 years 1 month ago. By azimutz, Sync these two with trunk (r1078). | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2011 Evan Lojewski. All rights reserved.␊ |
3 | *␊ |
4 | */␊ |
5 | #ifndef DISK_H␊ |
6 | #define DISK_H␊ |
7 | ␊ |
8 | #include <IOKit/IOTypes.h>␊ |
9 | ␊ |
10 | class Disk␊ |
11 | {␊ |
12 | public:␊ |
13 | Disk();␊ |
14 | Disk(const char* name);␊ |
15 | ~Disk();␊ |
16 | ␊ |
17 | virtual IOReturn Read(UInt64 sector, UInt64 size, UInt8* buffer) = 0;␊ |
18 | virtual IOReturn Write(UInt64 sector, UInt64 size, UInt8* buffer) = 0;␊ |
19 | ␊ |
20 | virtual bool isValid() { return mName != NULL && mBytesPerSector; };␊ |
21 | protected:␊ |
22 | const char *mName;␊ |
23 | const char *mBusType;␊ |
24 | ␊ |
25 | UInt32 mBytesPerSector;␊ |
26 | private:␊ |
27 | ␊ |
28 | };␊ |
29 | ␊ |
30 | #endif /* DISK_H */␊ |
31 |