2016-11-20 17:02:27 +05:30
|
|
|
#pragma once
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
namespace Sys
|
|
|
|
{
|
2017-07-12 02:13:35 +05:30
|
|
|
const uint64_t megabyte = 1024ull * 1024ull;
|
2016-11-26 06:48:05 +05:30
|
|
|
struct KernelInfo
|
|
|
|
{
|
2018-07-15 18:21:05 +05:30
|
|
|
QString kernelName;
|
|
|
|
QString kernelVersion;
|
2016-11-26 06:48:05 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
KernelInfo getKernelInfo();
|
2016-11-22 05:27:15 +05:30
|
|
|
|
2018-03-12 03:30:54 +05:30
|
|
|
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;
|
2018-03-12 03:30:54 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
DistributionInfo getDistributionInfo();
|
|
|
|
|
2016-11-22 05:27:15 +05:30
|
|
|
uint64_t getSystemRam();
|
|
|
|
|
|
|
|
bool isSystem64bit();
|
|
|
|
|
|
|
|
bool isCPU64bit();
|
2016-11-20 17:02:27 +05:30
|
|
|
}
|