haiku/headers/private/kernel/disk_device_manager/KFileDiskDevice.h
Ingo Weinhold c06238cbd6 * Reworked publishing/unpublishing of the device. This is now basically
done by (currently not existing) devfs functions.
* Overridden GetMediaStatus() and GetGeometry() to return useful data.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 22:22:04 +00:00

49 lines
1.0 KiB
C++

// KFileDiskDevice.h
#ifndef _K_FILE_DISK_DEVICE_H
#define _K_FILE_DISK_DEVICE_H
#include <OS.h>
#include "KDiskDevice.h"
namespace BPrivate {
namespace DiskDevice {
class KPath;
class KFileDiskDevice : public KDiskDevice {
public:
KFileDiskDevice(partition_id id = -1);
virtual ~KFileDiskDevice();
status_t SetTo(const char *filePath, const char *devicePath = NULL);
void Unset();
virtual status_t InitCheck() const;
// TODO: probably superfluous
const char *FilePath() const;
// virtual void Dump(bool deep = true, int32 level = 0);
protected:
virtual status_t GetMediaStatus(status_t *mediaStatus);
virtual status_t GetGeometry(device_geometry *geometry);
private:
static status_t _GetDirectoryPath(partition_id id, KPath *path);
static status_t _RegisterDevice(const char *file, const char *device);
static status_t _UnregisterDevice(const char *device);
private:
char *fFilePath;
};
} // namespace DiskDevice
} // namespace BPrivate
using BPrivate::DiskDevice::KFileDiskDevice;
#endif // _K_FILE_DISK_DEVICE_H