Added setter/getter for an error message. Should be set to something informative when while executing a job an error occurs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4842 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -34,6 +34,9 @@ public:
|
|||||||
partition_id PartitionID() const;
|
partition_id PartitionID() const;
|
||||||
partition_id ScopeID() const;
|
partition_id ScopeID() const;
|
||||||
|
|
||||||
|
status_t SetErrorMessage(const char *message);
|
||||||
|
const char *ErrorMessage() const;
|
||||||
|
|
||||||
void SetTaskCount(int32 count);
|
void SetTaskCount(int32 count);
|
||||||
int32 TaskCount() const;
|
int32 TaskCount() const;
|
||||||
|
|
||||||
@@ -66,6 +69,7 @@ private:
|
|||||||
partition_id fPartitionID;
|
partition_id fPartitionID;
|
||||||
partition_id fScopeID;
|
partition_id fScopeID;
|
||||||
char *fDescription;
|
char *fDescription;
|
||||||
|
char *fErrorMessage;
|
||||||
int32 fTaskCount;
|
int32 fTaskCount;
|
||||||
int32 fCompletedTasks;
|
int32 fCompletedTasks;
|
||||||
uint32 fInterruptProperties;
|
uint32 fInterruptProperties;
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
// KDiskDeviceJob.cpp
|
// KDiskDeviceJob.cpp
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "ddm_userland_interface.h"
|
#include "ddm_userland_interface.h"
|
||||||
|
|
||||||
#include "KDiskDeviceJob.h"
|
#include <KDiskDeviceJob.h>
|
||||||
#include "KDiskDeviceUtils.h"
|
#include <KDiskDeviceUtils.h>
|
||||||
|
|
||||||
|
// debugging
|
||||||
|
//#define DBG(x)
|
||||||
|
#define DBG(x) x
|
||||||
|
#define OUT printf
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
KDiskDeviceJob::KDiskDeviceJob(uint32 type, partition_id partitionID,
|
KDiskDeviceJob::KDiskDeviceJob(uint32 type, partition_id partitionID,
|
||||||
@@ -15,6 +22,7 @@ KDiskDeviceJob::KDiskDeviceJob(uint32 type, partition_id partitionID,
|
|||||||
fPartitionID(partitionID),
|
fPartitionID(partitionID),
|
||||||
fScopeID(scopeID),
|
fScopeID(scopeID),
|
||||||
fDescription(NULL),
|
fDescription(NULL),
|
||||||
|
fErrorMessage(NULL),
|
||||||
fTaskCount(1),
|
fTaskCount(1),
|
||||||
fCompletedTasks(0),
|
fCompletedTasks(0),
|
||||||
fInterruptProperties(0),
|
fInterruptProperties(0),
|
||||||
@@ -101,6 +109,20 @@ KDiskDeviceJob::ScopeID() const
|
|||||||
return fScopeID;
|
return fScopeID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetErrorMessage
|
||||||
|
status_t
|
||||||
|
KDiskDeviceJob::SetErrorMessage(const char *message)
|
||||||
|
{
|
||||||
|
return set_string(fErrorMessage, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ErrorMessage
|
||||||
|
const char *
|
||||||
|
KDiskDeviceJob::ErrorMessage() const
|
||||||
|
{
|
||||||
|
return fErrorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
// SetTaskCount
|
// SetTaskCount
|
||||||
void
|
void
|
||||||
KDiskDeviceJob::SetTaskCount(int32 count)
|
KDiskDeviceJob::SetTaskCount(int32 count)
|
||||||
|
|||||||
Reference in New Issue
Block a user