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 ScopeID() const;
|
||||
|
||||
status_t SetErrorMessage(const char *message);
|
||||
const char *ErrorMessage() const;
|
||||
|
||||
void SetTaskCount(int32 count);
|
||||
int32 TaskCount() const;
|
||||
|
||||
@@ -66,6 +69,7 @@ private:
|
||||
partition_id fPartitionID;
|
||||
partition_id fScopeID;
|
||||
char *fDescription;
|
||||
char *fErrorMessage;
|
||||
int32 fTaskCount;
|
||||
int32 fCompletedTasks;
|
||||
uint32 fInterruptProperties;
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
// KDiskDeviceJob.cpp
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ddm_userland_interface.h"
|
||||
|
||||
#include "KDiskDeviceJob.h"
|
||||
#include "KDiskDeviceUtils.h"
|
||||
#include <KDiskDeviceJob.h>
|
||||
#include <KDiskDeviceUtils.h>
|
||||
|
||||
// debugging
|
||||
//#define DBG(x)
|
||||
#define DBG(x) x
|
||||
#define OUT printf
|
||||
|
||||
// constructor
|
||||
KDiskDeviceJob::KDiskDeviceJob(uint32 type, partition_id partitionID,
|
||||
@@ -15,6 +22,7 @@ KDiskDeviceJob::KDiskDeviceJob(uint32 type, partition_id partitionID,
|
||||
fPartitionID(partitionID),
|
||||
fScopeID(scopeID),
|
||||
fDescription(NULL),
|
||||
fErrorMessage(NULL),
|
||||
fTaskCount(1),
|
||||
fCompletedTasks(0),
|
||||
fInterruptProperties(0),
|
||||
@@ -101,6 +109,20 @@ KDiskDeviceJob::ScopeID() const
|
||||
return fScopeID;
|
||||
}
|
||||
|
||||
// SetErrorMessage
|
||||
status_t
|
||||
KDiskDeviceJob::SetErrorMessage(const char *message)
|
||||
{
|
||||
return set_string(fErrorMessage, message);
|
||||
}
|
||||
|
||||
// ErrorMessage
|
||||
const char *
|
||||
KDiskDeviceJob::ErrorMessage() const
|
||||
{
|
||||
return fErrorMessage;
|
||||
}
|
||||
|
||||
// SetTaskCount
|
||||
void
|
||||
KDiskDeviceJob::SetTaskCount(int32 count)
|
||||
|
||||
Reference in New Issue
Block a user