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:
drbob 2014-03-22 03:53:44 +00:00
parent a4b54e1021
commit 83a78bcaee
71 changed files with 3168 additions and 209 deletions

View file

@ -48,7 +48,7 @@ std::ostream& operator<<(std::ostream& out, const StatusInfo& si)
RsStatus *rsStatus = NULL;
p3StatusService::p3StatusService(p3LinkMgr *cm)
:p3Service(RS_SERVICE_TYPE_STATUS), p3Config(CONFIG_TYPE_STATUS), mLinkMgr(cm), mStatusMtx("p3StatusService")
:p3Service(), p3Config(CONFIG_TYPE_STATUS), mLinkMgr(cm), mStatusMtx("p3StatusService")
{
addSerialType(new RsStatusSerialiser());
@ -58,6 +58,24 @@ p3StatusService::~p3StatusService()
{
}
const std::string STATUS_APP_NAME = "status";
const uint16_t STATUS_APP_MAJOR_VERSION = 1;
const uint16_t STATUS_APP_MINOR_VERSION = 0;
const uint16_t STATUS_MIN_MAJOR_VERSION = 1;
const uint16_t STATUS_MIN_MINOR_VERSION = 0;
RsServiceInfo p3StatusService::getServiceInfo()
{
return RsServiceInfo(RS_SERVICE_TYPE_STATUS,
STATUS_APP_NAME,
STATUS_APP_MAJOR_VERSION,
STATUS_APP_MINOR_VERSION,
STATUS_MIN_MAJOR_VERSION,
STATUS_MIN_MINOR_VERSION);
}
bool p3StatusService::getOwnStatus(StatusInfo& statusInfo)
{
#ifdef STATUS_DEBUG