mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-12 07:59:29 -05:00
Forums expose API to request syncronization
This commit is contained in:
parent
fc404bd5d8
commit
ebbd8cf938
@ -450,6 +450,17 @@ public:
|
||||
const std::string& matchString,
|
||||
std::vector<RsGxsSearchResult>& searchResults ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Request Synchronization with available peers
|
||||
* Usually syncronization already happen automatically so be carefull
|
||||
* to call this method only if necessary.
|
||||
* It has been thinked for use cases like mobile phone where internet
|
||||
* connection is intermittent and calling this may be useful when a system
|
||||
* event about connection being available or about to go offline is received
|
||||
* @jsonapi{development}
|
||||
* @return Success or error details
|
||||
*/
|
||||
virtual std::error_condition requestSynchronization() = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
/* Following functions are deprecated and should not be considered a stable
|
||||
|
@ -1159,6 +1159,12 @@ std::error_condition p3GxsForums::setPostKeepForever(
|
||||
}
|
||||
}
|
||||
|
||||
std::error_condition p3GxsForums::requestSynchronization()
|
||||
{
|
||||
RsGenExchange::netService()->pullFromPeers();
|
||||
return RsGenExchange::netService()->requestPull();
|
||||
}
|
||||
|
||||
/* so we need the same tick idea as wiki for generating dummy forums
|
||||
*/
|
||||
|
||||
|
@ -175,6 +175,8 @@ public:
|
||||
rs_owner_ptr<uint8_t>& resultData, uint32_t& resultSize ) override;
|
||||
#endif
|
||||
|
||||
std::error_condition requestSynchronization() override;
|
||||
|
||||
/// implementation of rsGxsGorums
|
||||
///
|
||||
bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups) override;
|
||||
|
Loading…
Reference in New Issue
Block a user