Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/modules/Disk/include/Disk.hpp

Source at commit 1087 created 8 years 11 months ago.
By meklort, Remove resolution module. May be added back later
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
10class Disk
11{
12public:
13 Disk(const char* name);
14 ~Disk();
15
16 virtual IOReturn Read(UInt64 sector, UInt64 size, UInt8* buffer) = 0;
17 virtual IOReturn Write(UInt64 sector, UInt64 size, UInt8* buffer) = 0;
18
19 virtual bool isValid() { return mName != NULL && mBytesPerSector; };
20 virtual bool probe() { return isValid(); };
21 virtual UInt32 bytesPerSector() { return mBytesPerSector; };
22protected:
23 const char *mName;
24 const char *mBusType;
25
26 UInt32 mBytesPerSector;
27private:
28
29};
30
31#endif /* DISK_H */
32

Archive Download this file

Revision: 1087