123456789101112131415161718192021222324252627282930313233343536373839 |
- #ifndef FILEMAN_H
- #define FILEMAN_H
- #include <fstream>
- #include <string>
- #include <vector>
- #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<char> data);
- std::vector<char> readPut();
- int getPutChunks();
- };
- #endif
|