2014-04-10 04:46:15 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
#include <retroshare/rsids.h>
|
|
|
|
#include <pqi/p3linkmgr.h>
|
|
|
|
#include <pqi/p3servicecontrol.h>
|
|
|
|
|
|
|
|
class FakeServiceControl: public p3ServiceControl
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FakeServiceControl(p3LinkMgr *lm)
|
|
|
|
: p3ServiceControl(lm),mLink(lm)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-09-19 15:28:26 -04:00
|
|
|
virtual void getPeersConnected(uint32_t serviceId, std::set<RsPeerId> &peerSet)
|
2014-04-10 04:46:15 -04:00
|
|
|
{
|
|
|
|
(void) serviceId;
|
|
|
|
std::list<RsPeerId> ids ;
|
|
|
|
mLink->getOnlineList(ids) ;
|
|
|
|
|
|
|
|
for(std::list<RsPeerId>::const_iterator it(ids.begin());it!=ids.end();++it)
|
|
|
|
peerSet.insert(*it) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual bool checkFilter(uint32_t,const RsPeerId& id)
|
|
|
|
{
|
|
|
|
(void) id;
|
|
|
|
return true ;
|
|
|
|
}
|
|
|
|
p3LinkMgr *mLink;
|
|
|
|
};
|
|
|
|
|