mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
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:
parent
3cc8c144a8
commit
630824aa1b
47 changed files with 482 additions and 484 deletions
|
@ -30,7 +30,8 @@
|
|||
#ifdef WINDOWS_SYS
|
||||
#include "retroshare/rsinit.h"
|
||||
#endif
|
||||
#include "pqi/pqinotify.h"
|
||||
#include "rsserver/p3face.h"
|
||||
#include "pqi/p3notify.h"
|
||||
#include "pgp/pgphandler.h"
|
||||
|
||||
#include <util/rsdir.h>
|
||||
|
@ -92,7 +93,7 @@ std::string pgp_pwd_callback(void * /*hook*/, const char *uid_hint, const char *
|
|||
fprintf(stderr, "pgp_pwd_callback() called.\n");
|
||||
#endif
|
||||
std::string password;
|
||||
rsicontrol->getNotify().askForPassword(std::string("Please enter your PGP password for key:\n ")+uid_hint+" :", prev_was_bad, password) ;
|
||||
RsServer::notify()->askForPassword(std::string("Please enter your PGP password for key:\n ")+uid_hint+" :", prev_was_bad, password) ;
|
||||
|
||||
return password ;
|
||||
}
|
||||
|
@ -621,7 +622,7 @@ bool AuthGPG::AllowConnection(const std::string &gpg_id, bool accept)
|
|||
|
||||
IndicateConfigChanged();
|
||||
|
||||
rsicontrol->getNotify().notifyListChange(NOTIFY_LIST_FRIENDS, accept ? NOTIFY_TYPE_ADD : NOTIFY_TYPE_DEL);
|
||||
RsServer::notify()->notifyListChange(NOTIFY_LIST_FRIENDS, accept ? NOTIFY_TYPE_ADD : NOTIFY_TYPE_DEL);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue