added states for tasks

This commit is contained in:
2020-08-09 21:41:28 +02:00
parent f4726bf08c
commit c2ab7c1c7f
6 changed files with 203 additions and 32 deletions

View File

@ -12,6 +12,29 @@
class Drive
{
public:
enum TaskState {NONE,
SHRED_SELECTED,
SHRED_ACTIVE,
SHRED_FINISHED,
DELETE_SELECTED,
DELETE_ACTIVE,
DELETE_FINISHED
} state;
private:
string sPath;
string sModelFamily;
string sModelName;
string sSerial;
uint64_t u64Capacity = 0U; //in byte
uint32_t u32ErrorCount = 0U;
uint32_t u32PowerOnHours = 0U; //in hours
uint32_t u32PowerCycles = 0U;
uint8_t u8TaskPercentage = 0U; //in percent for Shred (1 to 100) and Delete (1 OR 100)
protected:
public:
@ -42,18 +65,11 @@ public:
string sPowerOnHoursToText();
string sPowerCyclesToText();
void setTaskPercentage(uint8_t u8TaskPercentage);
uint8_t getTaskPercentage(void);
private:
string sPath;
string sModelFamily;
string sModelName;
string sSerial;
uint64_t u64Capacity = 0U; //in byte
uint32_t u32ErrorCount = 0U;
uint32_t u32PowerOnHours = 0U; //in hours
uint32_t u32PowerCycles = 0U;
uint32_t u32ShredPercentage = 0U; //in percent
};