mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-23 08:11:24 -04:00
re-wrote ftfileprovider / ftfilecreator to be more simple and robust.
re-wrote associated tests to be more robust. added new fttransfermoduletest.cc git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@760 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
26661ffb1c
commit
ef9bb372b4
10 changed files with 573 additions and 786 deletions
|
@ -40,15 +40,18 @@ class ftFileProvider
|
|||
public:
|
||||
ftFileProvider(std::string path, uint64_t size, std::string hash);
|
||||
virtual ~ftFileProvider();
|
||||
|
||||
virtual bool getFileData(uint64_t offset, uint32_t chunk_size, void *data);
|
||||
virtual bool FileDetails(FileInfo &info);
|
||||
std::string getHash();
|
||||
uint64_t getFileSize();
|
||||
bool fileOk();
|
||||
|
||||
|
||||
protected:
|
||||
virtual int initializeFileAttrs();
|
||||
uint64_t total_size;
|
||||
virtual int initializeFileAttrs(); /* does for both */
|
||||
|
||||
uint64_t mSize;
|
||||
std::string hash;
|
||||
std::string file_name;
|
||||
FILE *fd;
|
||||
|
@ -65,7 +68,7 @@ protected:
|
|||
/*
|
||||
* Mutex Required for stuff below
|
||||
*/
|
||||
RsMutex ftPMutex;
|
||||
RsMutex ftcMutex;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue