mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-29 11:56:37 -05:00
webui: added chat
This commit is contained in:
parent
1939ea9f54
commit
a9ef48d133
14 changed files with 1621 additions and 44 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "ResourceRouter.h"
|
||||
#include "StateTokenServer.h"
|
||||
#include "ChatHandler.h"
|
||||
#include <retroshare/rsnotify.h>
|
||||
#include <util/rsthreads.h>
|
||||
|
||||
|
|
@ -11,7 +12,7 @@ class RsMsgs;
|
|||
namespace resource_api
|
||||
{
|
||||
|
||||
class PeersHandler: public ResourceRouter, NotifyClient, Tickable
|
||||
class PeersHandler: public ResourceRouter, NotifyClient, Tickable, public UnreadMsgNotify
|
||||
{
|
||||
public:
|
||||
PeersHandler(StateTokenServer* sts, RsNotify* notify, RsPeers* peers, RsMsgs* msgs);
|
||||
|
|
@ -24,6 +25,12 @@ public:
|
|||
|
||||
// from Tickable
|
||||
virtual void tick();
|
||||
|
||||
// from UnreadMsgNotify
|
||||
// ChatHandler calls this to tell us about unreadmsgs
|
||||
// this allows to merge unread msgs info with the peers list
|
||||
virtual void notifyUnreadMsgCountChanged(const RsPeerId& peer, uint32_t count);
|
||||
|
||||
private:
|
||||
void handleWildcard(Request& req, Response& resp);
|
||||
void handleExamineCert(Request& req, Response& resp);
|
||||
|
|
@ -40,5 +47,6 @@ private:
|
|||
|
||||
RsMutex mMtx;
|
||||
StateToken mStateToken; // mutex protected
|
||||
std::map<RsPeerId, uint32_t> mUnreadMsgsCounts;
|
||||
};
|
||||
} // namespace resource_api
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue