mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 11:16:34 -04:00
added infrastructure to track oingoing distant GXS group requests
This commit is contained in:
parent
d086975d54
commit
74edefcc43
11 changed files with 139 additions and 60 deletions
|
@ -519,10 +519,16 @@ public:
|
|||
* @param[out] distantGroup storage for group data
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
virtual bool getDistantSearchResultGroupData(
|
||||
const RsGxsGroupId& groupId, RsGxsChannelGroup& distantGroup ) = 0;
|
||||
virtual bool getDistantSearchResultGroupData(const RsGxsGroupId& groupId, RsGxsChannelGroup& distantGroup ) = 0;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief getDistantSearchStatus
|
||||
* Returns the status of ongoing search: unknown (probably not even searched), known as a search result,
|
||||
* data request ongoing and data available
|
||||
*/
|
||||
virtual DistantSearchGroupStatus getDistantSearchStatus(const RsGxsGroupId& group_id) =0;
|
||||
|
||||
/**
|
||||
* @brief Clear accumulated search results
|
||||
* @jsonapi{development}
|
||||
* @param[in] reqId search id
|
||||
|
|
|
@ -145,6 +145,14 @@ struct RsGxsChanges : RsEvent
|
|||
RsTokenService* mService; /// Weak pointer, not serialized
|
||||
};
|
||||
|
||||
enum class DistantSearchGroupStatus:uint8_t
|
||||
{
|
||||
UNKNOWN = 0x00, // no search ongoing for this group
|
||||
CAN_BE_REQUESTED = 0x01, // a search result mentions this group, so the group data can be requested
|
||||
ONGOING_REQUEST = 0x02, // the group data has been requested and the request is pending
|
||||
HAVE_GROUP_DATA = 0x03, // group data has been received. Group can be subscribed.
|
||||
};
|
||||
|
||||
/*!
|
||||
* All implementations must offer thread safety
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue