cacic_hardware.h
1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef CACIC_HARDWARE_H
#define CACIC_HARDWARE_H
#include <ccacic.h>
#include <QtCore>
#include <QJsonArray>
#include <cmath>
#include <ccacic.h>
#include <console.h>
#include <operatingsystem.h>
#ifdef Q_OS_WIN
#include <wmi.h>
#elif defined(Q_OS_LINUX)
#include <unistd.h>
#endif
class cacic_hardware
{
public:
cacic_hardware();
void iniciaColeta();
QJsonObject toJsonObject();
private:
#ifdef Q_OS_WIN
QJsonObject coletaWin();
#elif defined(Q_OS_LINUX)
ConsoleObject console;
QJsonObject coletaLinux();
void coletaLinuxMem(QJsonObject &hardware, const QJsonObject &component);
void coletaLinuxCpu(QJsonObject &hardware, const QJsonObject &component);
void coletaLinuxPci(QJsonObject &hardware, const QJsonObject &pciJson);
void coletaLinuxBios(QJsonObject &hardware);
void coletaLinuxMotherboard(QJsonObject &hardware);
void coletaLinuxIsNotebook(QJsonObject &hardware);
void coletaLinuxPrinters(QJsonObject &hardware);
#endif
CCacic oCacic;
QJsonObject coletaHardware;
};
#endif // CACIC_HARDWARE_H