mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-17 02:49:34 -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,8 +30,8 @@
|
|||
#include "pqi/pqibin.h"
|
||||
#include "pqi/pqistore.h"
|
||||
#include "pqi/pqiarchive.h"
|
||||
#include "pqi/pqinotify.h"
|
||||
#include <errno.h>
|
||||
#include <rsserver/p3face.h>
|
||||
#include <util/rsdiscspace.h>
|
||||
#include "util/rsstring.h"
|
||||
|
||||
|
@ -335,10 +335,10 @@ bool p3ConfigMgr::backedUpFileSave(const std::string& fname, const std::string&
|
|||
}
|
||||
|
||||
if(size_file != (int) fwrite(config_buff,1, size_file, file))
|
||||
getPqiNotify()->AddSysMessage(0, RS_SYS_WARNING, "Write error", "Error while writing backup configuration file " + fname_backup + "\nIs your disc full or out of quota ?");
|
||||
RsServer::notify()->AddSysMessage(0, RS_SYS_WARNING, "Write error", "Error while writing backup configuration file " + fname_backup + "\nIs your disc full or out of quota ?");
|
||||
|
||||
if(size_sign != (int) fwrite(sign_buff, 1, size_sign, sign))
|
||||
getPqiNotify()->AddSysMessage(0, RS_SYS_WARNING, "Write error", "Error while writing main signature file " + sign_fname_backup + "\nIs your disc full or out of quota ?");
|
||||
RsServer::notify()->AddSysMessage(0, RS_SYS_WARNING, "Write error", "Error while writing main signature file " + sign_fname_backup + "\nIs your disc full or out of quota ?");
|
||||
|
||||
fclose(file);
|
||||
fclose(sign);
|
||||
|
@ -1146,7 +1146,7 @@ bool p3Config::backedUpFileSave(const std::string& cfg_fname, const std::string&
|
|||
|
||||
if(size_file != (int) fwrite(buff, 1, size_file, cfg_file))
|
||||
{
|
||||
getPqiNotify()->AddSysMessage(0, RS_SYS_WARNING, "Write error", "Error while writing backup configuration file " + cfg_fname_backup + "\nIs your disc full or out of quota ?");
|
||||
RsServer::notify()->AddSysMessage(0, RS_SYS_WARNING, "Write error", "Error while writing backup configuration file " + cfg_fname_backup + "\nIs your disc full or out of quota ?");
|
||||
fclose(cfg_file);
|
||||
delete[] buff;
|
||||
return false ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue