forked from ibm-openbmc/phosphor-debug-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdump_internal.hpp
62 lines (52 loc) · 1.6 KB
/
dump_internal.hpp
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
#include "xyz/openbmc_project/Dump/Internal/Create/server.hpp"
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server/object.hpp>
namespace phosphor
{
namespace dump
{
namespace bmc
{
class Manager;
namespace internal
{
using CreateIface = sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Dump::Internal::server::Create>;
using Mgr = phosphor::dump::bmc::Manager;
/** @class Manager
* @brief Implementation for the
* xyz.openbmc_project.Dump.Internal.Create DBus API.
*/
class Manager : public CreateIface
{
public:
Manager() = delete;
Manager(const Manager&) = delete;
Manager& operator=(const Manager&) = delete;
Manager(Manager&&) = delete;
Manager& operator=(Manager&&) = delete;
virtual ~Manager() = default;
/** @brief Constructor to put object onto bus at a dbus path.
* @param[in] bus - Bus to attach to.
* @param[in] dumpMgr - Dump Manager object
* @param[in] path - Path to attach at.
*/
Manager(sdbusplus::bus::bus& bus, Mgr& dumpMgr, const char* path) :
CreateIface(bus, path), dumpMgr(dumpMgr){};
/** @brief Implementation for Create
* Create BMC Dump based on the Dump type.
*
* @param[in] type - Type of the Dump.
* @param[in] fullPaths - List of absolute paths to the files
* to be included as part of Dump package.
*/
void create(Type type, std::vector<std::string> fullPaths) override;
private:
/** @brief Dump Manager object. */
Mgr& dumpMgr;
};
} // namespace internal
} // namespace bmc
} // namespace dump
} // namespace phosphor