mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 11:45:40 +08:00
Formatting
This commit is contained in:
@@ -24,14 +24,14 @@ namespace BlackMisc
|
||||
{
|
||||
public:
|
||||
|
||||
//! \brief Default constructor.
|
||||
//! Default constructor.
|
||||
CVoiceRoom() : m_connected(false), m_audioPlaying(false) {}
|
||||
|
||||
//! \brief Constructor.
|
||||
//! Constructor.
|
||||
CVoiceRoom(const QString &hostname, const QString &channel) :
|
||||
m_hostname(hostname), m_channel(channel), m_connected(false), m_audioPlaying(false) {}
|
||||
|
||||
//! \brief Constructor.
|
||||
//! Constructor.
|
||||
CVoiceRoom(const QString &serverUrl, bool connected = false);
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
@@ -40,47 +40,47 @@ namespace BlackMisc
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
//! \brief Get the host name
|
||||
//! Get the host name
|
||||
const QString &getHostName() const { return m_hostname; }
|
||||
|
||||
//! \brief Get the voice room channel
|
||||
//! Get the voice room channel
|
||||
const QString &getChannel() const { return m_channel; }
|
||||
|
||||
//! \brief Set the host name
|
||||
//! Set the host name
|
||||
void setHostName(const QString &hostName) { m_hostname = hostName; }
|
||||
|
||||
//! \brief Set the voice channel
|
||||
//! Set the voice channel
|
||||
void setChannel(const QString &channel) { m_channel = channel; }
|
||||
|
||||
/*!
|
||||
* \brief Server URL
|
||||
* Server URL
|
||||
* \param noProtocol either with (pseudo) protocol prefix or without
|
||||
* \return
|
||||
*/
|
||||
QString getVoiceRoomUrl(bool noProtocol = true) const;
|
||||
|
||||
//! \brief Valid voice room object?
|
||||
//! Valid voice room object?
|
||||
bool isValid() const { return !this->m_hostname.isEmpty() && !this->m_channel.isEmpty(); }
|
||||
|
||||
//! \brief Is connected?
|
||||
//! Is connected?
|
||||
bool isConnected() const { return this->isValid() && this->m_connected; }
|
||||
|
||||
//! \brief Set connection status
|
||||
//! Set connection status
|
||||
void setConnected(bool isConnected) { this->m_connected = isConnected; }
|
||||
|
||||
//! \brief Is audio playing in this room?
|
||||
//! Is audio playing in this room?
|
||||
bool isAudioPlaying() const { return this->m_audioPlaying; }
|
||||
|
||||
//! \brief Set audio playing
|
||||
//! Set audio playing
|
||||
void setAudioPlaying(bool playing) { this->m_audioPlaying = playing; }
|
||||
|
||||
//! \brief Is ATIS voice channel
|
||||
//! Is ATIS voice channel
|
||||
bool isAtis() const;
|
||||
|
||||
//! \brief Equal operator ==
|
||||
//! Equal operator ==
|
||||
bool operator ==(const CVoiceRoom &other) const;
|
||||
|
||||
//! \brief Unequal operator !=
|
||||
//! Unequal operator !=
|
||||
bool operator !=(const CVoiceRoom &other) const;
|
||||
|
||||
//! \copydoc CValueObject::getValueHash
|
||||
@@ -92,17 +92,17 @@ namespace BlackMisc
|
||||
//! \copydoc CValueObject::fromJson
|
||||
void fromJson(const QJsonObject &json) override;
|
||||
|
||||
//! \brief Register metadata
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
//! \copydoc TupleConverter<>::jsonMembers()
|
||||
static const QStringList &jsonMembers();
|
||||
|
||||
//! \brief Protocol prefix "vvl"
|
||||
//! Protocol prefix "vvl"
|
||||
static const QString &protocol() { static QString p("vvl"); return p; }
|
||||
|
||||
/*!
|
||||
* \brief Protocol
|
||||
* Protocol
|
||||
* \return with protocol prefix or without
|
||||
*/
|
||||
static const QString &protocolComplete() { static QString p("vvl://"); return p; }
|
||||
|
||||
Reference in New Issue
Block a user