mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-13 11:32:48 -04:00
worked on display of posts and selection in new forum model
This commit is contained in:
parent
3edd1dd0dd
commit
20b8bca801
6 changed files with 166 additions and 53 deletions
|
@ -150,6 +150,19 @@ public:
|
|||
const std::list<RsGxsGroupId>& forumIds,
|
||||
std::vector<RsGxsForumMsg>& messages ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Get specific list of messages from a single forums. Blocking API
|
||||
* @jsonapi{development}
|
||||
* @param[in] forumId id of the forum of which the content is requested
|
||||
* @param[in] msgs_to_request list of message ids to request
|
||||
* @param[out] msgs storage for the forum messages
|
||||
* @return false if something failed, true otherwhise
|
||||
*/
|
||||
virtual bool getForumsContent(
|
||||
const RsGxsGroupId& forumId,
|
||||
std::set<RsGxsMessageId>& msgs_to_request,
|
||||
std::vector<RsGxsForumMsg>& msgs) =0;
|
||||
|
||||
/**
|
||||
* @brief Toggle message read status. Blocking API.
|
||||
* @jsonapi{development}
|
||||
|
|
|
@ -456,6 +456,20 @@ bool p3GxsForums::getForumsInfo(
|
|||
return getGroupData(token, forumsInfo);
|
||||
}
|
||||
|
||||
bool p3GxsForums::getForumsContent( const RsGxsGroupId& forumId, std::set<RsGxsMessageId>& msgs_to_request,std::vector<RsGxsForumMsg>& msgs)
|
||||
{
|
||||
uint32_t token;
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||
|
||||
GxsMsgReq msgIds;
|
||||
msgIds[forumId] = msgs_to_request;
|
||||
|
||||
if( !requestMsgInfo(token, opts, msgIds) || waitToken(token) != RsTokenService::COMPLETE ) return false;
|
||||
|
||||
return getMsgData(token, msgs) ;
|
||||
}
|
||||
|
||||
bool p3GxsForums::getForumsContent(
|
||||
const std::list<RsGxsGroupId>& forumIds,
|
||||
std::vector<RsGxsForumMsg>& messages )
|
||||
|
|
|
@ -77,6 +77,9 @@ public:
|
|||
const std::list<RsGxsGroupId>& forumIds,
|
||||
std::vector<RsGxsForumMsg>& messages );
|
||||
|
||||
/// @see RsGxsForums::getForumsContent
|
||||
virtual bool getForumsContent( const RsGxsGroupId& forumId, std::set<RsGxsMessageId>& msgs_to_request,std::vector<RsGxsForumMsg>& msgs) ;
|
||||
|
||||
/// @see RsGxsForums::markRead
|
||||
virtual bool markRead(const RsGxsGrpMsgIdPair& messageId, bool read);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue