void ServiceServerLink::clearCalls() { CallInfoPtr local_current; { boost::mutex::scoped_lock lock(call_queue_mutex_); local_current = current_call_; } if (local_current) { cancelCall(local_current); } boost::mutex::scoped_lock lock(call_queue_mutex_); while (!call_queue_.empty()) { CallInfoPtr info = call_queue_.front(); cancelCall(info); call_queue_.pop(); } }
void ChatForm::onCancelCallTriggered() { qDebug() << "onCancelCallTriggered"; enableCallButtons(); hideNetcam(); emit cancelCall(callId, f->getFriendID()); }
CoreAV::~CoreAV() { for (const auto& call : calls) { cancelCall(call.first); } killTimerFromThread(); toxav_kill(toxav); coreavThread->exit(0); while (coreavThread->isRunning()) { qApp->processEvents(); coreavThread->wait(100); } }
CoreAV::~CoreAV() { for (const ToxFriendCall& call : calls) cancelCall(call.callId); killTimerFromThread(); toxav_kill(toxav); coreavThread->exit(0); while (coreavThread->isRunning()) { qApp->processEvents(); coreavThread->wait(100); } }
void CoreAV::timeoutCall(uint32_t friendNum) { // Non-blocking switch to the CoreAV thread, we really don't want to be coming // blocking-queued from the UI thread while we emit blocking-queued to it if (QThread::currentThread() != coreavThread.get()) { QMetaObject::invokeMethod(this, "timeoutCall", Qt::QueuedConnection, Q_ARG(uint32_t, friendNum)); return; } if (!cancelCall(friendNum)) { qWarning() << QString("Failed to timeout call with %1").arg(friendNum); return; } qDebug() << "Call with friend" << friendNum << "timed out"; }
void ChatForm::onCancelCallTriggered() { qDebug() << "onCancelCallTriggered"; audioInputFlag = false; audioOutputFlag = false; micButton->setObjectName("green"); micButton->style()->polish(micButton); volButton->setObjectName("green"); volButton->style()->polish(volButton); callButton->disconnect(); videoButton->disconnect(); callButton->setObjectName("green"); callButton->style()->polish(callButton); callButton->disconnect(); videoButton->setObjectName("green"); videoButton->style()->polish(videoButton); videoButton->disconnect(); connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered())); connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered())); netcam->hide(); emit cancelCall(callId, f->friendId); }
void UserWin::callContact(QString const& _contact) { QLabel _logo; QLabel _text; QPushButton _cancel; QVBoxLayout _mainLayout; QHBoxLayout _logoLayout; QHBoxLayout _buttonLayout; QHBoxLayout _textLayout; if (!_selected.isNull()) { this->_connectedContact = _contact; this->_callWin.setFixedSize(300, 350); _cancel.setText("Annuler"); _logo.setPixmap(QPixmap(QCoreApplication::applicationDirPath() + "/ressources/Lcall.png")); _logoLayout.setAlignment(Qt::AlignCenter); _logoLayout.addWidget(&_logo); this->_connectedContact.append(": Appel en cours ..."); _text.setText(this->_connectedContact); _text.setAlignment(Qt::AlignCenter); _textLayout.addWidget(&_text); _cancel.setCursor(Qt::PointingHandCursor); _buttonLayout.setAlignment(Qt::AlignBottom); _buttonLayout.addWidget(&_cancel); _mainLayout.addLayout(&_logoLayout); _mainLayout.addLayout(&_textLayout); _mainLayout.addLayout(&_buttonLayout); this->_callWin.setLayout(&_mainLayout); this->_callWin.setWindowTitle("Appel en cours ..."); this->_callWin.setWindowIcon(QIcon(QCoreApplication::applicationDirPath() + "/ressources/babybel.png")); this->call(this->getClientId(), QHostAddress ("127.0.0.1")); connect(&_cancel, SIGNAL(clicked()), this, SLOT(cancelCall())); this->_callWin.exec(); } }