mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-27 15:47:30 -04:00
basic infrastructure for banning unwanted file content
This commit is contained in:
parent
7bdc61e3e3
commit
50e03a539c
9 changed files with 146 additions and 25 deletions
|
@ -192,6 +192,10 @@ public:
|
|||
virtual int SearchBoolExp(RsRegularExpression::Expression * exp, std::list<DirDetails> &results,FileSearchFlags flags,const RsPeerId& peer_id);
|
||||
virtual int getSharedDirStatistics(const RsPeerId& pid, SharedDirStats& stats) ;
|
||||
|
||||
virtual int banFile(const RsFileHash& real_file_hash, const std::string& filename, uint64_t file_size) ;
|
||||
virtual int unbanFile(const RsFileHash& real_file_hash);
|
||||
virtual bool getPrimaryBannedFilesList(std::map<RsFileHash,BannedFileEntry>& banned_files) ;
|
||||
|
||||
/***
|
||||
* Utility Functions
|
||||
***/
|
||||
|
@ -237,6 +241,8 @@ public:
|
|||
virtual bool ignoreDuplicates() ;
|
||||
virtual void setIgnoreDuplicates(bool ignore) ;
|
||||
|
||||
static bool encryptHash(const RsFileHash& hash, RsFileHash& hash_of_hash);
|
||||
|
||||
/***************************************************************/
|
||||
/*************** Data Transfer Interface ***********************/
|
||||
/***************************************************************/
|
||||
|
@ -282,7 +288,6 @@ protected:
|
|||
// fnds out what is the real hash of encrypted hash hash
|
||||
bool findRealHash(const RsFileHash& hash, RsFileHash& real_hash);
|
||||
bool findEncryptedHash(const RsPeerId& virtual_peer_id, RsFileHash& encrypted_hash);
|
||||
bool encryptHash(const RsFileHash& hash, RsFileHash& hash_of_hash);
|
||||
|
||||
bool checkUploadLimit(const RsPeerId& pid,const RsFileHash& hash);
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue