123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef FOUNDATION_SETTINGS_SYSTEM_SETTINGS_H
- #define FOUNDATION_SETTINGS_SYSTEM_SETTINGS_H
- #include <string>
- #include <vector>
- namespace settings {
- class SystemSettings {
- public:
- SystemSettings() = default;
- bool UpdateSysInfo();
- /// @brief
- /// @return
- bool UpdateDiskInfo();
- bool UpdateMemInfo();
- void UpdateNetDev();
- int totalDiskSpace;
- int freeDiskSpace;
- int totalMemory;
- int freeMemory;
- std::string appVer;
- std::string sysVer;
- std::string sysTime;
- std::string upgradeTime;
- std::string updateConfigTime;
- struct NetCard {
- std::string ifname;
- std::string ipAddr;
- std::string MAC;
- std::string mask;
- std::string gateway;
- int32_t rxPackets;
- int32_t rxBytes;
- int32_t rxErrs;
- int32_t rxDrop;
- int32_t rxFifoErr;
- int32_t rxFrameErr;
- int32_t rxCompressed;
- int32_t rxMulticast;
- int32_t txPackets;
- int32_t txBytes;
- int32_t txErrs;
- int32_t txDrop;
- int32_t txFifoErr;
- int32_t txCollisionErr;
- int32_t txCompressed;
- int32_t txCarrierErr;
- };
- std::vector<NetCard> netCards;
- };
- } // namespace settings
- #endif // FOUNDATION_SETTINGS_SYSTEM_SETTINGS_H
|