12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef CHANNELCONTROLS_H
- #define CHANNELCONTROLS_H
- #include <ctime>
- #include <string>
- #include <utility>
- class ChannelControls {
- public:
- /**
- * Send a file over the covert channel.
- *
- * @param fileName name of the file in the file directory
- * @return true - file will be sent | false - file was not accepted
- */
- virtual bool sendFile(const std::string &fileName) = 0;
- /**
- * Get the progress
- *
- * @return progress counters
- */
- virtual std::pair<uint32_t, uint32_t> getProgress() = 0;
- /**
- * Get the transfer start time
- *
- * @return start time of the transfer
- */
- virtual std::time_t getTransferStart();
- /**
- * Test if a transfer is running
- *
- * @return true - a transfer runs | false - no transfer runs
- */
- virtual bool isTransferRunning() = 0;
- protected:
- /**
- * Time when the transfer was started with sendFile
- */
- std::time_t transferStart;
- };
- #endif
|