added load/save to service permission matrix

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7906 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-02-03 21:28:32 +00:00
parent 96bf79daae
commit 7642ba1c1f
8 changed files with 238 additions and 28 deletions

View file

@ -81,23 +81,23 @@ std::ostream &operator<<(std::ostream &out, const RsServiceInfo &info);
class RsServicePermissions
{
public:
RsServicePermissions();
public:
RsServicePermissions();
bool peerHasPermission(const RsPeerId &peerId) const;
void setPermission(const RsPeerId& peerId) ;
void resetPermission(const RsPeerId& peerId) ;
uint32_t mServiceId;
std::string mServiceName;
uint32_t mServiceId;
std::string mServiceName;
bool mDefaultAllowed;
// note only one of these is checked.
// if DefaultAllowed = true, then only PeersDenied is checked.
// if DefaultAllowed = false, then only PeersAllowed is checked.
std::set<RsPeerId> mPeersAllowed;
std::set<RsPeerId> mPeersDenied;
bool mDefaultAllowed;
// note only one of these is checked.
// if DefaultAllowed = true, then only PeersDenied is checked.
// if DefaultAllowed = false, then only PeersAllowed is checked.
std::set<RsPeerId> mPeersAllowed;
std::set<RsPeerId> mPeersDenied;
};
class RsServiceControl