#ifndef FILEMAN_H #define FILEMAN_H #include #include #include #define BLOCKSIZE 8 class FileMan { private: std::ifstream putfile; std::ofstream getfile; std::string getname, putname; const unsigned int max_read_len = 8; unsigned int putchunks; public: FileMan(); ~FileMan(); bool isGetting(); bool isPutting(); bool openPut(const std::string &name); bool openGet(const std::string &name); void closePut(); void closeGet(); std::string getPutName(); std::string getGetName(); // closes and deletes getfile void cancelGet(); void writeGet(std::vector data); std::vector readPut(); int getPutChunks(); }; #endif