30 lines
696 B
C++
30 lines
696 B
C++
#pragma once
|
|
#include "scannersysinfo.h"
|
|
#include "json.hpp"
|
|
|
|
using json=nlohmann::json;
|
|
|
|
struct fileSystem_info{
|
|
char fileSystem_format[8];
|
|
unsigned int fileSystem_total_capacity;
|
|
unsigned int fileSystem_free_capacity;
|
|
char fileSystem_permissions[3];
|
|
};
|
|
|
|
|
|
class SysInforTool
|
|
{
|
|
public:
|
|
SysInforTool(ScannerSysInfo tinfo);
|
|
~SysInforTool();
|
|
std::string GetSysInfo();
|
|
ScannerSysInfo& GetInfo();
|
|
unsigned int GetMemTotal();
|
|
bool IsSmallRam();
|
|
private:
|
|
int get_fileSystem_info(const char *fileSystem_name,struct fileSystem_info *fi);
|
|
void struct2json(json& j,ScannerSysInfo& info);
|
|
private:
|
|
ScannerSysInfo m_sysinfo;
|
|
};
|