documenting p3chatservice,

added 'idle' status to status service
 - idle status not saved 

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2790 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2010-04-27 11:53:46 +00:00
parent 40da50799e
commit f1dab2b094
3 changed files with 24 additions and 12 deletions

View file

@ -143,20 +143,23 @@ bool p3StatusService::sendStatus(StatusInfo& statusInfo)
if(statusInfo.id != mConnMgr->getOwnId())
return false;
// If your id is not set, set it
if(mStatusInfoMap.find(statusInfo.id) == mStatusInfoMap.end()){
// don't save inactive status
if(statusInfo.status != RS_STATUS_INACTIVE){
std::pair<std::string, StatusInfo> pr(statusInfo.id, statusInfo);
mStatusInfoMap.insert(pr);
IndicateConfigChanged();
}else
if(mStatusInfoMap[statusInfo.id].status != statusInfo.status){
// If your id is not set, set it
if(mStatusInfoMap.find(statusInfo.id) == mStatusInfoMap.end()){
IndicateConfigChanged();
mStatusInfoMap[statusInfo.id] = statusInfo;
std::pair<std::string, StatusInfo> pr(statusInfo.id, statusInfo);
mStatusInfoMap.insert(pr);
IndicateConfigChanged();
}else
if(mStatusInfoMap[statusInfo.id].status != statusInfo.status){
IndicateConfigChanged();
mStatusInfoMap[statusInfo.id] = statusInfo;
}
}
mConnMgr->getOnlineList(onlineList);
}