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

@ -42,13 +42,11 @@
#include "util/rsstring.h"
#include "retroshare/rspeers.h" // for RsPeerDetails structure
#include "rsserver/p3face.h"
/******************** notify of new Cert **************************/
#include "pqinotify.h"
#include <openssl/err.h>
//#include <openssl/evp.h>
//#include <openssl/pem.h>
#include <openssl/rand.h>
#include <openssl/x509.h>
@ -1395,8 +1393,8 @@ bool AuthSSLimpl::FailedCertificate(X509 *x509, const std::string& gpgid,
#endif
if (incoming)
{
getPqiNotify()->AddPopupMessage(RS_POPUP_CONNECT_ATTEMPT, gpgid, sslcn, sslid);
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_SEC_CONNECT_ATTEMPT, gpgid, sslid, sslcn, ip_address);
RsServer::notify()->AddPopupMessage(RS_POPUP_CONNECT_ATTEMPT, gpgid, sslcn, sslid);
RsServer::notify()->AddFeedItem(RS_FEED_ITEM_SEC_CONNECT_ATTEMPT, gpgid, sslid, sslcn, ip_address);
#ifdef AUTHSSL_DEBUG
std::cerr << " Incoming from: ";
@ -1405,9 +1403,9 @@ bool AuthSSLimpl::FailedCertificate(X509 *x509, const std::string& gpgid,
else
{
if(authed)
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_SEC_AUTH_DENIED, gpgid, sslid, sslcn, ip_address);
RsServer::notify()->AddFeedItem(RS_FEED_ITEM_SEC_AUTH_DENIED, gpgid, sslid, sslcn, ip_address);
else
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_SEC_UNKNOWN_OUT, gpgid, sslid, sslcn, ip_address);
RsServer::notify()->AddFeedItem(RS_FEED_ITEM_SEC_UNKNOWN_OUT, gpgid, sslid, sslcn, ip_address);
#ifdef AUTHSSL_DEBUG
std::cerr << " Outgoing to: ";