Make Vatsim Voice UDP port configurable and 3290 the default

This commit is contained in:
Roland Winklmeier
2018-09-26 19:29:20 +02:00
committed by Klaus Basan
parent c72742029b
commit 28b404d065
3 changed files with 21 additions and 1 deletions

View File

@@ -52,6 +52,22 @@ namespace BlackCore
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("Output device"); return name; }
};
//! Audio input device settings
struct TVatsimVoiceUdpPort : public BlackMisc::TSettingTrait<int>
{
//! \copydoc BlackMisc::TSettingTrait::key
static const char *key() { return "audio/vatsimvoiceudpport"; }
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("Vatsim voice UDP port"); return name; }
//! \copydoc BlackMisc::TSettingTrait::defaultValue
static int defaultValue() { return 3290; }
//! \copydoc BlackCore::TSettingTrait::isValid
static bool isValid(int port) { return port >= 0 && port <= 65535; }
};
} // ns
} // ns