autoformat all sources

This commit is contained in:
2024-04-24 22:31:09 +02:00
parent e4a73556d6
commit 70dda97ae2
16 changed files with 746 additions and 752 deletions

View File

@ -14,14 +14,16 @@ class Drive
{
public:
enum TaskState {NONE,
SHRED_SELECTED,
SHRED_ACTIVE, //shred iterations active
CHECK_ACTIVE, //optional checking active
DELETE_SELECTED,
DELETE_ACTIVE,
FROZEN
} state;
enum TaskState
{
NONE,
SHRED_SELECTED,
SHRED_ACTIVE, // shred iterations active
CHECK_ACTIVE, // optional checking active
DELETE_SELECTED,
DELETE_ACTIVE,
FROZEN
} state;
struct
{
@ -31,36 +33,35 @@ public:
unsigned long ulSpeedMetricBytesWritten;
} sShredSpeed;
bool bWasShredded = false; //all shred iterations done
bool bWasChecked = false; //all shred iterations and optional checking done
bool bWasShredded = false; // all shred iterations done
bool bWasChecked = false; // all shred iterations and optional checking done
bool bWasDeleted = false;
bool bIsOffline = false;
uint32_t u32DriveChecksumAfterShredding = 0U;
private:
string sPath;
time_t u32Timestamp = 0U; //unix timestamp for detecting a frozen drive
double d32TaskPercentage = 0U; //in percent for Shred (1 to 100)
time_t u32TimestampTaskStart = 0U; //unix timestamp for duration of an action
time_t u32TaskDuration = 0U; //time needed to complete the task
time_t u32Timestamp = 0U; // unix timestamp for detecting a frozen drive
double d32TaskPercentage = 0U; // in percent for Shred (1 to 100)
time_t u32TimestampTaskStart = 0U; // unix timestamp for duration of an action
time_t u32TaskDuration = 0U; // time needed to complete the task
struct
{
string sModelFamily;
string sModelName;
string sSerial;
uint64_t u64Capacity = 0U; //in byte
uint64_t u64Capacity = 0U; // in byte
uint32_t u32ErrorCount = 0U;
uint32_t u32PowerOnHours = 0U; //in hours
uint32_t u32PowerOnHours = 0U; // in hours
uint32_t u32PowerCycles = 0U;
uint32_t u32Temperature = 0U; //in Fahrenheit, just kidding: degree Celsius
uint32_t u32Temperature = 0U; // in Fahrenheit, just kidding: degree Celsius
} sSmartData;
private:
void setTimestamp();
protected:
public:
Drive(string path)
{
@ -71,21 +72,21 @@ public:
string getModelFamily(void);
string getModelName(void);
string getSerial(void);
uint64_t getCapacity(void); //in byte
uint64_t getCapacity(void); // in byte
uint32_t getErrorCount(void);
uint32_t getPowerOnHours(void); //in hours
uint32_t getPowerOnHours(void); // in hours
uint32_t getPowerCycles(void);
uint32_t getTemperature(void); //in Fahrenheit, just kidding: degree Celsius
uint32_t getTemperature(void); // in Fahrenheit, just kidding: degree Celsius
void checkFrozenDrive(void);
void setDriveSMARTData( string modelFamily,
string modelName,
string serial,
uint64_t capacity,
uint32_t errorCount,
uint32_t powerOnHours,
uint32_t powerCycles,
uint32_t temperature);
void setDriveSMARTData(string modelFamily,
string modelName,
string serial,
uint64_t capacity,
uint32_t errorCount,
uint32_t powerOnHours,
uint32_t powerCycles,
uint32_t temperature);
string sCapacityToText();
string sErrorCountToText();
@ -101,7 +102,6 @@ public:
void calculateTaskDuration();
time_t getTaskDuration();
};
#endif // DRIVE_H_
#endif // DRIVE_H_