mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 23:55:35 -04:00
turned some std::list<PeerId> into std::set, as it automatically prevents duplicates
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8138 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f1309a8cbe
commit
c9d5c7b3cb
51 changed files with 269 additions and 266 deletions
|
@ -101,7 +101,7 @@ virtual bool getChannelAutoDownload(const RsGxsGroupId &groupid) = 0;
|
|||
//virtual bool setGroupSubscribeFlags(const std::string &groupId, uint32_t subscribeFlags, uint32_t subscribeMask);
|
||||
|
||||
//virtual bool groupRestoreKeys(const std::string &groupId);
|
||||
virtual bool groupShareKeys(const RsGxsGroupId &groupId, std::list<RsPeerId>& peers)=0;
|
||||
virtual bool groupShareKeys(const RsGxsGroupId &groupId, std::set<RsPeerId>& peers)=0;
|
||||
|
||||
// Overloaded subscribe fn.
|
||||
virtual bool subscribeToGroup(uint32_t &token, const RsGxsGroupId &groupId, bool subscribe) = 0;
|
||||
|
|
|
@ -78,9 +78,9 @@ class RsGxsCircleGroup
|
|||
public:
|
||||
RsGroupMetaData mMeta; // includes GxsPermissions, for control of group distribution.
|
||||
|
||||
std::list<RsPgpId> mLocalFriends;
|
||||
std::list<RsGxsId> mInvitedMembers;
|
||||
std::list<RsGxsCircleId> mSubCircles;
|
||||
std::set<RsPgpId> mLocalFriends;
|
||||
std::set<RsGxsId> mInvitedMembers;
|
||||
std::set<RsGxsCircleId> mSubCircles;
|
||||
|
||||
// Not Serialised.
|
||||
// Internally inside rsCircles, this will be turned into:
|
||||
|
|
|
@ -185,15 +185,15 @@ public:
|
|||
|
||||
// friend destinations
|
||||
//
|
||||
std::list<RsPeerId> rspeerid_msgto; // RsPeerId is used here for various purposes:
|
||||
std::list<RsPeerId> rspeerid_msgcc; // - real peer ids which are actual friend locations
|
||||
std::list<RsPeerId> rspeerid_msgbcc; // -
|
||||
std::set<RsPeerId> rspeerid_msgto; // RsPeerId is used here for various purposes:
|
||||
std::set<RsPeerId> rspeerid_msgcc; // - real peer ids which are actual friend locations
|
||||
std::set<RsPeerId> rspeerid_msgbcc; // -
|
||||
|
||||
// distant peers
|
||||
//
|
||||
std::list<RsGxsId> rsgxsid_msgto; // RsPeerId is used here for various purposes:
|
||||
std::list<RsGxsId> rsgxsid_msgcc; // - real peer ids which are actual friend locations
|
||||
std::list<RsGxsId> rsgxsid_msgbcc; // -
|
||||
std::set<RsGxsId> rsgxsid_msgto; // RsPeerId is used here for various purposes:
|
||||
std::set<RsGxsId> rsgxsid_msgcc; // - real peer ids which are actual friend locations
|
||||
std::set<RsGxsId> rsgxsid_msgbcc; // -
|
||||
|
||||
std::string title;
|
||||
std::string msg;
|
||||
|
@ -474,7 +474,7 @@ virtual bool setDefaultIdentityForChatLobby(const RsGxsId& nick) = 0;
|
|||
virtual bool getDefaultIdentityForChatLobby(RsGxsId& id) = 0 ;
|
||||
virtual void setLobbyAutoSubscribe(const ChatLobbyId& lobby_id, const bool autoSubscribe) = 0 ;
|
||||
virtual bool getLobbyAutoSubscribe(const ChatLobbyId& lobby_id) = 0 ;
|
||||
virtual ChatLobbyId createChatLobby(const std::string& lobby_name,const RsGxsId& lobby_identity,const std::string& lobby_topic,const std::list<RsPeerId>& invited_friends,ChatLobbyFlags lobby_privacy_type) = 0 ;
|
||||
virtual ChatLobbyId createChatLobby(const std::string& lobby_name,const RsGxsId& lobby_identity,const std::string& lobby_topic,const std::set<RsPeerId>& invited_friends,ChatLobbyFlags lobby_privacy_type) = 0 ;
|
||||
|
||||
/****************************************/
|
||||
/* Distant chat */
|
||||
|
|
|
@ -277,7 +277,7 @@ public:
|
|||
std::string name;
|
||||
uint32_t flag;
|
||||
|
||||
std::list<RsPgpId> peerIds;
|
||||
std::set<RsPgpId> peerIds;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const RsPeerDetails &detail);
|
||||
|
@ -319,7 +319,7 @@ class RsPeers
|
|||
virtual bool getGPGSignedList(std::list<RsPgpId> &gpg_ids) = 0;//friends that we accpet to connect with but we don't want to sign their gpg key
|
||||
virtual bool getGPGValidList(std::list<RsPgpId> &gpg_ids) = 0;
|
||||
virtual bool getGPGAllList(std::list<RsPgpId> &gpg_ids) = 0;
|
||||
virtual bool getAssociatedSSLIds(const RsPgpId& gpg_id, std::list<RsPeerId>& ids) = 0;
|
||||
virtual bool getAssociatedSSLIds(const RsPgpId& gpg_id, std::list<RsPeerId>& ids) = 0;
|
||||
virtual bool gpgSignData(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen) = 0;
|
||||
|
||||
/* Add/Remove Friends */
|
||||
|
@ -328,7 +328,7 @@ class RsPeers
|
|||
virtual bool removeFriendLocation(const RsPeerId& sslId) = 0;
|
||||
|
||||
/* keyring management */
|
||||
virtual bool removeKeysFromPGPKeyring(const std::list<RsPgpId>& pgp_ids,std::string& backup_file,uint32_t& error_code)=0 ;
|
||||
virtual bool removeKeysFromPGPKeyring(const std::set<RsPgpId>& pgp_ids,std::string& backup_file,uint32_t& error_code)=0 ;
|
||||
|
||||
/* Network Stuff */
|
||||
virtual bool connectAttempt(const RsPeerId& ssl_id) = 0;
|
||||
|
|
|
@ -100,7 +100,7 @@ virtual bool createPost(uint32_t &token, RsPostedPost &post) = 0;
|
|||
|
||||
virtual bool updateGroup(uint32_t &token, RsPostedGroup &group) = 0;
|
||||
|
||||
virtual bool groupShareKeys(const RsGxsGroupId& group,const std::list<RsPeerId>& peers) = 0 ;
|
||||
virtual bool groupShareKeys(const RsGxsGroupId& group,const std::set<RsPeerId>& peers) = 0 ;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue