mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Changed in Libresapi: Pointer to RsNotify object into reference
This commit is contained in:
parent
4026040b49
commit
d53993c2a0
@ -236,8 +236,8 @@ public:
|
||||
mForumHandler(ifaces.mGxsForums),
|
||||
mServiceControlHandler(ifaces.mServiceControl),
|
||||
mFileSearchHandler(sts, ifaces.mNotify, ifaces.mTurtle, ifaces.mFiles),
|
||||
mFileSharingHandler(sts, ifaces.mFiles, ifaces.mNotify),
|
||||
mTransfersHandler(sts, ifaces.mFiles, ifaces.mPeers, ifaces.mNotify),
|
||||
mFileSharingHandler(sts, ifaces.mFiles, *ifaces.mNotify),
|
||||
mTransfersHandler(sts, ifaces.mFiles, ifaces.mPeers, *ifaces.mNotify),
|
||||
mChatHandler(sts, ifaces.mNotify, ifaces.mMsgs, ifaces.mPeers, ifaces.mIdentity, &mPeersHandler),
|
||||
mApiPluginHandler(sts, ifaces),
|
||||
mChannelsHandler(ifaces.mGxsChannels),
|
||||
|
@ -22,7 +22,7 @@ namespace resource_api
|
||||
{
|
||||
|
||||
FileSharingHandler::FileSharingHandler(StateTokenServer *sts, RsFiles *files,
|
||||
RsNotify* notify):
|
||||
RsNotify& notify):
|
||||
mStateTokenServer(sts), mRsFiles(files), mNotify(notify),
|
||||
mMtx("FileSharingHandler Mtx")
|
||||
{
|
||||
@ -44,12 +44,12 @@ FileSharingHandler::FileSharingHandler(StateTokenServer *sts, RsFiles *files,
|
||||
|
||||
mLocalDirStateToken = mStateTokenServer->getNewToken();
|
||||
mRemoteDirStateToken = mStateTokenServer->getNewToken();
|
||||
mNotify->registerNotifyClient(this);
|
||||
mNotify.registerNotifyClient(this);
|
||||
}
|
||||
|
||||
FileSharingHandler::~FileSharingHandler()
|
||||
{
|
||||
mNotify->unregisterNotifyClient(this);
|
||||
mNotify.unregisterNotifyClient(this);
|
||||
}
|
||||
|
||||
void FileSharingHandler::notifyListChange(int list, int /* type */)
|
||||
|
@ -31,7 +31,7 @@ namespace resource_api
|
||||
class FileSharingHandler: public ResourceRouter, NotifyClient
|
||||
{
|
||||
public:
|
||||
FileSharingHandler(StateTokenServer* sts, RsFiles* files, RsNotify* notify);
|
||||
FileSharingHandler(StateTokenServer* sts, RsFiles* files, RsNotify& notify);
|
||||
~FileSharingHandler();
|
||||
|
||||
// from NotifyClient
|
||||
@ -61,7 +61,7 @@ private:
|
||||
RsMutex mMtx; // Inherited virtual functions of NotifyClient may be called from foreing thread
|
||||
|
||||
RsFiles* mRsFiles;
|
||||
RsNotify* mNotify;
|
||||
RsNotify& mNotify;
|
||||
};
|
||||
|
||||
} // namespace resource_api
|
||||
|
@ -7,7 +7,7 @@ namespace resource_api
|
||||
{
|
||||
|
||||
TransfersHandler::TransfersHandler(StateTokenServer *sts, RsFiles *files, RsPeers *peers,
|
||||
RsNotify* notify):
|
||||
RsNotify& notify):
|
||||
mStateTokenServer(sts), mFiles(files), mRsPeers(peers), mLastUpdateTS(0), mNotify(notify),
|
||||
mMtx("TransfersHandler")
|
||||
{
|
||||
@ -17,13 +17,13 @@ TransfersHandler::TransfersHandler(StateTokenServer *sts, RsFiles *files, RsPeer
|
||||
addResourceHandler("control_download", this, &TransfersHandler::handleControlDownload);
|
||||
mStateToken = mStateTokenServer->getNewToken();
|
||||
mStateTokenServer->registerTickClient(this);
|
||||
mNotify->registerNotifyClient(this);
|
||||
mNotify.registerNotifyClient(this);
|
||||
}
|
||||
|
||||
TransfersHandler::~TransfersHandler()
|
||||
{
|
||||
mStateTokenServer->unregisterTickClient(this);
|
||||
mNotify->unregisterNotifyClient(this);
|
||||
mNotify.unregisterNotifyClient(this);
|
||||
}
|
||||
|
||||
void TransfersHandler::notifyListChange(int list, int /* type */)
|
||||
|
@ -13,7 +13,7 @@ namespace resource_api
|
||||
class TransfersHandler: public ResourceRouter, Tickable, NotifyClient
|
||||
{
|
||||
public:
|
||||
TransfersHandler(StateTokenServer* sts, RsFiles* files, RsPeers *peers, RsNotify* notify);
|
||||
TransfersHandler(StateTokenServer* sts, RsFiles* files, RsPeers *peers, RsNotify& notify);
|
||||
virtual ~TransfersHandler();
|
||||
|
||||
// from NotifyClient
|
||||
@ -30,7 +30,7 @@ private:
|
||||
StateTokenServer* mStateTokenServer;
|
||||
RsFiles* mFiles;
|
||||
RsPeers* mRsPeers;
|
||||
RsNotify* mNotify;
|
||||
RsNotify& mNotify;
|
||||
|
||||
RsMutex mMtx;
|
||||
StateToken mStateToken;
|
||||
|
Loading…
Reference in New Issue
Block a user