panthema / 2006 / SDIOS06 / sdios06 / testapps / minixfstest / disk.h (Download File)
/*
 * $Id: disk.h 110 2006-07-20 19:43:31Z sdi2 $
 */
#ifndef DISK_H_
#define DISK_H_

#include <stdlib.h>
#include <idl4glue.h>
#include <if/types.h>

/**
 * Abstraction for a disk
 */
class Disk {
public:
	Disk(const char* device);
	~Disk();

	size_t getBlockSize();
	void readBlock(void* data, size_t num);
	void writeBlock(const void* data, size_t num);
	
private:
	L4_ThreadId_t driver;
	objectid_t devhandle;
	size_t blocksize;
};

#endif
RSS 2.0 Weblog Feed Atom 1.0 Weblog Feed Valid XHTML 1.1 Valid CSS (2.1)
Copyright 2005-2014 Timo Bingmann - Impressum