mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 01:55:19 -04:00
Basic methods and a bit of interface for chat lobby.
Next: - chat lobby algorithmics (cache+broadcast system) - invitation handling - specification of chat lobby window with list of known/unknown participants git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ChatLobby@4685 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d9244225b7
commit
5cdc36d730
9 changed files with 1137 additions and 116 deletions
|
@ -1135,3 +1135,33 @@ void p3ChatService::statusChange(const std::list<pqipeer> &plist)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//********************** Chat Lobby Stuff ***********************//
|
||||
|
||||
bool p3ChatService::sendLobbyChat(const std::wstring& msg, const ChatLobbyId& lobby_id)
|
||||
{
|
||||
std::cerr << "Sending chat lobby message to lobby " << lobby_id << std::endl;
|
||||
std::cerr << "msg:" << std::endl;
|
||||
std::cerr << msg.c_str() << std::endl;
|
||||
return true ;
|
||||
}
|
||||
void p3ChatService::getChatLobbyList(std::list<ChatLobbyInfo>& linfos)
|
||||
{
|
||||
// fill up a dummy list for now.
|
||||
|
||||
linfos.clear() ;
|
||||
|
||||
ChatLobbyInfo info ;
|
||||
info.lobby_id = 0x38484fe ;
|
||||
info.display_name = "lobby 1" ;
|
||||
info.participating_friends.push_back("friend 1") ;
|
||||
info.participating_friends.push_back("friend 2") ;
|
||||
info.additional_peers.push_back("peer 1") ;
|
||||
|
||||
linfos.push_back(info) ;
|
||||
}
|
||||
void p3ChatService::invitePeerToLobby(const ChatLobbyId& lobby_id, const std::string& peer_id)
|
||||
{
|
||||
std::cerr << "Sending invitation to peer " << peer_id << " to lobby "<< lobby_id << std::endl;
|
||||
}
|
||||
|
||||
|
|
|
@ -153,6 +153,11 @@ class p3ChatService: public p3Service, public p3Config, public pqiMonitor
|
|||
*/
|
||||
bool clearPrivateChatQueue(bool incoming, const std::string &id);
|
||||
|
||||
bool sendLobbyChat(const std::wstring&, const ChatLobbyId&) ;
|
||||
void getChatLobbyList(std::list<ChatLobbyInfo, std::allocator<ChatLobbyInfo> >&) ;
|
||||
void invitePeerToLobby(const ChatLobbyId&, const std::string&) ;
|
||||
|
||||
|
||||
protected:
|
||||
/************* from p3Config *******************/
|
||||
virtual RsSerialiser *setupSerialiser() ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue