6 #ifndef SWIFT_CORE_AFV_CONNECTION_CLIENTCONNECTIONDATA_H
7 #define SWIFT_CORE_AFV_CONNECTION_CLIENTCONNECTIONDATA_H
10 #include <QScopedPointer>
18 namespace swift::core::afv::connection
63 void setCallsign(
const QString &callsign) { m_callsign = callsign; }
92 qint64 timeSinceAuthenticationSecs()
const
94 return m_authenticatedDateTimeUtc.secsTo(QDateTime::currentDateTimeUtc());
98 bool voiceServerAlive()
const;
105 QDateTime m_authenticatedDateTimeUtc;
106 QDateTime m_lastVoiceServerHeartbeatAckUtc;
107 QDateTime m_lastDataServerHeartbeatAckUtc;
109 bool m_receiveAudio =
true;
110 bool m_connected =
false;
112 static constexpr qint64 ServerTimeoutSecs = 10;
bool isDataServerAlive() const
Servers alive.
const QString & getUserName() const
Uername.
const PostCallsignResponseDto & getTokens() const
Tokens.
bool isReceivingAudio() const
Receiving audio?
void setTsAuthenticatedToNow()
Timestamps.
void createCryptoChannels()
Crypto channels for voice and data.
bool isConnected() const
Is connected?
void setCallsign(const QString &callsign)
Callsign.
void setTokens(const PostCallsignResponseDto &dto)
Tokens.
const QString & getCallsign() const
Callsign.
void setConnected(bool connected)
Is connected?
static const QStringList & getLogCategories()
Categories.
void setTsHeartbeatToNow()
Timestamps.
bool isVoiceServerAlive() const
Servers alive.
CClientConnectionData()=default
Ctor.
qint64 secondsSinceAuthentication() const
Time since authentication.
void setUserName(const QString &un)
Uername.
QScopedPointer< crypto::CCryptoDtoChannel > m_voiceCryptoChannel
used crypto channel
void reset()
Reset all login related data.
void setReceiveAudio(bool receive)
Receiving audio?