mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 01:55:19 -04:00
added chat lobby creation window
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ChatLobby@4709 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a0e3522273
commit
71a079b55f
10 changed files with 552 additions and 12 deletions
|
@ -226,6 +226,19 @@ void p3ChatService::checkSizeAndSendMessage(RsChatMsgItem *msg)
|
|||
sendItem(msg) ;
|
||||
}
|
||||
|
||||
bool p3ChatService::getVirtualPeerId(const ChatLobbyId& id,std::string& vpid)
|
||||
{
|
||||
RsStackMutex stack(mChatMtx); /********** STACK LOCKED MTX ******/
|
||||
|
||||
std::map<ChatLobbyId,ChatLobbyEntry>::const_iterator it(_chat_lobbys.find(id)) ;
|
||||
|
||||
if(it == _chat_lobbys.end())
|
||||
return false ;
|
||||
|
||||
vpid = it->second.virtual_peer_id ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
void p3ChatService::locked_printDebugInfo() const
|
||||
{
|
||||
std::cerr << "Recorded lobbies: " << std::endl;
|
||||
|
@ -260,9 +273,6 @@ bool p3ChatService::isLobbyId(const std::string& id,ChatLobbyId& lobby_id)
|
|||
|
||||
locked_printDebugInfo() ; // debug
|
||||
|
||||
for( std::map<std::string,ChatLobbyId>::const_iterator it(_lobby_ids.begin()) ;it!=_lobby_ids.end();++it)
|
||||
std::cerr << "Testing \"" << id << "\" against \"" << it->first << "\" result=" << (it->first == id) << std::endl;
|
||||
|
||||
std::map<std::string,ChatLobbyId>::const_iterator it(_lobby_ids.find(id)) ;
|
||||
|
||||
if(it != _lobby_ids.end())
|
||||
|
|
|
@ -153,6 +153,7 @@ class p3ChatService: public p3Service, public p3Config, public pqiMonitor
|
|||
*/
|
||||
bool clearPrivateChatQueue(bool incoming, const std::string &id);
|
||||
|
||||
bool getVirtualPeerId(const ChatLobbyId&, std::string& virtual_peer_id) ;
|
||||
bool isLobbyId(const std::string&, ChatLobbyId&) ;
|
||||
void getChatLobbyList(std::list<ChatLobbyInfo, std::allocator<ChatLobbyInfo> >&) ;
|
||||
bool acceptLobbyInvite(const ChatLobbyId& id) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue