* Added isOnline to rspeers.h interface

Various improvements to get p3distrib Messages working:
 * Defensive programming in cachestrapper (forcing ownId on save).
 * Changed CONFIG_CACHE_ID to last -> to force correct loading order at startup
   This should be Config Files, Local Cache Files, then Remote Caches.
 * Hack to maintain existing Cache Files.
 * Improvments to forum_test.

Lots of work on p3distrib:
 * fixed nextCacheSubId.
 * Added new Msgs to Config Save.
 * Fixed Cache reload issues.
 * Overall: Enabled Forum Msg publication.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@611 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-06-16 20:37:48 +00:00
parent 0d6471433c
commit 098851592c
10 changed files with 298 additions and 54 deletions

View file

@ -80,7 +80,6 @@
#define RS_RELEASE 1
/**************** PQI_USE_XPGP ******************/
#if defined(PQI_USE_XPGP)
#include "pqi/authxpgp.h"

View file

@ -196,6 +196,23 @@ bool p3Peers::getOthersList(std::list<std::string> &ids)
return true;
}
bool p3Peers::isOnline(std::string id)
{
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::isOnline() " << id;
std::cerr << std::endl;
#endif
/* get from mConnectMgr */
peerConnectState state;
if (mConnMgr->getFriendNetStatus(id, state) &&
(state.state & RS_PEER_S_CONNECTED))
{
return true;
}
return false;
}
bool p3Peers::isFriend(std::string id)
{
#ifdef P3PEERS_DEBUG

View file

@ -48,6 +48,7 @@ virtual bool getOnlineList(std::list<std::string> &ids);
virtual bool getFriendList(std::list<std::string> &ids);
virtual bool getOthersList(std::list<std::string> &ids);
virtual bool isOnline(std::string id);
virtual bool isFriend(std::string id);
virtual std::string getPeerName(std::string id);
virtual bool getPeerDetails(std::string id, RsPeerDetails &d);