MediaCall::MediaCall (GlooxAccount *acc, QXmppCall *call) : QObject (call) , Call_ (call) , Account_ (acc) { connect (Call_, SIGNAL (stateChanged (QXmppCall::State)), this, SLOT (handleStateChanged (QXmppCall::State))); connect (Call_, SIGNAL (audioModeChanged (QIODevice::OpenMode)), this, SIGNAL (audioModeChanged (QIODevice::OpenMode))); }
void xmppClient::slotCallReceived(QXmppCall *call) { bool check; Q_UNUSED(check); qDebug() << "Got call from:" << call->jid(); check = connect(call, SIGNAL(stateChanged(QXmppCall::State)), this, SLOT(slotCallStateChanged(QXmppCall::State))); Q_ASSERT(check); check = connect(call, SIGNAL(audioModeChanged(QIODevice::OpenMode)), this, SLOT(slotAudioModeChanged(QIODevice::OpenMode))); Q_ASSERT(check); // accept call call->accept(); }
void xmppClient::startCall() { bool check; Q_UNUSED(check); if (!m_turnFinished || m_recipientFullJid.isEmpty()) return; // start the call and connect to the its signals QXmppCall *call = callManager->call(m_recipientFullJid); check = connect(call, SIGNAL(stateChanged(QXmppCall::State)), this, SLOT(slotCallStateChanged(QXmppCall::State))); Q_ASSERT(check); check = connect(call, SIGNAL(audioModeChanged(QIODevice::OpenMode)), this, SLOT(slotAudioModeChanged(QIODevice::OpenMode))); Q_ASSERT(check); }