9using namespace swift::core::afv::crypto;
11namespace swift::core::afv::connection
26 if (!m_lastVoiceServerHeartbeatAckUtc.isValid())
31 return d < ServerTimeoutSecs;
36 if (!m_lastDataServerHeartbeatAckUtc.isValid())
41 return d < ServerTimeoutSecs;
46 if (!m_tokens.isValid)
55 catch (
const std::invalid_argument &)
69 m_lastVoiceServerHeartbeatAckUtc = now;
70 m_lastDataServerHeartbeatAckUtc = now;
78 m_lastVoiceServerHeartbeatAckUtc =
QDateTime();
82 bool CClientConnectionData::voiceServerAlive()
const
84 return (m_authenticatedDateTimeUtc.
isValid() && timeSinceAuthenticationSecs() < ServerTimeoutSecs) ||
85 (m_lastVoiceServerHeartbeatAckUtc.
isValid() &&
bool isDataServerAlive() const
Servers alive.
void setTsAuthenticatedToNow()
Timestamps.
void createCryptoChannels()
Crypto channels for voice and data.
void setTokens(const PostCallsignResponseDto &dto)
Tokens.
static const QStringList & getLogCategories()
Categories.
void setTsHeartbeatToNow()
Timestamps.
bool isVoiceServerAlive() const
Servers alive.
qint64 secondsSinceAuthentication() const
Time since authentication.
QScopedPointer< crypto::CCryptoDtoChannel > m_voiceCryptoChannel
used crypto channel
void reset()
Reset all login related data.
static const QString & vatsimSpecific()
VATSIM specific.
static const QString & audio()
Audio related.
Class for emitting a log message.
Derived & warning(const char16_t(&format)[N])
Set the severity to warning, providing a format string.
Free functions in swift::misc.
QDateTime currentDateTimeUtc()
bool isValid() const const
qint64 secsTo(const QDateTime &other) const const