mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
Changed sample so it works with latest changes, such as
* CCallsignList * CCallsign, instead of QString
This commit is contained in:
@@ -5,8 +5,11 @@
|
|||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "blackmisc/vaudiodevicelist.h"
|
#include "blackmisc/vaudiodevicelist.h"
|
||||||
|
#include "blackmisc/avcallsignlist.h"
|
||||||
|
|
||||||
using namespace BlackMisc::Voice;
|
using namespace BlackMisc::Voice;
|
||||||
|
using namespace BlackMisc::Aviation;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Client
|
* Client
|
||||||
@@ -156,10 +159,10 @@ void Client::outputDevicesCmd(QTextStream & /** args **/)
|
|||||||
void Client::listCallsignsCmd(QTextStream &args)
|
void Client::listCallsignsCmd(QTextStream &args)
|
||||||
{
|
{
|
||||||
Q_UNUSED(args)
|
Q_UNUSED(args)
|
||||||
QSet<QString> users = m_voiceClient->getVoiceRoomCallsings(BlackCore::IVoice::COM1);
|
CCallsignList callsigns = m_voiceClient->getVoiceRoomCallsigns(BlackCore::IVoice::COM1);
|
||||||
foreach(QString user, users)
|
foreach(CCallsign callsign, callsigns)
|
||||||
{
|
{
|
||||||
std::cout << " " << user.toStdString() << std::endl;
|
std::cout << " " << callsign.toStdString() << std::endl;
|
||||||
}
|
}
|
||||||
printLinePrefix();
|
printLinePrefix();
|
||||||
}
|
}
|
||||||
@@ -200,13 +203,13 @@ void Client::audioStoppedStream(const BlackCore::IVoice::ComUnit comUnit)
|
|||||||
printLinePrefix();
|
printLinePrefix();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::userJoinedRoom(const QString &callsign)
|
void Client::userJoinedRoom(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
std::cout << callsign.toStdString() << " joined the voice room." << std::endl;
|
std::cout << callsign.toStdString() << " joined the voice room." << std::endl;
|
||||||
printLinePrefix();
|
printLinePrefix();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::userLeftRoom(const QString &callsign)
|
void Client::userLeftRoom(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
std::cout << callsign.toStdString() << " left the voice room." << std::endl;
|
std::cout << callsign.toStdString() << " left the voice room." << std::endl;
|
||||||
printLinePrefix();
|
printLinePrefix();
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ private slots:
|
|||||||
void connectionStatusDisconnected();
|
void connectionStatusDisconnected();
|
||||||
void audioStartedStream(const BlackCore::IVoice::ComUnit comUnit);
|
void audioStartedStream(const BlackCore::IVoice::ComUnit comUnit);
|
||||||
void audioStoppedStream(const BlackCore::IVoice::ComUnit comUnit);
|
void audioStoppedStream(const BlackCore::IVoice::ComUnit comUnit);
|
||||||
void userJoinedRoom(const QString &callsign);
|
void userJoinedRoom(const BlackMisc::Aviation::CCallsign &callsign);
|
||||||
void userLeftRoom(const QString &callsign);
|
void userLeftRoom(const BlackMisc::Aviation::CCallsign &callsign);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QMap<QString, std::function<void(QTextStream &)>> m_commands;
|
QMap<QString, std::function<void(QTextStream &)>> m_commands;
|
||||||
|
|||||||
Reference in New Issue
Block a user