mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 02:09:15 -04:00
turtle search is now working. Next task: update search gui
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1078 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
148c918ae1
commit
7b84b125df
26 changed files with 2329 additions and 118 deletions
|
@ -130,7 +130,7 @@ virtual bool ExtraFileMove(std::string fname, std::string hash, uint64_t size,
|
|||
virtual int RequestDirDetails(std::string uid, std::string path, DirDetails &details) = 0;
|
||||
virtual int RequestDirDetails(void *ref, DirDetails &details, uint32_t flags) = 0;
|
||||
|
||||
virtual int SearchKeywords(std::list<std::string> keywords, std::list<FileDetail> &results) = 0;
|
||||
virtual int SearchKeywords(std::list<std::string> keywords, std::list<FileDetail> &results,uint32_t flags) = 0;
|
||||
virtual int SearchBoolExp(Expression * exp, std::list<FileDetail> &results) = 0;
|
||||
|
||||
/***
|
||||
|
|
|
@ -35,6 +35,9 @@ class NotifyBase;
|
|||
class RsIface;
|
||||
class RsControl;
|
||||
class RsInit;
|
||||
#ifdef TURTLE_HOPPING
|
||||
struct TurtleFileInfo ;
|
||||
#endif
|
||||
|
||||
/* declare single RsIface for everyone to use! */
|
||||
|
||||
|
@ -200,6 +203,9 @@ class NotifyBase
|
|||
virtual void notifyErrorMsg(int list, int sev, std::string msg) { (void) list; (void) sev; (void) msg; return; }
|
||||
virtual void notifyChat() { return; }
|
||||
virtual void notifyHashingInfo(std::string fileinfo) { (void)fileinfo; return ; }
|
||||
#ifdef TURTLE_HOPPING
|
||||
virtual void notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& files) { (void)files; }
|
||||
#endif
|
||||
};
|
||||
|
||||
const int NOTIFY_LIST_NEIGHBOURS = 1;
|
||||
|
|
|
@ -35,6 +35,16 @@ extern RsTurtle *rsTurtle ;
|
|||
|
||||
typedef uint32_t TurtleRequestId ;
|
||||
|
||||
// This is the structure used to send back results of the turtle search
|
||||
// to the notifyBase class.
|
||||
|
||||
struct TurtleFileInfo
|
||||
{
|
||||
std::string hash ;
|
||||
std::string name ;
|
||||
uint64_t size ;
|
||||
};
|
||||
|
||||
// Interface class for turtle hopping.
|
||||
//
|
||||
// This class mainly interacts with the turtle router, that is responsible
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue