- Added chat lobby privacy type to lobby invite => lobby type is propagated correctly to friends

that are invited.
- added auto-clean of nicknames
- added auto-clean of public lobby records.

Warning: this commit breaks one small bit of compatibility:
 * direct invitations from new versions will pass accross versions (private lobbies will need the new version)
 * but people can still join public lobbies accross versions.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4801 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-01-14 21:09:04 +00:00
parent 79998dd70c
commit 036bd64811
5 changed files with 83 additions and 21 deletions

View file

@ -155,6 +155,7 @@ class ChatLobbyInvite
ChatLobbyId lobby_id ;
std::string peer_id ;
std::string lobby_name ;
uint32_t lobby_privacy_level ;
};
class PublicChatLobbyRecord
{
@ -163,9 +164,10 @@ class PublicChatLobbyRecord
ChatLobbyId lobby_id ; // unique id of the lobby
std::string lobby_name ; // name to use for this lobby
std::set<std::string> participating_friends ; // list of direct friend who participate. Used to broadcast sent messages.
std::set<std::string> participating_friends ; // list of direct friend who participate.
uint32_t total_number_of_peers ; // total number of particpating peers. Might not be
time_t last_report_time ; // last time the lobby was reported.
};
class ChatLobbyInfo
{
@ -175,8 +177,8 @@ class ChatLobbyInfo
std::set<std::string> participating_friends ; // list of direct friend who participate. Used to broadcast sent messages.
std::string nick_name ; // nickname to use for this lobby
uint32_t lobby_privacy_level ; // see RS_CHAT_LOBBY_
std::set<std::string> nick_names ; // list of non direct friend who participate. Used to display only.
uint32_t lobby_privacy_level ; // see RS_CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC / RS_CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE
std::map<std::string,time_t> nick_names ; // list of non direct friend who participate. Used to display only.
time_t last_activity ; // last recorded activity. Useful for removing dead lobbies.
};