mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-03 03:36:58 -04:00
Merge pull request #1415 from csoler/v0.6.5-ForumModel2
V0.6.5 forum model2
This commit is contained in:
commit
9ce573c3f5
15 changed files with 2599 additions and 2564 deletions
|
@ -54,6 +54,8 @@ static const uint32_t RS_GXS_FORUM_MSG_FLAGS_MODERATED = 0x00000001;
|
|||
|
||||
struct RsGxsForumGroup : RsSerializable
|
||||
{
|
||||
virtual ~RsGxsForumGroup() {}
|
||||
|
||||
RsGroupMetaData mMeta;
|
||||
std::string mDescription;
|
||||
|
||||
|
@ -76,6 +78,8 @@ struct RsGxsForumGroup : RsSerializable
|
|||
|
||||
struct RsGxsForumMsg : RsSerializable
|
||||
{
|
||||
virtual ~RsGxsForumMsg() {}
|
||||
|
||||
RsMsgMetaData mMeta;
|
||||
std::string mMsg;
|
||||
|
||||
|
@ -139,10 +143,11 @@ public:
|
|||
const std::list<RsGxsGroupId>& forumIds,
|
||||
std::vector<RsGxsForumGroup>& forumsInfo ) = 0;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get content of specified forums. Blocking API
|
||||
* @jsonapi{development}
|
||||
* @param[in] forumIds id of the channels of which the content is requested
|
||||
* @param[in] forumIds id of the forum of which the content is requested
|
||||
* @param[out] messages storage for the forum messages
|
||||
* @return false if something failed, true otherwhise
|
||||
*/
|
||||
|
@ -150,6 +155,29 @@ public:
|
|||
const std::list<RsGxsGroupId>& forumIds,
|
||||
std::vector<RsGxsForumMsg>& messages ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Get message metadatas for some messages of a specific forum. Blocking API
|
||||
* @jsonapi{development}
|
||||
* @param[in] forumIds id of the forum of which the content is requested
|
||||
* @param[out] msg_metas storage for the forum messages meta data
|
||||
* @return false if something failed, true otherwhise
|
||||
*/
|
||||
virtual bool getForumMsgMetaData( const RsGxsGroupId& forumId,
|
||||
std::vector<RsMsgMetaData>& msg_metas) =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}
|
||||
|
|
|
@ -61,6 +61,8 @@ struct RsGroupMetaData : RsSerializable
|
|||
mCircleType(0x0001), mAuthenFlags(0), mSubscribeFlags(0), mPop(0),
|
||||
mVisibleMsgCount(0), mLastPost(0), mGroupStatus(0) {}
|
||||
|
||||
virtual ~RsGroupMetaData() {}
|
||||
|
||||
void operator =(const RsGxsGrpMetaData& rGxsMeta);
|
||||
|
||||
RsGxsGroupId mGroupId;
|
||||
|
@ -124,9 +126,9 @@ struct RsMsgMetaData : RsSerializable
|
|||
{
|
||||
RsMsgMetaData() : mPublishTs(0), mMsgFlags(0), mMsgStatus(0), mChildTs(0) {}
|
||||
|
||||
virtual ~RsMsgMetaData() {}
|
||||
void operator =(const RsGxsMsgMetaData& rGxsMeta);
|
||||
|
||||
|
||||
RsGxsGroupId mGroupId;
|
||||
RsGxsMessageId mMsgId;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue