mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Added ServiceControl + ServiceInfo. Basics are working, but still a lot to do!
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7196 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a4b54e1021
commit
83a78bcaee
71 changed files with 3168 additions and 209 deletions
|
@ -99,7 +99,7 @@ static const int MAX_TR_FORWARD_PER_SEC_LOWER_LIMIT = 10 ;
|
|||
static const int DISTANCE_SQUEEZING_POWER = 8 ;
|
||||
|
||||
p3turtle::p3turtle(p3LinkMgr *lm)
|
||||
:p3Service(RS_SERVICE_TYPE_TURTLE), p3Config(CONFIG_TYPE_TURTLE), mLinkMgr(lm), mTurtleMtx("p3turtle")
|
||||
:p3Service(), p3Config(CONFIG_TYPE_TURTLE), mLinkMgr(lm), mTurtleMtx("p3turtle")
|
||||
{
|
||||
RsStackMutex stack(mTurtleMtx); /********** STACK LOCKED MTX ******/
|
||||
|
||||
|
@ -120,6 +120,23 @@ p3turtle::p3turtle(p3LinkMgr *lm)
|
|||
_max_tr_up_rate = MAX_TR_FORWARD_PER_SEC ;
|
||||
}
|
||||
|
||||
const std::string TURTLE_APP_NAME = "turtle";
|
||||
const uint16_t TURTLE_APP_MAJOR_VERSION = 1;
|
||||
const uint16_t TURTLE_APP_MINOR_VERSION = 0;
|
||||
const uint16_t TURTLE_MIN_MAJOR_VERSION = 1;
|
||||
const uint16_t TURTLE_MIN_MINOR_VERSION = 0;
|
||||
|
||||
RsServiceInfo p3turtle::getServiceInfo()
|
||||
{
|
||||
return RsServiceInfo(RS_SERVICE_TYPE_TURTLE,
|
||||
TURTLE_APP_NAME,
|
||||
TURTLE_APP_MAJOR_VERSION,
|
||||
TURTLE_APP_MINOR_VERSION,
|
||||
TURTLE_MIN_MAJOR_VERSION,
|
||||
TURTLE_MIN_MINOR_VERSION);
|
||||
}
|
||||
|
||||
|
||||
void p3turtle::setEnabled(bool b)
|
||||
{
|
||||
RsStackMutex stack(mTurtleMtx); /********** STACK LOCKED MTX ******/
|
||||
|
|
|
@ -217,6 +217,7 @@ class p3turtle: public p3Service, public RsTurtle, public p3Config
|
|||
{
|
||||
public:
|
||||
p3turtle(p3LinkMgr *lm) ;
|
||||
virtual RsServiceInfo getServiceInfo();
|
||||
|
||||
// Enables/disable the service. Still ticks, but does nothing. Default is true.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue