mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 12:55:31 +08:00
AFV initial commit
This commit is contained in:
committed by
Mat Sutcliffe
parent
7030302e73
commit
b5a2f2ad13
50
src/blackcore/afv/connection/clientconnectiondata.h
Normal file
50
src/blackcore/afv/connection/clientconnectiondata.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#ifndef CLIENTCONNECTIONDATA_H
|
||||
#define CLIENTCONNECTIONDATA_H
|
||||
|
||||
#include "blackcore/afv/dto.h"
|
||||
#include "apiserverconnection.h"
|
||||
#include "blackcore/afv/crypto/cryptodtochannel.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QtGlobal>
|
||||
#include <QString>
|
||||
#include <QScopedPointer>
|
||||
|
||||
struct ClientConnectionData
|
||||
{
|
||||
ClientConnectionData() = default;
|
||||
|
||||
qint64 secondsSinceAuthentication() const;
|
||||
|
||||
bool isVoiceServerAlive() const;
|
||||
bool isDataServerAlive() const;
|
||||
|
||||
/* TODO
|
||||
public long VoiceServerBytesSent { get; set; }
|
||||
public long VoiceServerBytesReceived { get; set; }
|
||||
public long DataServerBytesSent { get; set; }
|
||||
public long DataServerBytesReceived { get; set; }
|
||||
*/
|
||||
|
||||
void createCryptoChannels();
|
||||
|
||||
qint64 timeSinceAuthentication() const { return m_authenticatedDateTimeUtc.secsTo(QDateTime::currentDateTimeUtc()); }
|
||||
bool voiceServerAlive() const;
|
||||
|
||||
QString m_userName;
|
||||
QString m_callsign;
|
||||
|
||||
PostCallsignResponseDto m_tokens;
|
||||
|
||||
QScopedPointer<CryptoDtoChannel> voiceCryptoChannel;
|
||||
|
||||
QDateTime m_authenticatedDateTimeUtc;
|
||||
QDateTime m_lastVoiceServerHeartbeatAckUtc;
|
||||
|
||||
bool m_receiveAudio = true;
|
||||
bool m_connected = false;
|
||||
|
||||
static constexpr qint64 serverTimeout = 10;
|
||||
};
|
||||
|
||||
#endif // CLIENTCONNECTIONDATA_H
|
||||
Reference in New Issue
Block a user