mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
27 lines
667 B
C
27 lines
667 B
C
|
#pragma once
|
||
|
|
||
|
#include <list>
|
||
|
#include <retroshare/rsids.h>
|
||
|
#include <pqi/p3peermgr.h>
|
||
|
|
||
|
class FakePeerMgr: public p3PeerMgrIMPL
|
||
|
{
|
||
|
public:
|
||
|
FakePeerMgr(const RsPeerId& own,const std::list<RsPeerId>& ids)
|
||
|
: p3PeerMgrIMPL(own,RsPgpId(),"no name","location name")
|
||
|
{
|
||
|
for(std::list<RsPeerId>::const_iterator it(ids.begin());it!=ids.end();++it)
|
||
|
_ids.insert(*it) ;
|
||
|
}
|
||
|
|
||
|
virtual bool idFriend(const RsPeerId& ssl_id) { return _ids.find(ssl_id) != _ids.end() ; }
|
||
|
|
||
|
virtual ServicePermissionFlags servicePermissionFlags(const RsPeerId& /*ssl_id*/)
|
||
|
{
|
||
|
return ~ServicePermissionFlags(0) ;
|
||
|
}
|
||
|
std::set<RsPeerId> _ids ;
|
||
|
};
|
||
|
|
||
|
|