Files
haiku-beta6/headers/private/storage/DiskDevice.h
T

48 lines
1.2 KiB
C++
Raw Normal View History

2003-01-31 22:05:09 +00:00
//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//---------------------------------------------------------------------
2003-01-31 21:17:20 +00:00
#ifndef _DISK_DEVICE_H
#define _DISK_DEVICE_H
2003-07-06 23:11:10 +00:00
#include <Partition.h>
struct user_disk_device_data;
2003-05-28 21:43:58 +00:00
class BDiskDevice : public BPartition {
2003-01-31 21:17:20 +00:00
public:
2003-07-06 23:11:10 +00:00
BDiskDevice();
virtual ~BDiskDevice();
2003-01-31 21:17:20 +00:00
bool IsRemovable() const;
bool HasMedia() const;
status_t Eject(bool update = false);
2003-01-31 21:17:20 +00:00
status_t Update(bool *updated = NULL);
2003-05-28 21:46:11 +00:00
void Unset();
2003-07-06 23:11:10 +00:00
virtual status_t GetPath(BPath *path) const;
virtual BPartition *VisitEachDescendent(BDiskDeviceVisitor *visitor);
2003-05-28 21:46:11 +00:00
bool IsModified() const;
2003-07-06 23:11:10 +00:00
status_t PrepareModifications();
status_t CommitModifications(bool synchronously = true,
2003-05-28 21:46:11 +00:00
BMessenger progressMessenger = BMessenger(),
2003-07-06 23:11:10 +00:00
bool receiveCompleteProgressUpdates = true);
status_t CancelModifications();
2003-01-31 21:17:20 +00:00
private:
2003-02-20 00:22:09 +00:00
friend class BDiskDeviceList;
friend class BDiskDeviceRoster;
2003-07-06 23:11:10 +00:00
status_t SetTo(partition_id id, size_t neededSize = 0);
status_t SetTo(user_disk_device_data *data);
2003-05-28 21:43:58 +00:00
2003-07-06 23:11:10 +00:00
user_disk_device_data *fDeviceData;
};
2003-01-31 21:17:20 +00:00
#endif // _DISK_DEVICE_H