mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-19 04:44:21 -05:00
c98d6d1595
Obviously lots to do here - but its a start! git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7258 b45a01b8-16f6-495d-af2f-9b41ad6348cc
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 ;
|
|
};
|
|
|
|
|