estoraged.hpp (972c3faae9092f8a513222d0b24c36ad79f4119f) estoraged.hpp (82897c35761f505c2b881f72c61f726f7d562692)
1#pragma once
2
3#include "cryptsetupInterface.hpp"
4#include "filesystemInterface.hpp"
5
6#include <libcryptsetup.h>
7
8#include <sdbusplus/bus.hpp>

--- 12 unchanged lines hidden (view full) ---

21using eStoragedInherit = sdbusplus::server::object_t<
22 sdbusplus::xyz::openbmc_project::Inventory::Item::server::Volume>;
23using estoraged::Cryptsetup;
24using estoraged::Filesystem;
25
26/** @class eStoraged
27 * @brief eStoraged object to manage a LUKS encrypted storage device.
28 */
1#pragma once
2
3#include "cryptsetupInterface.hpp"
4#include "filesystemInterface.hpp"
5
6#include <libcryptsetup.h>
7
8#include <sdbusplus/bus.hpp>

--- 12 unchanged lines hidden (view full) ---

21using eStoragedInherit = sdbusplus::server::object_t<
22 sdbusplus::xyz::openbmc_project::Inventory::Item::server::Volume>;
23using estoraged::Cryptsetup;
24using estoraged::Filesystem;
25
26/** @class eStoraged
27 * @brief eStoraged object to manage a LUKS encrypted storage device.
28 */
29class eStoraged : eStoragedInherit
29class EStoraged : eStoragedInherit
30{
31 public:
32 /** @brief Constructor for eStoraged
33 *
34 * @param[in] bus - sdbusplus dbus object
35 * @param[in] path - DBus object path
36 * @param[in] devPath - path to device file, e.g. /dev/mmcblk0
37 * @param[in] luksName - name for the LUKS container
38 * @param[in] cryptInterface - (optional) pointer to CryptsetupInterface
39 * object
40 * @param[in] fsInterface - (optional) pointer to FilesystemInterface
41 * object
42 */
30{
31 public:
32 /** @brief Constructor for eStoraged
33 *
34 * @param[in] bus - sdbusplus dbus object
35 * @param[in] path - DBus object path
36 * @param[in] devPath - path to device file, e.g. /dev/mmcblk0
37 * @param[in] luksName - name for the LUKS container
38 * @param[in] cryptInterface - (optional) pointer to CryptsetupInterface
39 * object
40 * @param[in] fsInterface - (optional) pointer to FilesystemInterface
41 * object
42 */
43 eStoraged(sdbusplus::bus::bus& bus, const char* path,
43 EStoraged(sdbusplus::bus::bus& bus, const char* path,
44 const std::string& devPath, const std::string& luksName,
45 std::unique_ptr<CryptsetupInterface> cryptInterface =
46 std::make_unique<Cryptsetup>(),
47 std::unique_ptr<FilesystemInterface> fsInterface =
48 std::make_unique<Filesystem>()) :
49 eStoragedInherit(bus, path),
50 devPath(devPath), containerName(luksName),
51 mountPoint("/mnt/" + luksName + "_fs"),

--- 97 unchanged lines hidden ---
44 const std::string& devPath, const std::string& luksName,
45 std::unique_ptr<CryptsetupInterface> cryptInterface =
46 std::make_unique<Cryptsetup>(),
47 std::unique_ptr<FilesystemInterface> fsInterface =
48 std::make_unique<Filesystem>()) :
49 eStoragedInherit(bus, path),
50 devPath(devPath), containerName(luksName),
51 mountPoint("/mnt/" + luksName + "_fs"),

--- 97 unchanged lines hidden ---