mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 18:45:17 -04:00
Groups for friends in PeersDialog.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3523 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8b1ffdb5d9
commit
077b2871f1
23 changed files with 1784 additions and 544 deletions
|
@ -230,6 +230,7 @@ const int NOTIFY_LIST_MESSAGE_TAGS = 12;
|
|||
const int NOTIFY_LIST_PUBLIC_CHAT = 13;
|
||||
const int NOTIFY_LIST_PRIVATE_INCOMING_CHAT = 14;
|
||||
const int NOTIFY_LIST_PRIVATE_OUTGOING_CHAT = 15;
|
||||
const int NOTIFY_LIST_GROUPLIST = 16;
|
||||
|
||||
const int NOTIFY_TYPE_SAME = 0x01;
|
||||
const int NOTIFY_TYPE_MOD = 0x02; /* general purpose, check all */
|
||||
|
|
|
@ -61,6 +61,15 @@ const uint32_t RS_PEER_STATE_ONLINE = 0x0002;
|
|||
const uint32_t RS_PEER_STATE_CONNECTED = 0x0004;
|
||||
const uint32_t RS_PEER_STATE_UNREACHABLE= 0x0008;
|
||||
|
||||
/* Groups */
|
||||
#define RS_GROUP_ID_FRIENDS "Friends"
|
||||
#define RS_GROUP_ID_FAMILY "Family"
|
||||
#define RS_GROUP_ID_COWORKERS "Co-Workers"
|
||||
#define RS_GROUP_ID_OTHERS "Other Contacts"
|
||||
#define RS_GROUP_ID_FAVORITES "Favorites"
|
||||
|
||||
const uint32_t RS_GROUP_FLAG_STANDARD = 0x0001;
|
||||
|
||||
/* A couple of helper functions for translating the numbers games */
|
||||
|
||||
std::string RsPeerTrustString(uint32_t trustLvl);
|
||||
|
@ -119,6 +128,18 @@ class RsPeerDetails
|
|||
uint32_t connectPeriod;
|
||||
};
|
||||
|
||||
class RsGroupInfo
|
||||
{
|
||||
public:
|
||||
RsGroupInfo();
|
||||
|
||||
std::string id;
|
||||
std::string name;
|
||||
uint32_t flag;
|
||||
|
||||
std::list<std::string> peerIds;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const RsPeerDetails &detail);
|
||||
|
||||
class RsPeers
|
||||
|
@ -191,6 +212,16 @@ virtual bool setAcceptToConnectGPGCertificate(std::string gpg_id, bool acceptanc
|
|||
virtual bool signGPGCertificate(std::string gpg_id) = 0;
|
||||
virtual bool trustGPGCertificate(std::string gpg_id, uint32_t trustlvl) = 0;
|
||||
|
||||
/* Group Stuff */
|
||||
virtual bool addGroup(RsGroupInfo &groupInfo) = 0;
|
||||
virtual bool editGroup(const std::string &groupId, RsGroupInfo &groupInfo) = 0;
|
||||
virtual bool removeGroup(const std::string &groupId) = 0;
|
||||
virtual bool getGroupInfo(const std::string &groupId, RsGroupInfo &groupInfo) = 0;
|
||||
virtual bool getGroupInfoList(std::list<RsGroupInfo> &groupInfoList) = 0;
|
||||
// groupId == "" && assign == false -> remove from all groups
|
||||
virtual bool assignPeerToGroup(const std::string &groupId, const std::string &peerId, bool assign) = 0;
|
||||
virtual bool assignPeersToGroup(const std::string &groupId, const std::list<std::string> &peerIds, bool assign) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue