MCPcopy Create free account
hub / github.com/RetroShare/RetroShare / ReceivedInvitation

Method ReceivedInvitation

plugins/VOIP/gui/VOIPGUIHandler.cpp:31–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#include "gui/settings/rsharesettings.h"
30
31void VOIPGUIHandler::ReceivedInvitation(const RsPeerId &peer_id, int flags)
32{
33#ifdef VOIPGUIHANDLER_DEBUG
34 std::cerr << "****** VOIPGUIHandler: received Invitation from peer " << peer_id.toStdString() << " with flags==" << flags << std::endl;
35#endif
36 ChatDialog *di = ChatDialog::getChat(ChatId(peer_id), Settings->getChatFlags());
37 if (di) {
38 ChatWidget *cw = di->getChatWidget();
39 if(cw) {
40 const QList<ChatWidgetHolder*> &chatWidgetHolderList = cw->chatWidgetHolderList();
41
42 foreach (ChatWidgetHolder *chatWidgetHolder, chatWidgetHolderList)
43 {
44 VOIPChatWidgetHolder *acwh = dynamic_cast<VOIPChatWidgetHolder*>(chatWidgetHolder) ;
45
46 if (acwh)
47 acwh->ReceivedInvitation(peer_id, flags);
48 }
49 }
50 } else {
51 std::cerr << "VOIPGUIHandler::ReceivedInvitation() Error: received invitaion call for a chat dialog that does not stand VOIP (Peer id = " << peer_id.toStdString() << "!" << std::endl;
52 }
53}
54
55void VOIPGUIHandler::ReceivedVoipHangUp(const RsPeerId &peer_id, int flags)
56{

Callers 1

foreachFunction · 0.45

Calls 2

getChatFlagsMethod · 0.80
getChatWidgetMethod · 0.45

Tested by

no test coverage detected