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