Patrick Venture | f085d91 | 2019-03-15 08:50:00 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <cstdint> |
| 4 | #include <string> |
| 5 | #include <tuple> |
| 6 | |
| 7 | namespace google |
| 8 | { |
| 9 | namespace ipmi |
| 10 | { |
| 11 | |
| 12 | class HandlerInterface |
| 13 | { |
| 14 | public: |
| 15 | virtual ~HandlerInterface() = default; |
| 16 | |
| 17 | /** |
| 18 | * Return ethernet details (hard-coded). |
| 19 | * |
| 20 | * @return tuple of ethernet details (channel, if name). |
| 21 | */ |
| 22 | virtual std::tuple<std::uint8_t, std::string> getEthDetails() const = 0; |
| 23 | }; |
| 24 | |
| 25 | class Handler : public HandlerInterface |
| 26 | { |
| 27 | public: |
| 28 | Handler() = default; |
| 29 | ~Handler() = default; |
| 30 | |
| 31 | std::tuple<std::uint8_t, std::string> getEthDetails() const override; |
| 32 | }; |
| 33 | |
| 34 | extern Handler handlerImpl; |
| 35 | |
| 36 | } // namespace ipmi |
| 37 | } // namespace google |