blob: 086c1322a8de1d7b3d7c15573de6b3b7c557a8eb [file] [log] [blame]
Lakshminarayana R. Kammath27693a42019-06-24 00:51:47 -05001#pragma once
2
3#include "pldm_base_cmd.hpp"
4
5#include <functional>
6#include <map>
7#include <string>
8#include <typeindex>
9
10using Cmd = std::string;
11using Args = std::vector<std::string>;
12class Handler
13{
14 public:
15 const std::map<Cmd, std::function<void(Args&&)>> dispatcher{
16 {"GetPLDMTypes",
17 [](Args&& args) { return getPLDMTypes(std::move(args)); }},
18 {"GetPLDMVersion",
Lakshminarayana R. Kammath58229b22019-08-09 06:30:04 -050019 [](Args&& args) { return getPLDMVersion(std::move(args)); }},
20 {"HandleRawOp",
21 [](Args&& args) { return handleRawOp(std::move(args)); }}};
Lakshminarayana R. Kammath27693a42019-06-24 00:51:47 -050022};