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

@ -207,20 +207,16 @@ bool p3Peers::getFriendList(std::list<std::string> &ids)
// return true;
//}
bool p3Peers::getPeerCount (unsigned int *pnFriendCount, unsigned int *pnOnlineCount, bool /*ssl*/)
bool p3Peers::getPeerCount (unsigned int *friendCount, unsigned int *onlineCount, bool ssl)
{
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPeerCount()" << std::endl;
std::cerr << "p3Peers::getPeerCount()" << std::endl;
#endif
// This is no longer accurate!
*pnFriendCount = mLinkMgr->getFriendCount();
*pnOnlineCount = mLinkMgr->getOnlineCount();
/* get from mConnectMgr */
//return mConnMgr->getPeerCount(pnFriendCount, pnOnlineCount, ssl);
if (friendCount) *friendCount = mPeerMgr->getFriendCount(ssl, false);
if (onlineCount) *onlineCount = mPeerMgr->getFriendCount(ssl, true);
return true;
}
bool p3Peers::isOnline(const std::string &id)