Merge pull request #1881 from PhenomRetroShare/Add_VotesOn_getPostData

Add Votes when calling getPostData.
This commit is contained in:
csoler 2020-05-21 22:38:06 +02:00 committed by GitHub
commit 2a5adddc3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 208 additions and 117 deletions

View file

@ -314,7 +314,8 @@ public:
*/
virtual bool getChannelAllContent( const RsGxsGroupId& channelId,
std::vector<RsGxsChannelPost>& posts,
std::vector<RsGxsComment>& comments ) = 0;
std::vector<RsGxsComment>& comments,
std::vector<RsGxsVote>& votes ) = 0;
/**
* @brief Get channel messages and comments corresponding to the given IDs.
@ -326,12 +327,14 @@ public:
* @param[in] contentsIds ids of requested contents
* @param[out] posts storage for posts
* @param[out] comments storage for the comments
* @param[out] votes storage for the votes
* @return false if something failed, true otherwhise
*/
virtual bool getChannelContent( const RsGxsGroupId& channelId,
const std::set<RsGxsMessageId>& contentsIds,
std::vector<RsGxsChannelPost>& posts,
std::vector<RsGxsComment>& comments ) = 0;
std::vector<RsGxsComment>& comments,
std::vector<RsGxsVote>& votes ) = 0;
/**
* @brief Get channel comments corresponding to the given IDs.
@ -571,6 +574,9 @@ public:
RS_DEPRECATED_FOR(getChannelsInfo)
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsChannelGroup> &groups) = 0;
RS_DEPRECATED_FOR(getChannelContent)
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts, std::vector<RsGxsComment> &cmts, std::vector<RsGxsVote> &votes) = 0;
RS_DEPRECATED_FOR(getChannelContent)
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts, std::vector<RsGxsComment> &cmts) = 0;

View file

@ -154,13 +154,15 @@ public:
virtual bool getBoardAllContent(
const RsGxsGroupId& boardId,
std::vector<RsPostedPost>& posts,
std::vector<RsGxsComment>& comments ) = 0;
std::vector<RsGxsComment>& comments,
std::vector<RsGxsVote>& votes ) = 0;
virtual bool getBoardContent(
const RsGxsGroupId& boardId,
const std::set<RsGxsMessageId>& contentsIds,
std::vector<RsPostedPost>& posts,
std::vector<RsGxsComment>& comments ) = 0;
std::vector<RsGxsComment>& comments,
std::vector<RsGxsVote>& votes ) = 0;
virtual bool editBoard(RsPostedGroup& board) =0;
@ -176,6 +178,11 @@ public:
virtual bool getGroupData( const uint32_t& token,
std::vector<RsPostedGroup> &groups ) = 0;
RS_DEPRECATED_FOR(getBoardsContent)
virtual bool getPostData(
const uint32_t& token, std::vector<RsPostedPost>& posts,
std::vector<RsGxsComment>& cmts, std::vector<RsGxsVote>& vots) = 0;
RS_DEPRECATED_FOR(getBoardsContent)
virtual bool getPostData(
const uint32_t& token, std::vector<RsPostedPost>& posts,