mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-27 00:15:51 -04:00
Implement a JSON API friendly notification system
This should bit by bit substitute RsNotify which would be very difficult to support properly in JSON API. The new system is much simpler to use also from the C++ side of the moon. BroadcastDiscovery take advantage of the new system to notify about new non friend peer discovered, tested successfully also in JSON API.
This commit is contained in:
parent
9c7a8d479f
commit
7dab487bde
9 changed files with 503 additions and 84 deletions
|
@ -39,6 +39,9 @@ int rsserverzone = 101;
|
|||
|
||||
#include "util/rsdebug.h"
|
||||
|
||||
#include "retroshare/rsevents.h"
|
||||
#include "services/rseventsservice.h"
|
||||
|
||||
|
||||
/****
|
||||
#define DEBUG_TICK 1
|
||||
|
@ -81,6 +84,12 @@ RsServer::RsServer() :
|
|||
coreMutex("RsServer"), mShutdownCallback([](int){}),
|
||||
coreReady(false)
|
||||
{
|
||||
{
|
||||
RsEventsService* tmpRsEvtPtr = new RsEventsService();
|
||||
rsEvents.reset(tmpRsEvtPtr);
|
||||
startServiceThread(tmpRsEvtPtr, "RsEventsService");
|
||||
}
|
||||
|
||||
// This is needed asap.
|
||||
//
|
||||
mNotify = new p3Notify() ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue