mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +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 "blackmisc/vaudiodevicelist.h"
|
||||
#include "blackmisc/avcallsignlist.h"
|
||||
|
||||
using namespace BlackMisc::Voice;
|
||||
using namespace BlackMisc::Aviation;
|
||||
|
||||
|
||||
/*
|
||||
* Client
|
||||
@@ -156,10 +159,10 @@ void Client::outputDevicesCmd(QTextStream & /** args **/)
|
||||
void Client::listCallsignsCmd(QTextStream &args)
|
||||
{
|
||||
Q_UNUSED(args)
|
||||
QSet<QString> users = m_voiceClient->getVoiceRoomCallsings(BlackCore::IVoice::COM1);
|
||||
foreach(QString user, users)
|
||||
CCallsignList callsigns = m_voiceClient->getVoiceRoomCallsigns(BlackCore::IVoice::COM1);
|
||||
foreach(CCallsign callsign, callsigns)
|
||||
{
|
||||
std::cout << " " << user.toStdString() << std::endl;
|
||||
std::cout << " " << callsign.toStdString() << std::endl;
|
||||
}
|
||||
printLinePrefix();
|
||||
}
|
||||
@@ -200,13 +203,13 @@ void Client::audioStoppedStream(const BlackCore::IVoice::ComUnit comUnit)
|
||||
printLinePrefix();
|
||||
}
|
||||
|
||||
void Client::userJoinedRoom(const QString &callsign)
|
||||
void Client::userJoinedRoom(const CCallsign &callsign)
|
||||
{
|
||||
std::cout << callsign.toStdString() << " joined the voice room." << std::endl;
|
||||
printLinePrefix();
|
||||
}
|
||||
|
||||
void Client::userLeftRoom(const QString &callsign)
|
||||
void Client::userLeftRoom(const CCallsign &callsign)
|
||||
{
|
||||
std::cout << callsign.toStdString() << " left the voice room." << std::endl;
|
||||
printLinePrefix();
|
||||
|
||||
@@ -49,8 +49,8 @@ private slots:
|
||||
void connectionStatusDisconnected();
|
||||
void audioStartedStream(const BlackCore::IVoice::ComUnit comUnit);
|
||||
void audioStoppedStream(const BlackCore::IVoice::ComUnit comUnit);
|
||||
void userJoinedRoom(const QString &callsign);
|
||||
void userLeftRoom(const QString &callsign);
|
||||
void userJoinedRoom(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
void userLeftRoom(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
private:
|
||||
QMap<QString, std::function<void(QTextStream &)>> m_commands;
|
||||
|
||||
Reference in New Issue
Block a user