blob: 822400344be036f9ccf5cec1e5b101ecd02b6a9f [file] [log] [blame]
John Edward Broadbent7f2ab642021-11-11 21:00:38 -08001#pragma once
John Edward Broadbente6ffe702021-10-14 14:03:11 -07002#include <string>
3
John Edward Broadbentd3bfa7b2022-01-13 17:41:32 -08004namespace estoraged
5{
John Edward Broadbente6ffe702021-10-14 14:03:11 -07006/** @class Erase
7 * @brief Erase object provides a base class for the specific erase types
8 */
9class Erase
10{
11 public:
12 /** @brief creates an erase object
13 * @param inDevPath the linux path for the block device
14 */
15 Erase(std::string_view inDevPath) : devPath(inDevPath)
16 {}
John Edward Broadbent7f2ab642021-11-11 21:00:38 -080017 virtual ~Erase() = default;
John Edward Broadbente6ffe702021-10-14 14:03:11 -070018
19 /** @brief finds the size of the linux block device in bytes
20 * @return size of a block device using the devPath
21 */
22 uint64_t findSizeOfBlockDevice();
23
24 protected:
25 /* The linux path for the block device */
26 std::string devPath;
27};
John Edward Broadbentd3bfa7b2022-01-13 17:41:32 -080028
29} // namespace estoraged