Updated the notification system. Main changes are:

- the notification system is now a service, p3Notify, that is a public RsNotify.
- RsNotify does nothing except providing a registration system for new notify clients.
- Clients should derive a notify client from the NotifyClient class and register it to rsNotify
- all registered clients get all notifications, so only derive the needed methods. This should allow 
  plugins to get notifications as well.
- updated the code to call RsServer::notify()->[notification method] from inside libretroshare
- pqiNotify has been removed.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6996 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-01-07 22:51:22 +00:00
parent 3cc8c144a8
commit 630824aa1b
47 changed files with 482 additions and 484 deletions

View file

@ -31,6 +31,7 @@
#include "retroshare/rsiface.h"
#include "retroshare/rspeers.h"
#include "serialiser/rsmsgitems.h"
#include "rsserver/p3face.h"
#include "util/rsstring.h"
// clean too old messages every 5 minutes
@ -145,7 +146,7 @@ void p3HistoryMgr::addMessage(bool incoming, const std::string &chatPeerId, cons
}
if (addMsgId) {
rsicontrol->getNotify().notifyHistoryChanged(addMsgId, NOTIFY_TYPE_ADD);
RsServer::notify()->notifyHistoryChanged(addMsgId, NOTIFY_TYPE_ADD);
}
}
@ -450,7 +451,7 @@ void p3HistoryMgr::clear(const std::string &chatPeerId)
IndicateConfigChanged();
}
rsicontrol->getNotify().notifyHistoryChanged(0, NOTIFY_TYPE_MOD);
RsServer::notify()->notifyHistoryChanged(0, NOTIFY_TYPE_MOD);
}
void p3HistoryMgr::removeMessages(const std::list<uint32_t> &msgIds)
@ -492,7 +493,7 @@ void p3HistoryMgr::removeMessages(const std::list<uint32_t> &msgIds)
IndicateConfigChanged();
for (iit = removedIds.begin(); iit != removedIds.end(); ++iit) {
rsicontrol->getNotify().notifyHistoryChanged(*iit, NOTIFY_TYPE_DEL);
RsServer::notify()->notifyHistoryChanged(*iit, NOTIFY_TYPE_DEL);
}
}
}