mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 19:26:31 -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
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
class NotifyTxt: public NotifyBase
|
||||
class NotifyTxt: public NotifyClient
|
||||
{
|
||||
public:
|
||||
NotifyTxt():mNotifyMtx("NotifyMtx") { return; }
|
||||
|
|
|
@ -29,6 +29,7 @@ linux-* {
|
|||
LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2
|
||||
LIBS += -lssl -lupnp -lixml -lgnome-keyring
|
||||
LIBS *= -lcrypto -ldl -lz
|
||||
LIBS *= -rdynamic
|
||||
|
||||
gxs {
|
||||
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
|
||||
|
|
|
@ -233,9 +233,12 @@ int main(int argc, char **argv)
|
|||
* You will need to create you own NotifyXXX class
|
||||
* if you want to receive notifications of events */
|
||||
|
||||
NotifyTxt *notify = new NotifyTxt();
|
||||
RsControl *rsServer = createRsControl(*notify);
|
||||
rsicontrol = rsServer ;
|
||||
// This is needed to allocate rsNotify, so that it can be used to ask for PGP passphrase
|
||||
//
|
||||
RsControl::earlyInitNotificationSystem() ;
|
||||
|
||||
NotifyTxt *notify = new NotifyTxt() ;
|
||||
rsNotify->registerNotifyClient(notify);
|
||||
|
||||
std::string preferredId, gpgId, gpgName, gpgEmail, sslName;
|
||||
RsInit::getPreferedAccountId(preferredId);
|
||||
|
@ -295,7 +298,7 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
/* Start-up libretroshare server threads */
|
||||
rsServer -> StartupRetroShare();
|
||||
RsControl::instance() -> StartupRetroShare();
|
||||
|
||||
#ifdef RS_INTRO_SERVER
|
||||
RsIntroServer rsIS;
|
||||
|
|
|
@ -255,7 +255,7 @@ int RpcProtoSystem::processSystemQuit(uint32_t chan_id, uint32_t /* msg_id */, u
|
|||
}
|
||||
case rsctrl::system::RequestSystemQuit::SHUTDOWN_RS:
|
||||
{
|
||||
rsicontrol->rsGlobalShutDown();
|
||||
RsControl::instance()->rsGlobalShutDown();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ class RsSshd: public RsThread, public RpcComms
|
|||
public:
|
||||
|
||||
// NB: This must be called EARLY before all the threads are launched.
|
||||
static RsSshd *InitRsSshd(const std::string &portstr, const std::string &rsakeyfile);
|
||||
static RsSshd *InitRsSshd(const std::string& portStr, const std::string &rsakeyfile);
|
||||
|
||||
|
||||
// Interface.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue