blob: 81581165b8d053d9d76a6d270ab85c56eda6613f [file] [log] [blame]
George Liuff92ffe2021-02-09 15:01:53 +08001#pragma once
2
3#include "config.h"
4
George Liuff92ffe2021-02-09 15:01:53 +08005#include <filesystem>
6#include <string>
7#include <vector>
8
9namespace fs = std::filesystem;
George Liuff92ffe2021-02-09 15:01:53 +080010
11namespace phosphor
12{
13namespace dump
14{
15namespace ramoops
16{
17
18/** @class Manager
19 * @brief OpenBMC Core manager implementation.
20 */
21class Manager
22{
23 public:
24 Manager() = delete;
25 Manager(const Manager&) = default;
26 Manager& operator=(const Manager&) = delete;
27 Manager(Manager&&) = delete;
28 Manager& operator=(Manager&&) = delete;
29 virtual ~Manager() = default;
30
31 /** @brief Constructor to create ramoops
32 * @param[in] filePath - Path where the ramoops are stored.
33 */
34 Manager(const std::string& filePath);
35
36 private:
37 /** @brief Helper function for initiating dump request using
Dhruvaraj Subhashchandran1615b822023-05-31 15:29:15 -050038 * createDump D-Bus interface.
George Liuff92ffe2021-02-09 15:01:53 +080039 * @param [in] files - ramoops files list
40 */
41 void createHelper(const std::vector<std::string>& files);
Andrew Geissler7d069302023-11-09 13:25:31 -060042
43 /** @brief Create an error indicating ramoops was found
44 *
45 */
46 void createError();
George Liuff92ffe2021-02-09 15:01:53 +080047};
48
49} // namespace ramoops
50} // namespace dump
51} // namespace phosphor