ID cleaning

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IdCleaning@7099 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-02-07 22:48:26 +00:00
parent 18f5128319
commit c56e1627f4
33 changed files with 329 additions and 412 deletions

View file

@ -192,23 +192,23 @@ RsNxsNetMgrImpl::RsNxsNetMgrImpl(p3LinkMgr *lMgr)
}
std::string RsNxsNetMgrImpl::getOwnId()
const RsPeerId& RsNxsNetMgrImpl::getOwnId()
{
RsStackMutex stack(mNxsNetMgrMtx);
return mLinkMgr->getOwnId();
}
void RsNxsNetMgrImpl::getOnlineList(std::set<std::string> &ssl_peers)
void RsNxsNetMgrImpl::getOnlineList(std::set<RsPeerId> &ssl_peers)
{
ssl_peers.clear();
std::list<std::string> pList;
std::list<RsPeerId> pList;
{
RsStackMutex stack(mNxsNetMgrMtx);
mLinkMgr->getOnlineList(pList);
}
std::list<std::string>::const_iterator lit = pList.begin();
std::list<RsPeerId>::const_iterator lit = pList.begin();
for(; lit != pList.end(); lit++)
ssl_peers.insert(*lit);

View file

@ -81,8 +81,8 @@ class RsNxsNetMgr
public:
virtual ~RsNxsNetMgr(){};
virtual std::string getOwnId() = 0;
virtual void getOnlineList(std::set<std::string>& ssl_peers) = 0;
virtual const RsPeerId& getOwnId() = 0;
virtual void getOnlineList(std::set<RsPeerId>& ssl_peers) = 0;
};
@ -94,8 +94,8 @@ public:
RsNxsNetMgrImpl(p3LinkMgr* lMgr);
virtual ~RsNxsNetMgrImpl(){};
std::string getOwnId();
void getOnlineList(std::set<std::string>& ssl_peers);
const RsPeerId& getOwnId();
void getOnlineList(std::set<RsPeerId>& ssl_peers);
private:
@ -141,7 +141,7 @@ protected:
* @param authorId reputation to get
* @return true if successfully retrieve repution
*/
bool getAuthorRep(GixsReputation& rep, const std::string& authorId, const std::string& peerId);
bool getAuthorRep(GixsReputation& rep, const std::string& authorId, const RsPeerId& peerId);
private:
@ -182,11 +182,11 @@ class MsgRespPending : public AuthorPending
{
public:
MsgRespPending(RsGixsReputation* rep, const std::string& peerId, const MsgAuthorV& msgAuthV, int cutOff = 0);
MsgRespPending(RsGixsReputation* rep, const RsPeerId& peerId, const MsgAuthorV& msgAuthV, int cutOff = 0);
int getType() const;
bool accepted();
std::string mPeerId;
RsPeerId mPeerId;
MsgAuthorV mMsgAuthV;
int mCutOff;
};
@ -195,10 +195,10 @@ class GrpRespPending : public AuthorPending
{
public:
GrpRespPending(RsGixsReputation* rep, const std::string& peerId, const GrpAuthorV& grpAuthV, int cutOff = 0);
GrpRespPending(RsGixsReputation* rep, const RsPeerId& peerId, const GrpAuthorV& grpAuthV, int cutOff = 0);
int getType() const;
bool accepted();
std::string mPeerId;
RsPeerId mPeerId;
GrpAuthorV mGrpAuthV;
int mCutOff;
};
@ -261,23 +261,23 @@ private:
class GrpCircleIdRequestVetting : public GrpCircleVetting
{
public:
GrpCircleIdRequestVetting(RsGcxs* const circles, std::vector<GrpIdCircleVet> mGrpCircleV, const std::string& peerId);
GrpCircleIdRequestVetting(RsGcxs* const circles, std::vector<GrpIdCircleVet> mGrpCircleV, const RsPeerId& peerId);
bool cleared();
int getType() const;
std::vector<GrpIdCircleVet> mGrpCircleV;
std::string mPeerId;
RsPeerId mPeerId;
};
class MsgCircleIdsRequestVetting : public GrpCircleVetting
{
public:
MsgCircleIdsRequestVetting(RsGcxs* const circles, std::vector<MsgIdCircleVet> msgs, const RsGxsGroupId& grpId,
const std::string& peerId, const RsGxsCircleId& circleId);
const RsPeerId& peerId, const RsGxsCircleId& circleId);
bool cleared();
int getType() const;
std::vector<MsgIdCircleVet> mMsgs;
RsGxsGroupId mGrpId;
std::string mPeerId;
RsPeerId mPeerId;
RsGxsCircleId mCircleId;
};

View file

@ -109,7 +109,7 @@ public:
* @param enabled set to false to disable pause, and true otherwise
* @return request token to be redeemed
*/
virtual int requestGrp(const std::list<RsGxsGroupId>& grpId, const std::string& peerId) = 0;
virtual int requestGrp(const std::list<RsGxsGroupId>& grpId, const RsPeerId& peerId) = 0;
};