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,6 +6,7 @@
|
||||
#ifndef _DISK_DEVICE_JOB_H
|
||||
#define _DISK_DEVICE_JOB_H
|
||||
|
||||
#include <DiskDeviceDefs.h>
|
||||
#include <String.h>
|
||||
|
||||
// disk device job types
|
||||
@@ -42,21 +43,24 @@ enum {
|
||||
B_DISK_DEVICE_JOB_CAN_CANCEL = 0x01,
|
||||
B_DISK_DEVICE_JOB_STOP_ON_CANCEL = 0x02,
|
||||
B_DISK_DEVICE_JOB_REVERSE_ON_CANCEL = 0x04,
|
||||
B_DISK_DEVICE_JOB_CAN_PAUSE = 0x08,
|
||||
};
|
||||
|
||||
class BDiskDeviceJob {
|
||||
public:
|
||||
disk_job_id ID() const;
|
||||
uint32 Type() const;
|
||||
partition_id PartitionID() const;
|
||||
|
||||
float Progress() const; // [0.0, 1.0]
|
||||
uint32 Status() const;
|
||||
const char *Description() const;
|
||||
status_t GetProgressInfo(disk_devive_progress_info *info) const;
|
||||
uint32 CancelProperties() const;
|
||||
// TODO: Add Cancel() and Pause(), SupportsPause().
|
||||
|
||||
partition_id PartitionID() const;
|
||||
status_t GetProgressInfo(disk_device_progress_info *info) const;
|
||||
uint32 InterruptProperties() const;
|
||||
|
||||
status_t Cancel();
|
||||
status_t Pause();
|
||||
|
||||
private:
|
||||
disk_job_id fJobID;
|
||||
uint32 fType;
|
||||
|
||||
Reference in New Issue
Block a user