mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
Forum API add missing subscribe method
This commit is contained in:
parent
a802e494f8
commit
abec811d31
@ -256,7 +256,7 @@ public:
|
||||
* @param[in] subscribe true to subscribe, false to unsubscribe
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
virtual bool subscribeToChannel( const RsGxsGroupId &channelId,
|
||||
virtual bool subscribeToChannel( const RsGxsGroupId& channelId,
|
||||
bool subscribe ) = 0;
|
||||
|
||||
/**
|
||||
|
@ -159,6 +159,16 @@ public:
|
||||
*/
|
||||
virtual bool markRead(const RsGxsGrpMsgIdPair& messageId, bool read) = 0;
|
||||
|
||||
/**
|
||||
* @brief Subscrbe to a forum. Blocking API
|
||||
* @jsonapi{development}
|
||||
* @param[in] forumId Forum id
|
||||
* @param[in] subscribe true to subscribe, false to unsubscribe
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
virtual bool subscribeToForum( const RsGxsGroupId& forumId,
|
||||
bool subscribe ) = 0;
|
||||
|
||||
/* Specific Service Data */
|
||||
RS_DEPRECATED_FOR("getForumsSummaries, getForumsInfo")
|
||||
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups) = 0;
|
||||
|
@ -476,6 +476,15 @@ bool p3GxsForums::markRead(const RsGxsGrpMsgIdPair& msgId, bool read)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3GxsForums::subscribeToForum(
|
||||
const RsGxsGroupId& groupId, bool subscribe )
|
||||
{
|
||||
uint32_t token;
|
||||
if( !RsGenExchange::subscribeToGroup(token, groupId, subscribe)
|
||||
|| waitToken(token) != RsTokenService::COMPLETE ) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3GxsForums::createGroup(uint32_t &token, RsGxsForumGroup &group)
|
||||
{
|
||||
std::cerr << "p3GxsForums::createGroup()" << std::endl;
|
||||
|
@ -80,6 +80,10 @@ public:
|
||||
/// @see RsGxsForums::markRead
|
||||
virtual bool markRead(const RsGxsGrpMsgIdPair& messageId, bool read);
|
||||
|
||||
/// @see RsGxsForums::subscribeToForum
|
||||
virtual bool subscribeToForum( const RsGxsGroupId& forumId,
|
||||
bool subscribe );
|
||||
|
||||
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups);
|
||||
virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs);
|
||||
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read);
|
||||
|
Loading…
Reference in New Issue
Block a user