Added service pointer for forums to the plugin interface.

FeedReader:
- Used the forums pointer from the plugin interface instead of the global pointer

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6982 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2014-01-03 15:05:48 +00:00
parent 2a9a6f8a75
commit 76b3ccc1a5
6 changed files with 109 additions and 85 deletions

View file

@ -42,6 +42,7 @@ class RsTurtle ;
class RsDht ;
class RsDisc ;
class RsMsgs ;
class RsForums;
class p3LinkMgr ;
class MainPage ;
class QIcon ;
@ -98,6 +99,7 @@ public:
RsTurtle *mTurtle;
RsDisc *mDisc;
RsDht *mDht;
RsForums *mForums;
};
class RsPlugin

View file

@ -2222,18 +2222,6 @@ int RsServer::StartupRetroShare()
rsDisc = new p3Discovery(ad);
rsMsgs = new p3Msgs(msgSrv, chatSrv);
// set interfaces for plugins
//
RsPlugInInterfaces interfaces;
interfaces.mFiles = rsFiles;
interfaces.mPeers = rsPeers;
interfaces.mMsgs = rsMsgs;
interfaces.mTurtle = rsTurtle;
interfaces.mDisc = rsDisc;
interfaces.mDht = rsDht;
mPluginsManager->setInterfaces(interfaces);
// connect components to turtle router.
ftserver->connectToTurtleRouter(tr) ;
@ -2264,6 +2252,20 @@ int RsServer::StartupRetroShare()
pqih -> addService(mBlogs); /* This must be also ticked as a service */
#endif
// set interfaces for plugins
//
RsPlugInInterfaces interfaces;
interfaces.mFiles = rsFiles;
interfaces.mPeers = rsPeers;
interfaces.mMsgs = rsMsgs;
interfaces.mTurtle = rsTurtle;
interfaces.mDisc = rsDisc;
interfaces.mDht = rsDht;
interfaces.mForums = mForums;
mPluginsManager->setInterfaces(interfaces);
// now add plugin objects inside the loop:
// - client services provided by plugins.
// - cache services provided by plugins.