Count the friends (gpg id's) instead of the locations (ssl id's) in the statusbar.

Moved update of the friends from QTimer to signals.
Combined p3LinkMgr::getFriendCount and p3LinkMgr::getOnlineCount and moved to p3PeerMgr.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4986 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-02-25 01:48:56 +00:00
parent 4867c76bb1
commit 45ac04e2e7
11 changed files with 111 additions and 89 deletions

View file

@ -185,9 +185,9 @@ uint32_t p3ServerConfig::getUserLevel()
case RSCONFIG_USER_LEVEL_NEW:
{
if (mLinkMgr->getFriendCount() > MIN_BASIC_FRIENDS)
if (mPeerMgr->getFriendCount(true, false) > MIN_BASIC_FRIENDS)
{
userLevel = RSCONFIG_USER_LEVEL_BASIC;
userLevel = RSCONFIG_USER_LEVEL_BASIC;
}
}
case RSCONFIG_USER_LEVEL_BASIC:
@ -195,12 +195,12 @@ uint32_t p3ServerConfig::getUserLevel()
/* check that we have some lastConnect > 0 */
if (mPeerMgr->haveOnceConnected())
{
userLevel = RSCONFIG_USER_LEVEL_CASUAL;
userLevel = RSCONFIG_USER_LEVEL_CASUAL;
}
}
case RSCONFIG_USER_LEVEL_CASUAL:
case RSCONFIG_USER_LEVEL_POWER:
case RSCONFIG_USER_LEVEL_POWER:
{
/* check that the firewall is open */
@ -214,7 +214,7 @@ uint32_t p3ServerConfig::getUserLevel()
(RSNET_NATHOLE_NATPMP == firewallMode) ||
(RSNET_NATHOLE_FORWARDED == firewallMode))))
{
userLevel = RSCONFIG_USER_LEVEL_POWER;
userLevel = RSCONFIG_USER_LEVEL_POWER;
}
}
break; /* for all */