Patrick Venture | 7dc4670 | 2018-08-08 09:43:33 -0700 | [diff] [blame^] | 1 | #pragma once |
| 2 | |
| 3 | #include <fstream> |
| 4 | |
| 5 | // Abstract Base Class for the Data Interface. |
| 6 | // The DataInterface defines the required methods for sending data down through |
| 7 | // a data channel. This can allow the data to be written anywhere as long as |
| 8 | // the BMC side knows how to read it. The data can also be sent down over IPMI |
| 9 | // however, it still must follow this interface. |
| 10 | class DataInterface |
| 11 | { |
| 12 | public: |
| 13 | virtual ~DataInterface() = default; |
| 14 | |
| 15 | /* Try to send the file data. |
| 16 | * @param[in] input : File stream containing the data content to be |
| 17 | * transmitted |
| 18 | * @param[in] command : The command corresponding to the data. |
| 19 | */ |
| 20 | virtual void SendData(std::ifstream input, int command) = 0; |
| 21 | |
| 22 | /* Return true if your data is carried outside the IPMI channel. */ |
| 23 | virtual bool External() = 0; |
| 24 | }; |