sneedmc/libraries/systeminfo/include/sys.h
Petr Mrázek 82208be49e NOISSUE add linux distro name and release stats to analytics
Hopefully this can serve as some sort of guideline for focusing
effort towards the right distro packages to make.
2018-03-13 00:28:51 +01:00

50 lines
810 B
C++

#pragma once
#include <QString>
namespace Sys
{
const uint64_t megabyte = 1024ull * 1024ull;
struct KernelInfo
{
QString kernelName;
QString kernelVersion;
};
KernelInfo getKernelInfo();
struct DistributionInfo
{
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();
}