2003-05-28 21:46:11 +00:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// This software is part of the OpenBeOS distribution and is covered
|
|
|
|
// by the OpenBeOS license.
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef _DISK_DEVICE_JOB_H
|
|
|
|
#define _DISK_DEVICE_JOB_H
|
|
|
|
|
2003-05-28 21:51:24 +00:00
|
|
|
#include <String.h>
|
|
|
|
|
2003-05-28 21:46:11 +00:00
|
|
|
// disk device job types
|
|
|
|
enum {
|
|
|
|
B_DISK_DEVICE_JOB_CREATE,
|
|
|
|
B_DISK_DEVICE_JOB_DELETE,
|
|
|
|
B_DISK_DEVICE_JOB_INITIALIZE,
|
|
|
|
B_DISK_DEVICE_JOB_RESIZE,
|
|
|
|
B_DISK_DEVICE_JOB_MOVE,
|
|
|
|
B_DISK_DEVICE_JOB_DEFRAGMENT,
|
|
|
|
B_DISK_DEVICE_JOB_REPAIR,
|
2003-05-28 21:47:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// disk device job statuses
|
|
|
|
enum {
|
|
|
|
B_DISK_DEVICE_JOB_UNINITIALIZED,
|
|
|
|
B_DISK_DEVICE_JOB_SCHEDULED,
|
|
|
|
B_DISK_DEVICE_JOB_IN_PROGRESS,
|
|
|
|
B_DISK_DEVICE_JOB_SUCCEEDED,
|
|
|
|
B_DISK_DEVICE_JOB_FAILED,
|
|
|
|
B_DISK_DEVICE_JOB_CANCELED,
|
|
|
|
};
|
2003-05-28 21:46:11 +00:00
|
|
|
|
|
|
|
class BDiskDeviceJob {
|
|
|
|
public:
|
2003-05-28 21:51:24 +00:00
|
|
|
uint32 ID() const;
|
2003-05-28 21:46:11 +00:00
|
|
|
uint32 Type() const;
|
2003-05-28 21:51:24 +00:00
|
|
|
float Progress() const; // [0.0, 1.0]
|
2003-05-28 21:47:29 +00:00
|
|
|
uint32 Status() const;
|
2003-05-28 21:46:11 +00:00
|
|
|
const char *Description() const;
|
|
|
|
|
|
|
|
BPartition* Partition() const;
|
|
|
|
private:
|
2003-05-28 21:51:24 +00:00
|
|
|
uint32 fJobID;
|
|
|
|
uint32 fType;
|
|
|
|
uint32 fPartitionID;
|
|
|
|
uint32 fStatus;
|
|
|
|
BString fDescription;
|
2003-05-28 21:46:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _DISK_DEVICE_JOB_H
|