// Copyright Leon Freist // Author Leon Freist #pragma once #include #include #include #include namespace hwinfo { // Linux always considers sectors to be 512 bytes long independently of the devices real block size. const unsigned short block_size = 512; class HWINFO_API Disk { friend std::vector getAllDisks(); public: ~Disk() = default; HWI_NODISCARD const std::string& vendor() const; HWI_NODISCARD const std::string& model() const; HWI_NODISCARD const std::string& serialNumber() const; HWI_NODISCARD int64_t size_Bytes() const; HWI_NODISCARD int id() const; private: Disk() = default; std::string _vendor; std::string _model; std::string _serialNumber; int64_t _size_Bytes{-1}; int _id{-1}; }; std::vector getAllDisks(); } // namespace hwinfo