mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-04 09:05:34 -05:00
removed getVirtualPeerId method from rsmsgs lobby interface.
It is not neccesary anymore to have the virtual peer id exposed to the GUI layer.
This commit is contained in:
parent
67e1495d9a
commit
09ed1ea22c
@ -464,9 +464,11 @@ virtual void getOwnAvatarData(unsigned char *& data,int& size) = 0 ;
|
|||||||
/****************************************/
|
/****************************************/
|
||||||
|
|
||||||
virtual bool joinVisibleChatLobby(const ChatLobbyId& lobby_id,const RsGxsId& own_id) = 0 ;
|
virtual bool joinVisibleChatLobby(const ChatLobbyId& lobby_id,const RsGxsId& own_id) = 0 ;
|
||||||
virtual bool getVirtualPeerId(const ChatLobbyId& lobby_id,RsPeerId& vpid) = 0;
|
/// get ids of subscribed lobbies
|
||||||
virtual void getChatLobbyList(std::list<ChatLobbyId>& cl_list) = 0;
|
virtual void getChatLobbyList(std::list<ChatLobbyId>& cl_list) = 0;
|
||||||
|
/// get lobby info of a subscribed chat lobby. Returns true if lobby id is valid.
|
||||||
virtual bool getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& info) = 0 ;
|
virtual bool getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& info) = 0 ;
|
||||||
|
/// get info about all lobbies, subscribed and unsubscribed
|
||||||
virtual void getListOfNearbyChatLobbies(std::vector<VisibleChatLobbyRecord>& public_lobbies) = 0 ;
|
virtual void getListOfNearbyChatLobbies(std::vector<VisibleChatLobbyRecord>& public_lobbies) = 0 ;
|
||||||
virtual void invitePeerToLobby(const ChatLobbyId& lobby_id,const RsPeerId& peer_id) = 0;
|
virtual void invitePeerToLobby(const ChatLobbyId& lobby_id,const RsPeerId& peer_id) = 0;
|
||||||
virtual bool acceptLobbyInvite(const ChatLobbyId& id,const RsGxsId& identity) = 0 ;
|
virtual bool acceptLobbyInvite(const ChatLobbyId& id,const RsGxsId& identity) = 0 ;
|
||||||
|
@ -444,11 +444,6 @@ void p3Msgs::setCustomStateString(const std::string& state_string)
|
|||||||
mChatSrv->setOwnCustomStateString(state_string) ;
|
mChatSrv->setOwnCustomStateString(state_string) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3Msgs::getVirtualPeerId(const ChatLobbyId& id,RsPeerId& peer_id)
|
|
||||||
{
|
|
||||||
return mChatSrv->getVirtualPeerId(id,peer_id) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool p3Msgs::getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& linfo)
|
bool p3Msgs::getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& linfo)
|
||||||
{
|
{
|
||||||
return mChatSrv->getChatLobbyInfo(id,linfo) ;
|
return mChatSrv->getChatLobbyInfo(id,linfo) ;
|
||||||
|
@ -138,7 +138,6 @@ class p3Msgs: public RsMsgs
|
|||||||
|
|
||||||
virtual bool joinVisibleChatLobby(const ChatLobbyId& id, const RsGxsId &own_id) ;
|
virtual bool joinVisibleChatLobby(const ChatLobbyId& id, const RsGxsId &own_id) ;
|
||||||
virtual void getListOfNearbyChatLobbies(std::vector<VisibleChatLobbyRecord>& public_lobbies) ;
|
virtual void getListOfNearbyChatLobbies(std::vector<VisibleChatLobbyRecord>& public_lobbies) ;
|
||||||
virtual bool getVirtualPeerId(const ChatLobbyId& id,RsPeerId& vpid) ;
|
|
||||||
virtual void getChatLobbyList(std::list<ChatLobbyId>& cl_list) ;
|
virtual void getChatLobbyList(std::list<ChatLobbyId>& cl_list) ;
|
||||||
virtual bool getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& info) ;
|
virtual bool getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& info) ;
|
||||||
virtual void invitePeerToLobby(const ChatLobbyId&, const RsPeerId&) ;
|
virtual void invitePeerToLobby(const ChatLobbyId&, const RsPeerId&) ;
|
||||||
|
@ -501,10 +501,7 @@ void ChatLobbyWidget::updateDisplay()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
bool subscribed = false;
|
bool subscribed = std::find(lobbies.begin(), lobbies.end(), lobby.lobby_id) != lobbies.end();
|
||||||
if (rsMsgs->getVirtualPeerId(lobby.lobby_id, vpid)) {
|
|
||||||
subscribed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTreeWidgetItem *item = NULL;
|
QTreeWidgetItem *item = NULL;
|
||||||
QTreeWidgetItem *lobby_item =NULL;
|
QTreeWidgetItem *lobby_item =NULL;
|
||||||
@ -1101,13 +1098,10 @@ void ChatLobbyWidget::readChatLobbyInvites()
|
|||||||
continue ;
|
continue ;
|
||||||
}
|
}
|
||||||
|
|
||||||
rsMsgs->acceptLobbyInvite((*it).lobby_id,chosen_id);
|
if(rsMsgs->acceptLobbyInvite((*it).lobby_id,chosen_id))
|
||||||
|
|
||||||
RsPeerId vpid;
|
|
||||||
if(rsMsgs->getVirtualPeerId((*it).lobby_id,vpid ))
|
|
||||||
ChatDialog::chatFriend(ChatId((*it).lobby_id),true);
|
ChatDialog::chatFriend(ChatId((*it).lobby_id),true);
|
||||||
else
|
else
|
||||||
std::cerr << "No lobby known with id 0x" << std::hex << (*it).lobby_id << std::dec << std::endl;
|
std::cerr << "Can't join lobby with id 0x" << std::hex << (*it).lobby_id << std::dec << std::endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user