Beginning of Disk Device API:
* Made all headers parsable. Also some smaller changes. * Added empty source files for new classes. * Changed obsolete implementations of existing classes, so that we now have basic functionality for BDiskDevice[Roster] and BPartition. Iterating through disk devices works and the data we get doesn't look too bad for the beginning. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3883 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,8 +6,15 @@
|
||||
#ifndef _DISK_DEVICE_H
|
||||
#define _DISK_DEVICE_H
|
||||
|
||||
#include <Partition.h>
|
||||
|
||||
struct user_disk_device_data;
|
||||
|
||||
class BDiskDevice : public BPartition {
|
||||
public:
|
||||
BDiskDevice();
|
||||
virtual ~BDiskDevice();
|
||||
|
||||
bool IsRemovable() const;
|
||||
bool HasMedia() const;
|
||||
|
||||
@@ -15,21 +22,26 @@ public:
|
||||
|
||||
status_t Update(bool *updated = NULL);
|
||||
void Unset();
|
||||
|
||||
virtual status_t GetPath(BPath *path) const;
|
||||
|
||||
virtual BPartition *VisitEachDescendent(BDiskDeviceVisitor *visitor);
|
||||
|
||||
bool IsModified() const;
|
||||
status_t PrepareModifications();
|
||||
status_t CommitModifications(bool synchronously = true,
|
||||
BMessenger progressMessenger = BMessenger(),
|
||||
bool receiveCompleteProgressUpdates = true,
|
||||
BMessage *template = NULL);
|
||||
bool receiveCompleteProgressUpdates = true);
|
||||
status_t CancelModifications();
|
||||
|
||||
private:
|
||||
friend class BDiskDeviceList;
|
||||
friend class BDiskDeviceRoster;
|
||||
|
||||
char fDeviceType[B_FILE_NAME_LENGTH];
|
||||
char fPath[B_FILE_NAME_LENGTH];
|
||||
status_t SetTo(partition_id id, size_t neededSize = 0);
|
||||
status_t SetTo(user_disk_device_data *data);
|
||||
|
||||
bool fIsRemovable;
|
||||
status_t fMediaStatus;
|
||||
}
|
||||
user_disk_device_data *fDeviceData;
|
||||
};
|
||||
|
||||
#endif // _DISK_DEVICE_H
|
||||
|
||||
Reference in New Issue
Block a user