Fix GxsChannelPostItem when received comment.

This commit is contained in:
Phenom 2016-06-18 20:03:55 +02:00
parent 7627bd96ca
commit d84fdff2e1
16 changed files with 188 additions and 61 deletions

View file

@ -83,9 +83,10 @@ virtual ~RsGxsChannels() { return; }
/* Specific Service Data */
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsChannelGroup> &groups) = 0;
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts, std::vector<RsGxsComment> &cmts) = 0;
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts) = 0;
virtual bool getRelatedPosts(const uint32_t &token, std::vector<RsGxsChannelPost> &posts) = 0;
//Not currently used
//virtual bool getRelatedPosts(const uint32_t &token, std::vector<RsGxsChannelPost> &posts) = 0;
/* From RsGxsCommentService */
//virtual bool getCommentData(const uint32_t &token, std::vector<RsGxsComment> &comments) = 0;

View file

@ -108,6 +108,19 @@ class RsGxsComment
// This is filled in if detailed Comment Data is called.
std::list<RsGxsVote> mVotes;
const std::ostream &print(std::ostream &out, std::string indent = "", std::string varName = "") const {
out << indent << varName << " of RsGxsComment Values ###################" << std::endl;
mMeta.print(out, indent + " ", "mMeta");
out << indent << " mComment: " << mComment << std::endl;
out << indent << " mUpVotes: " << mUpVotes << std::endl;
out << indent << " mDownVotes: " << mDownVotes << std::endl;
out << indent << " mScore: " << mScore << std::endl;
out << indent << " mOwnVote: " << mOwnVote << std::endl;
out << indent << " mVotes.size(): " << mVotes.size() << std::endl;
out << indent << "######################################################" << std::endl;
return out;
}
};

View file

@ -70,7 +70,8 @@ virtual ~RsGxsForums() { return; }
/* Specific Service Data */
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups) = 0;
virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs) = 0;
virtual bool getRelatedMessages(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs) = 0;
//Not currently used
//virtual bool getRelatedMessages(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs) = 0;
//////////////////////////////////////////////////////////////////////////////
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;

View file

@ -131,6 +131,24 @@ public:
time_t mChildTs;
std::string mServiceString; // Service Specific Free-Form extra storage.
const std::ostream &print(std::ostream &out, std::string indent = "", std::string varName = "") const {
out
<< indent << varName << " of RsMsgMetaData Values ###################" << std::endl
<< indent << " mGroupId: " << mGroupId.toStdString() << std::endl
<< indent << " mMsgId: " << mMsgId.toStdString() << std::endl
<< indent << " mThreadId: " << mThreadId.toStdString() << std::endl
<< indent << " mParentId: " << mParentId.toStdString() << std::endl
<< indent << " mOrigMsgId: " << mOrigMsgId.toStdString() << std::endl
<< indent << " mAuthorId: " << mAuthorId.toStdString() << std::endl
<< indent << " mMsgName: " << mMsgName << std::endl
<< indent << " mPublishTs: " << mPublishTs << std::endl
<< indent << " mMsgFlags: " << std::hex << mMsgFlags << std::dec << std::endl
<< indent << " mMsgStatus: " << std::hex << mMsgStatus << std::dec << std::endl
<< indent << " mChildTs: " << mChildTs << std::endl
<< indent << " mServiceString: " << mServiceString << std::endl
<< indent << "######################################################" << std::endl;
return out;
}
};
class GxsGroupStatistic

View file

@ -84,7 +84,8 @@ virtual ~RsPosted() { return; }
/* Specific Service Data */
virtual bool getGroupData(const uint32_t &token, std::vector<RsPostedGroup> &groups) = 0;
virtual bool getPostData(const uint32_t &token, std::vector<RsPostedPost> &posts) = 0;
virtual bool getRelatedPosts(const uint32_t &token, std::vector<RsPostedPost> &posts) = 0;
//Not currently used
//virtual bool getRelatedPosts(const uint32_t &token, std::vector<RsPostedPost> &posts) = 0;
/* From RsGxsCommentService */
//virtual bool getCommentData(const uint32_t &token, std::vector<RsGxsComment> &comments) = 0;