mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added missing services in RsPluginInterface class
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6946 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d26d6fa355
commit
d839301b7c
@ -26,6 +26,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -37,6 +38,10 @@ class RsPluginHandler ;
|
|||||||
extern RsPluginHandler *rsPlugins ;
|
extern RsPluginHandler *rsPlugins ;
|
||||||
|
|
||||||
class p3Service ;
|
class p3Service ;
|
||||||
|
class RsTurtle ;
|
||||||
|
class RsDht ;
|
||||||
|
class RsDisc ;
|
||||||
|
class RsMsgs ;
|
||||||
class p3LinkMgr ;
|
class p3LinkMgr ;
|
||||||
class MainPage ;
|
class MainPage ;
|
||||||
class QIcon ;
|
class QIcon ;
|
||||||
@ -82,10 +87,16 @@ class RsPlugInInterfaces {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RsPlugInInterfaces() { mPeers = NULL; mFiles = NULL; }
|
RsPlugInInterfaces()
|
||||||
|
{
|
||||||
|
memset(this,0,sizeof(RsPlugInInterfaces)) ; // zero all pointers.
|
||||||
|
}
|
||||||
RsPeers *mPeers;
|
RsPeers *mPeers;
|
||||||
RsFiles *mFiles;
|
RsFiles *mFiles;
|
||||||
|
RsMsgs *mMsgs;
|
||||||
|
RsTurtle *mTurtle;
|
||||||
|
RsDisc *mDisc;
|
||||||
|
RsDht *mDht;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RsPlugin
|
class RsPlugin
|
||||||
|
@ -2194,12 +2194,6 @@ int RsServer::StartupRetroShare()
|
|||||||
//
|
//
|
||||||
mPluginsManager->loadPlugins(programatically_inserted_plugins) ;
|
mPluginsManager->loadPlugins(programatically_inserted_plugins) ;
|
||||||
|
|
||||||
// set interfaces for plugins
|
|
||||||
RsPlugInInterfaces interfaces;
|
|
||||||
interfaces.mFiles = rsFiles;
|
|
||||||
interfaces.mPeers = rsPeers;
|
|
||||||
mPluginsManager->setInterfaces(interfaces);
|
|
||||||
|
|
||||||
/* create Services */
|
/* create Services */
|
||||||
ad = new p3disc(mPeerMgr, mLinkMgr, mNetMgr, pqih);
|
ad = new p3disc(mPeerMgr, mLinkMgr, mNetMgr, pqih);
|
||||||
msgSrv = new p3MsgService(mLinkMgr);
|
msgSrv = new p3MsgService(mLinkMgr);
|
||||||
@ -2222,6 +2216,23 @@ int RsServer::StartupRetroShare()
|
|||||||
rsTurtle = tr ;
|
rsTurtle = tr ;
|
||||||
pqih -> addService(tr);
|
pqih -> addService(tr);
|
||||||
|
|
||||||
|
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) ;
|
ftserver->connectToTurtleRouter(tr) ;
|
||||||
chatSrv->connectToTurtleRouter(tr) ;
|
chatSrv->connectToTurtleRouter(tr) ;
|
||||||
msgSrv->connectToTurtleRouter(tr) ;
|
msgSrv->connectToTurtleRouter(tr) ;
|
||||||
@ -2724,16 +2735,12 @@ int RsServer::StartupRetroShare()
|
|||||||
|
|
||||||
/* Setup GUI Interfaces. */
|
/* Setup GUI Interfaces. */
|
||||||
|
|
||||||
rsDisc = new p3Discovery(ad);
|
|
||||||
rsBandwidthControl = mBwCtrl;
|
rsBandwidthControl = mBwCtrl;
|
||||||
rsConfig = serverConfig;
|
rsConfig = serverConfig;
|
||||||
|
|
||||||
rsMsgs = new p3Msgs(msgSrv, chatSrv);
|
|
||||||
rsForums = mForums;
|
rsForums = mForums;
|
||||||
rsChannels = mChannels;
|
rsChannels = mChannels;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef RS_USE_BLOGS
|
#ifdef RS_USE_BLOGS
|
||||||
rsBlogs = mBlogs;
|
rsBlogs = mBlogs;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user