mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
allow RsControlModule to work without control over RsInit (e.g. with rs-gui)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8074 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
74dd9f7b7b
commit
cb6860a08d
3 changed files with 9 additions and 4 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
namespace resource_api{
|
||||
|
||||
RsControlModule::RsControlModule(int argc, char **argv, StateTokenServer* sts, ApiServer *apiserver):
|
||||
RsControlModule::RsControlModule(int argc, char **argv, StateTokenServer* sts, ApiServer *apiserver, bool full_control):
|
||||
mStateTokenServer(sts),
|
||||
mApiServer(apiserver),
|
||||
mExitFlagMtx("RsControlModule::mExitFlagMtx"),
|
||||
|
@ -28,7 +28,10 @@ RsControlModule::RsControlModule(int argc, char **argv, StateTokenServer* sts, A
|
|||
this->argc = argc;
|
||||
this->argv = argv;
|
||||
// start worker thread
|
||||
start();
|
||||
if(full_control)
|
||||
start();
|
||||
else
|
||||
mRunState = RUNNING_OK;
|
||||
|
||||
addResourceHandler("runstate", this, &RsControlModule::handleRunState);
|
||||
addResourceHandler("identities", this, &RsControlModule::handleIdentities);
|
||||
|
|
|
@ -24,7 +24,9 @@ class RsControlModule: public ResourceRouter, NotifyClient,
|
|||
{
|
||||
public:
|
||||
// ApiServer will be called once RS is started, to load additional api modules
|
||||
RsControlModule(int argc, char **argv, StateTokenServer* sts, ApiServer* apiserver);
|
||||
// full_control: set to true if this module should handle rsinit and login
|
||||
// set to false if rsinit is handled by the Qt gui
|
||||
RsControlModule(int argc, char **argv, StateTokenServer* sts, ApiServer* apiserver, bool full_control);
|
||||
~RsControlModule();
|
||||
|
||||
// returns true if the process should terminate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue