removed some unused code

This commit is contained in:
mr-alice 2016-09-18 21:16:25 +02:00
parent de104d3e34
commit e4568a896f
3 changed files with 13 additions and 26 deletions

View File

@ -314,7 +314,7 @@ void HashStorage::locked_save()
return ;
}
std::cerr << mFiles.size() << " Entries saved." << std::endl;
std::cerr << mFiles.size() << " entries saved in hash cache." << std::endl;
free(data) ;
}
@ -356,9 +356,10 @@ bool HashStorage::writeHashStorageInfo(unsigned char *& data,uint32_t& total_si
// now write the whole string into a single section in the file
if(!FileListIO::writeField(data,total_size,offset,FILE_LIST_IO_TAG_HASH_STORAGE_ENTRY,section_data,section_offset)) return false ;
#ifdef HASHSTORAGE_DEBUG
std::cerr << "Writing hash storage section " << RsUtil::BinToHex(section_data,section_offset) << std::endl;
std::cerr << "Info.filename = " << info.filename << std::endl;
#endif
free(section_data) ;
return true;

View File

@ -773,11 +773,11 @@ int p3FileDatabase::RequestDirDetails(const RsPeerId& uid,const std::string& pat
NOT_IMPLEMENTED();
return 0;
}
int p3FileDatabase::RequestDirDetails(const std::string& path, DirDetails &details) const
{
NOT_IMPLEMENTED();
return 0;
}
//int p3FileDatabase::RequestDirDetails(const std::string& path, DirDetails &details) const
//{
// NOT_IMPLEMENTED();
// return 0;
//}
uint32_t p3FileDatabase::getType(void *ref) const
{
RS_STACK_MUTEX(mFLSMtx) ;
@ -830,16 +830,6 @@ uint32_t p3FileDatabase::watchPeriod()
RS_STACK_MUTEX(mFLSMtx) ;
return mLocalDirWatcher->fileWatchPeriod();
}
bool p3FileDatabase::findLocalFile(const RsFileHash& hash,FileSearchFlags flags,const RsPeerId& peer_id, std::string &fullpath, uint64_t &size,FileStorageFlags& storage_flags,std::list<std::string>& parent_groups) const
{
RS_STACK_MUTEX(mFLSMtx) ;
std::list<EntryIndex> firesults;
mLocalSharedDirs->searchHash(hash,firesults) ;
NOT_IMPLEMENTED();
return false;
}
int p3FileDatabase::SearchKeywords(const std::list<std::string>& keywords, std::list<DirDetails>& results,FileSearchFlags flags,const RsPeerId& client_peer_id)
{

View File

@ -98,15 +98,10 @@ class p3FileDatabase: public p3Service, public p3Config, public ftSearch //, pub
//
virtual int tick() ;
// access to own/remote shared files
//
virtual bool findLocalFile(const RsFileHash& hash,FileSearchFlags flags,const RsPeerId& peer_id, std::string &fullpath, uint64_t &size,FileStorageFlags& storage_flags,std::list<std::string>& parent_groups) const;
virtual int SearchKeywords(const std::list<std::string>& keywords, std::list<DirDetails>& results,FileSearchFlags flags,const RsPeerId& peer_id) ;
virtual int SearchBoolExp(RsRegularExpression::Expression *exp, std::list<DirDetails>& results,FileSearchFlags flags,const RsPeerId& peer_id) const ;
// ftSearch
virtual bool search(const RsFileHash &hash, FileSearchFlags hintflags, FileInfo &info) const;
virtual int SearchKeywords(const std::list<std::string>& keywords, std::list<DirDetails>& results,FileSearchFlags flags,const RsPeerId& peer_id) ;
virtual int SearchBoolExp(RsRegularExpression::Expression *exp, std::list<DirDetails>& results,FileSearchFlags flags,const RsPeerId& peer_id) const ;
// Interface for browsing dir hierarchy
//
@ -114,8 +109,6 @@ class p3FileDatabase: public p3Service, public p3Config, public ftSearch //, pub
void stopThreads() ;
void startThreads() ;
int RequestDirDetails(const RsPeerId& uid, const std::string& path, DirDetails &details)const;
int RequestDirDetails(const std::string& path, DirDetails &details) const ;
bool findChildPointer(void *ref, int row, void *& result, FileSearchFlags flags) const;
// void * here is the type expected by the abstract model index from Qt. It gets turned into a DirectoryStorage::EntryIndex internally.
@ -124,6 +117,9 @@ class p3FileDatabase: public p3Service, public p3Config, public ftSearch //, pub
int RequestDirDetails(void *, DirDetails&, FileSearchFlags) const ;
uint32_t getType(void *) const ;
// proxy method used by the web UI.
int RequestDirDetails(const RsPeerId& uid, const std::string& path, DirDetails &details)const;
// set/update shared directories
void setSharedDirectories(const std::list<SharedDirInfo>& dirs);