RetroShare/tests/librssimulator/peer/FakeNxsNetMgr.h
drbob df4cf6030e Added NxsNetMgr to simulator
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7266 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-04-12 07:22:57 +00:00

37 lines
642 B
C++

#pragma once
#include "gxs/rsgxsnetservice.h"
#include "FakeLinkMgr.h"
class FakeNxsNetMgr : public RsNxsNetMgr
{
public:
FakeNxsNetMgr(FakeLinkMgr *linkMgr)
:mLinkMgr(linkMgr) { return; }
const RsPeerId& getOwnId()
{
return mLinkMgr->getOwnId();
}
void getOnlineList(uint32_t serviceId, std::set<RsPeerId>& ssl_peers)
{
(void) serviceId;
std::list<RsPeerId> peerList;
mLinkMgr->getOnlineList(peerList);
std::list<RsPeerId>::const_iterator it;
for(it = peerList.begin(); it != peerList.end(); it++)
{
ssl_peers.insert(*it);
}
}
private:
FakeLinkMgr *mLinkMgr;
};