1 /* 2 * Copyright 2017, Adrien Destugues, pulkomandy@pulkomandy.tk 3 * Distributed under terms of the MIT license. 4 */ 5 6 7 #ifndef FILESENDER_H 8 #define FILESENDER_H 9 10 11 #include <stdint.h> 12 #include <string.h> 13 14 15 class BDataIO; 16 class BHandler; 17 class BSerialPort; 18 19 20 class FileSender { 21 public: 22 virtual ~FileSender(); 23 virtual bool BytesReceived(const uint8_t* data, 24 size_t length) = 0; 25 }; 26 27 28 class RawSender: public FileSender { 29 public: 30 RawSender(BDataIO* source, BSerialPort* sink, 31 BHandler* listener); 32 virtual ~RawSender(); 33 34 virtual bool BytesReceived(const uint8_t* data, 35 size_t length); 36 37 }; 38 39 40 #endif /* !FILESENDER_H */ 41