mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-11 04:05:38 +08:00
Replaced set of voice connection signals with one general
The different IVoice signals representing a single event from the voice connection have been replaced by a general signal emitted when something per com unit has changed. It passes old and new status. refs #105
This commit is contained in:
@@ -21,8 +21,7 @@ Client::Client(QObject *parent) :
|
||||
using namespace BlackCore;
|
||||
connect(m_voiceClient, &IVoice::squelchTestFinished, this, &Client::onSquelchTestFinished);
|
||||
connect(m_voiceClient, &IVoice::micTestFinished, this, &Client::onMicTestFinished);
|
||||
connect(m_voiceClient, &IVoice::connected, this, &Client::connectionStatusConnected);
|
||||
connect(m_voiceClient, &IVoice::disconnected, this, &Client::connectionStatusDisconnected);
|
||||
connect(m_voiceClient, &IVoice::connectionStatusChanged, this, &Client::connectionStatusChanged);
|
||||
connect(m_voiceClient, &IVoice::audioStarted, this, &Client::audioStartedStream);
|
||||
connect(m_voiceClient, &IVoice::audioStopped, this, &Client::audioStoppedStream);
|
||||
connect(m_voiceClient, &IVoice::userJoinedRoom, this, &Client::userJoinedRoom);
|
||||
@@ -179,15 +178,31 @@ void Client::onMicTestFinished()
|
||||
printLinePrefix();
|
||||
}
|
||||
|
||||
void Client::connectionStatusConnected(const BlackCore::IVoice::ComUnit /** comUnit **/)
|
||||
void Client::connectionStatusChanged(BlackCore::IVoice::ComUnit /** comUnit **/,
|
||||
BlackCore::IVoice::ConnectionStatus /** oldStatus **/,
|
||||
BlackCore::IVoice::ConnectionStatus newStatus)
|
||||
{
|
||||
std::cout << "CONN_STATUS_CONNECTED" << std::endl;
|
||||
printLinePrefix();
|
||||
}
|
||||
|
||||
void Client::connectionStatusDisconnected()
|
||||
{
|
||||
std::cout << "CONN_STATUS_DISCONNECTED" << std::endl;
|
||||
switch (newStatus)
|
||||
{
|
||||
case BlackCore::IVoice::Disconnected:
|
||||
std::cout << "CONN_STATUS_DISCONNECTED" << std::endl;
|
||||
break;
|
||||
case BlackCore::IVoice::Disconnecting:
|
||||
std::cout << "CONN_STATUS_DISCONNECTING" << std::endl;
|
||||
break;
|
||||
case BlackCore::IVoice::DisconnectedError:
|
||||
std::cout << "CONN_STATUS_DISCONNECTED_ERROR" << std::endl;
|
||||
break;
|
||||
case BlackCore::IVoice::Connecting:
|
||||
std::cout << "CONN_STATUS_CONNECTING" << std::endl;
|
||||
break;
|
||||
case BlackCore::IVoice::Connected:
|
||||
std::cout << "CONN_STATUS_CONNECTED" << std::endl;
|
||||
break;
|
||||
case BlackCore::IVoice::ConnectingFailed:
|
||||
std::cout << "CONN_STATUS_CONNECTING_FAILED" << std::endl;
|
||||
break;
|
||||
}
|
||||
printLinePrefix();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user