mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Doxygen, style
This commit is contained in:
@@ -27,8 +27,7 @@ namespace BlackCore
|
||||
|
||||
void CallsignDelayCache::underflow(const QString &callsign)
|
||||
{
|
||||
if (!successfulTransmissionsCache.contains(callsign))
|
||||
return;
|
||||
if (!successfulTransmissionsCache.contains(callsign)) return;
|
||||
|
||||
successfulTransmissionsCache[callsign] = 0;
|
||||
increaseDelayMs(callsign);
|
||||
@@ -36,8 +35,7 @@ namespace BlackCore
|
||||
|
||||
void CallsignDelayCache::success(const QString &callsign)
|
||||
{
|
||||
if (!successfulTransmissionsCache.contains(callsign))
|
||||
return;
|
||||
if (!successfulTransmissionsCache.contains(callsign)) return;
|
||||
|
||||
successfulTransmissionsCache[callsign]++;
|
||||
if (successfulTransmissionsCache[callsign] > 5)
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef CALLSIGNDELAYCACHE_H
|
||||
#define CALLSIGNDELAYCACHE_H
|
||||
#ifndef BLACKORE_AFV_AUDIO_CALLSIGNDELAYCACHE_H
|
||||
#define BLACKORE_AFV_AUDIO_CALLSIGNDELAYCACHE_H
|
||||
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
@@ -24,13 +24,24 @@ namespace BlackCore
|
||||
class CallsignDelayCache
|
||||
{
|
||||
public:
|
||||
//! Initialize
|
||||
void initialise(const QString &callsign);
|
||||
|
||||
//! Callsign index
|
||||
int get(const QString &callsign);
|
||||
|
||||
//! Underflow
|
||||
void underflow(const QString &callsign);
|
||||
|
||||
//! Success
|
||||
void success(const QString &callsign);
|
||||
|
||||
//! Delay plus/minus @{
|
||||
void increaseDelayMs(const QString &callsign);
|
||||
void decreaseDelayMs(const QString &callsign);
|
||||
//! @}
|
||||
|
||||
//! Singleton
|
||||
static CallsignDelayCache &instance();
|
||||
|
||||
private:
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
/**
|
||||
|
||||
\brief Sets the JWT *header* from a QString.
|
||||
\param jdocHeader JWT *header* as a QString.
|
||||
\param strHeader JWT *header* as a QString.
|
||||
\return true if the header was set, false if the header was not set.
|
||||
|
||||
This method checks for a valid header format and returns false if the header is invalid.
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
/**
|
||||
|
||||
\brief Sets the JWT *payload* from a QJsonDocument.
|
||||
\param jdocHeader JWT *payload* as a QJsonDocument.
|
||||
\param jdocPayload JWT *payload* as a QJsonDocument.
|
||||
\return true if the payload was set, false if the payload was not set.
|
||||
|
||||
This method checks for a valid payload format and returns false if the payload is invalid.
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
/**
|
||||
|
||||
\brief Sets the JWT *payload* from a QString.
|
||||
\param jdocHeader JWT *payload* as a QString.
|
||||
\param strPayload JWT *payload* as a QString.
|
||||
\return true if the payload was set, false if the payload was not set.
|
||||
|
||||
This method checks for a valid payload format and returns false if the payload is invalid.
|
||||
|
||||
Reference in New Issue
Block a user