Patch (modified) from Phenom to allow auto-subscribe to chat lobbies

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6466 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-06-29 16:15:33 +00:00
parent 9f88917ac1
commit 7414659bd9
12 changed files with 243 additions and 16 deletions

View file

@ -66,6 +66,7 @@ const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_EVENT = 0x10 ;
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_LIST_deprecated2 = 0x11 ; // to be removed (deprecated since 02 Dec. 2012)
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_LIST = 0x12 ;
const uint8_t RS_PKT_SUBTYPE_DISTANT_INVITE_CONFIG = 0x13 ;
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_CONFIG = 0x15 ;
// for defining tags themselves and msg tags
const uint8_t RS_PKT_SUBTYPE_MSG_TAG_TYPE = 0x03;
@ -337,7 +338,23 @@ class RsPrivateChatDistantInviteConfigItem: public RsChatItem
uint32_t time_of_validity ;
uint32_t last_hit_time ;
};
class RsChatLobbyConfigItem: public RsChatItem
{
public:
RsChatLobbyConfigItem() :RsChatItem(RS_PKT_SUBTYPE_CHAT_LOBBY_CONFIG) { lobby_Id = 0; }
RsChatLobbyConfigItem(void *data,uint32_t size) ; // deserialization
virtual ~RsChatLobbyConfigItem() {}
virtual void clear() { lobby_Id = 0; }
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
uint64_t lobby_Id;
uint32_t flags ;
};
// This class contains activity info for the sending peer: active, idle, typing, etc.
//