mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 04:22:27 -04:00
Added read/unread state to channel service (copied from forum service).
Added new and missing tests of the RsItems. Added new notifier on channel changes. Reworked fill of channels in ChannelFeed. Now the channel tree is updated and not refilled. Show unread message count in channels tree. Fixed memory leak in context menu. Show a new tray icon and action icon in MainWindow, when new channel messages are available. Recompile of the GUI needed. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3626 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
df20d69b29
commit
fc0ff38206
22 changed files with 1181 additions and 653 deletions
|
@ -34,6 +34,10 @@
|
|||
#include "rstypes.h"
|
||||
#include "rsdistrib.h" /* For FLAGS */
|
||||
|
||||
#define CHANNEL_MSG_STATUS_MASK 0x000f
|
||||
#define CHANNEL_MSG_STATUS_READ 0x0001
|
||||
#define CHANNEL_MSG_STATUS_UNREAD_BY_USER 0x0002
|
||||
|
||||
//! Stores information for a give channel id
|
||||
/*!
|
||||
* Stores all information for a given channel id
|
||||
|
@ -167,6 +171,31 @@ virtual bool getChannelMsgList(std::string cId, std::list<ChannelMsgSummary> &ms
|
|||
*/
|
||||
virtual bool getChannelMessage(std::string cId, std::string mId, ChannelMsgInfo &msg) = 0;
|
||||
|
||||
/*!
|
||||
* set message status
|
||||
* @param cId channel id
|
||||
* @param mId message id
|
||||
* @param status status to set
|
||||
* @param statusMask bitmask to modify
|
||||
*/
|
||||
virtual bool setMessageStatus(const std::string& cId,const std::string& mId, const uint32_t status, const uint32_t statusMask) = 0;
|
||||
|
||||
/*!
|
||||
* set message status
|
||||
* @param cId channel id
|
||||
* @param mId message id
|
||||
* @param status status
|
||||
*/
|
||||
virtual bool getMessageStatus(const std::string& cId, const std::string& mId, uint32_t& status) = 0;
|
||||
|
||||
/*!
|
||||
* count the new and unread messages
|
||||
* @param cId channel id
|
||||
* @param newCount count of new messages
|
||||
* @param unreadCount count of unread messages
|
||||
*/
|
||||
virtual bool getMessageCount(const std::string cId, unsigned int &newCount, unsigned int &unreadCount) = 0;
|
||||
|
||||
/*!
|
||||
* send message contain in message info to the id indicated within it (make sure you set the channel id of the message info)
|
||||
* @param info message to be sent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue