mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 03:52:39 -04:00
added methods to get files from hash(hash) in directory_storage and ftServer
This commit is contained in:
parent
2d72b88130
commit
0387a28e78
9 changed files with 122 additions and 44 deletions
|
@ -242,6 +242,20 @@ protected:
|
|||
int handleIncoming() ;
|
||||
bool handleCacheData() ;
|
||||
|
||||
/*!
|
||||
* \brief sendTurtleItem
|
||||
* Sends the given item into a turtle tunnel, possibly encrypting it if the type of tunnel requires it, which is known from the hash itself.
|
||||
* \param peerId Peer id to send to (this is a virtual peer id from turtle service)
|
||||
* \param hash hash of the file. If the item needs to be encrypted
|
||||
* \param item item to send.
|
||||
* \return
|
||||
* true if everything goes right
|
||||
*/
|
||||
bool sendTurtleItem(const RsPeerId& peerId,const RsFileHash& hash,RsTurtleGenericTunnelItem *item);
|
||||
|
||||
// fnds out what is the real hash of encrypted hash hash
|
||||
bool findRealHash(const RsFileHash& hash, RsFileHash& real_hash);
|
||||
|
||||
private:
|
||||
|
||||
/**** INTERNAL FUNCTIONS ***/
|
||||
|
@ -266,6 +280,8 @@ private:
|
|||
std::string mConfigPath;
|
||||
std::string mDownloadPath;
|
||||
std::string mPartialsPath;
|
||||
|
||||
std::map<RsFileHash,RsFileHash> mEncryptedHashes ; // This map is such that sha1(it->second) = it->first
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue