mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
added quick and dirty turtle search for channels in Files search tab
This commit is contained in:
parent
be1e127a93
commit
7a135c5c43
10 changed files with 86 additions and 44 deletions
|
@ -764,6 +764,8 @@ protected:
|
|||
*/
|
||||
int createMessage(RsNxsMsg* msg);
|
||||
|
||||
RsNetworkExchangeService *netService() const { return mNetService ; }
|
||||
|
||||
private:
|
||||
/*!
|
||||
* convenience function to create sign
|
||||
|
|
|
@ -5103,13 +5103,13 @@ bool RsGxsNetService::locked_stampMsgServerUpdateTS(const RsGxsGroupId& gid)
|
|||
return true;
|
||||
}
|
||||
|
||||
void RsGxsNetService::turtleGroupRequest(const RsGxsGroupId& group_id)
|
||||
TurtleRequestId RsGxsNetService::turtleGroupRequest(const RsGxsGroupId& group_id)
|
||||
{
|
||||
mGxsNetTunnel->turtleGroupRequest(group_id,this) ;
|
||||
return mGxsNetTunnel->turtleGroupRequest(group_id,this) ;
|
||||
}
|
||||
void RsGxsNetService::turtleSearchRequest(const std::string& match_string)
|
||||
TurtleRequestId RsGxsNetService::turtleSearchRequest(const std::string& match_string)
|
||||
{
|
||||
mGxsNetTunnel->turtleSearchRequest(match_string,this) ;
|
||||
return mGxsNetTunnel->turtleSearchRequest(match_string,this) ;
|
||||
}
|
||||
|
||||
static bool termSearch(const std::string& src, const std::string& substring)
|
||||
|
|
|
@ -127,8 +127,8 @@ public:
|
|||
* These four methods are used to request distant search and receive the results.
|
||||
* \param group_id
|
||||
*/
|
||||
virtual void turtleGroupRequest(const RsGxsGroupId& group_id);
|
||||
virtual void turtleSearchRequest(const std::string& match_string);
|
||||
virtual TurtleRequestId turtleGroupRequest(const RsGxsGroupId& group_id);
|
||||
virtual TurtleRequestId turtleSearchRequest(const std::string& match_string);
|
||||
|
||||
virtual bool search(const std::string& substring,std::list<RsGxsGroupSummary>& group_infos) ;
|
||||
|
||||
|
|
|
@ -958,7 +958,7 @@ TurtleRequestId RsGxsNetTunnelService::turtleGroupRequest(const RsGxsGroupId& gr
|
|||
|
||||
TurtleRequestId RsGxsNetTunnelService::turtleSearchRequest(const std::string& match_string,RsNetworkExchangeService *client_service)
|
||||
{
|
||||
GXS_NET_TUNNEL_DEBUG() << ": starting a turtle search request for string\"" << match_string << "\"" << std::endl;
|
||||
GXS_NET_TUNNEL_DEBUG() << ": starting a turtle search request for string \"" << match_string << "\"" << std::endl;
|
||||
|
||||
RsGxsNetTunnelTurtleSearchSubstringItem search_item ;
|
||||
search_item.substring_match = match_string ;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "services/p3service.h"
|
||||
#include "retroshare/rsreputations.h"
|
||||
#include "retroshare/rsidentity.h"
|
||||
#include "retroshare/rsturtle.h"
|
||||
#include "rsgds.h"
|
||||
|
||||
/*!
|
||||
|
@ -102,8 +103,8 @@ public:
|
|||
virtual uint32_t getDefaultSyncAge() =0;
|
||||
virtual uint32_t getDefaultKeepAge() =0;
|
||||
|
||||
virtual void turtleGroupRequest(const RsGxsGroupId& group_id)=0;
|
||||
virtual void turtleSearchRequest(const std::string& match_string)=0;
|
||||
virtual TurtleRequestId turtleGroupRequest(const RsGxsGroupId& group_id)=0;
|
||||
virtual TurtleRequestId turtleSearchRequest(const std::string& match_string)=0;
|
||||
|
||||
virtual bool search(const std::string& substring,std::list<RsGxsGroupSummary>& group_infos) =0;
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "retroshare/rstokenservice.h"
|
||||
#include "retroshare/rsgxsifacehelper.h"
|
||||
#include "retroshare/rsgxscommon.h"
|
||||
#include "retroshare/rsturtle.h"
|
||||
|
||||
|
||||
|
||||
|
@ -96,8 +97,8 @@ virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &p
|
|||
//virtual bool createComment(uint32_t &token, RsGxsComment &comment) = 0;
|
||||
//virtual bool createVote(uint32_t &token, RsGxsVote &vote) = 0;
|
||||
|
||||
virtual void turtleGroupRequest(const RsGxsGroupId& group_id)=0;
|
||||
virtual void turtleSearchRequest(const std::string& match_string)=0;
|
||||
virtual TurtleRequestId turtleGroupRequest(const RsGxsGroupId& group_id)=0;
|
||||
virtual TurtleRequestId turtleSearchRequest(const std::string& match_string)=0;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;
|
||||
|
|
|
@ -1695,10 +1695,12 @@ void p3GxsChannels::handle_event(uint32_t event_type, const std::string &elabel)
|
|||
}
|
||||
}
|
||||
|
||||
void p3GxsChannels::turtleGroupRequest(const RsGxsGroupId& group_id)
|
||||
TurtleRequestId p3GxsChannels::turtleGroupRequest(const RsGxsGroupId& group_id)
|
||||
{
|
||||
return netService()->turtleGroupRequest(group_id) ;
|
||||
}
|
||||
void p3GxsChannels::turtleSearchRequest(const std::string& match_string)
|
||||
TurtleRequestId p3GxsChannels::turtleSearchRequest(const std::string& match_string)
|
||||
{
|
||||
return netService()->turtleSearchRequest(match_string) ;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,8 +72,8 @@ virtual void service_tick();
|
|||
virtual bool saveList(bool &cleanup, std::list<RsItem *>&saveList); // @see p3Config::saveList(bool &cleanup, std::list<RsItem *>&)
|
||||
virtual bool loadList(std::list<RsItem *>& loadList); // @see p3Config::loadList(std::list<RsItem *>&)
|
||||
|
||||
virtual void turtleGroupRequest(const RsGxsGroupId& group_id);
|
||||
virtual void turtleSearchRequest(const std::string& match_string);
|
||||
virtual TurtleRequestId turtleGroupRequest(const RsGxsGroupId& group_id);
|
||||
virtual TurtleRequestId turtleSearchRequest(const std::string& match_string);
|
||||
|
||||
// Overloaded to cache new groups.
|
||||
virtual RsGenExchange::ServiceCreate_Return service_CreateGroup(RsGxsGrpItem* grpItem, RsTlvSecurityKeySet& keySet);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue