pollymc/libraries/systeminfo/include/sys.h

50 lines
951 B
C
Raw Normal View History

#pragma once
#include <QString>
namespace Sys
{
const uint64_t megabyte = 1024ull * 1024ull;
struct KernelInfo
{
2018-07-15 18:21:05 +05:30
QString kernelName;
QString kernelVersion;
};
KernelInfo getKernelInfo();
struct DistributionInfo
{
2018-07-15 18:21:05 +05:30
DistributionInfo operator+(const DistributionInfo& rhs) const
{
DistributionInfo out;
if(!distributionName.isEmpty())
{
out.distributionName = distributionName;
}
else
{
out.distributionName = rhs.distributionName;
}
if(!distributionVersion.isEmpty())
{
out.distributionVersion = distributionVersion;
}
else
{
out.distributionVersion = rhs.distributionVersion;
}
return out;
}
QString distributionName;
QString distributionVersion;
};
DistributionInfo getDistributionInfo();
uint64_t getSystemRam();
bool isSystem64bit();
bool isCPU64bit();
}