AuroraRuntime/Include/Aurora/Runtime.hpp
Reece 72a74eb7a4 [*] Fixed bug where schedular was using a read lock in a scope where items were erased from a vector
[*] Refactor a 'Object' member field in a ParseObject struct
[+] Added an option to set a command dispatcher thread from an AsyncApp
[*] Fix various issues with AsyncApp, stablity improvements
[+] Added AddDelayTime
2021-07-15 17:16:23 +01:00

145 lines
3.6 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Runtime.hpp
Date: 2021-6-9
Author: Reece
***/
#pragma once
#if defined(AURORA_ENGINE_KERNEL_STATIC)
#define AUKN_SYM
#else
#if defined(AURORA_ENGINE_KERNEL_EXPORT)
#define AUKN_SYM AURORA_SYMBOL_EXPORT
#else
#define AUKN_SYM AURORA_SYMBOL_IMPORT
#endif
#endif
#include "../AuroraMacros.hpp"
#if defined(_AUHAS_ASIO)
#include <asio.hpp>
#endif
#include <optional>
#include <functional>
#include "../AuroraTypedefs.hpp"
#include <glm/glm.hpp>
#include <fmt/core.h>
#include <fmt/format.h>
#include <fmt/chrono.h>
#include <uuid.h>
#define AUKN_SHARED_API(name, type, ...) AU_SHARED_API_EX(AUKN_SYM, name, type, ## __VA_ARGS__)
#include "Memory/Memory.hpp"
#include "Console/Console.hpp"
#include "Crypto/Crypto.hpp"
#include "Compression/Compression.hpp"
#include "Data/Data.hpp"
#include "Debug/Debug.hpp"
#include "Hashing/Hashing.hpp"
#include "HWInfo/HWInfo.hpp"
#include "IO/IO.hpp"
#include "Legacy/Legacy.hpp"
#include "Locale/Locale.hpp"
#include "Parse/Parse.hpp"
#include "Process/Process.hpp"
#include "Processes/Processes.hpp"
#include "Registry/Registry.hpp"
#include "RNG/RNG.hpp"
#include "Telemetry/Telemetery.hpp"
#include "Threading/Threading.hpp"
#include "Async/Async.hpp"
#include "Time/Time.hpp"
#include "../AuroraUtils.hpp"
namespace Aurora
{
struct LocalLogInfo
{
bool enableLogging {true};
bool autoCompressOldLogs {false};
AuUInt32 maxSizeMB {128 * 1024 * 1024}; // these numbers feel insane, but at least we have a max threshold
int maxLogs {1024}; // by default, we neither leak disk space or waste opportunities of being able to dig through old data
};
struct TelemetryConfigDoc
{
LocalLogInfo localLogging;
bool enabled {false};
AuString address;
AuUInt16 port {45069};
AuString serviceIdnt {"7b5f7a54-7122-4489-ac1a-3d75884b307e"};
bool wantsActiveMonitoring {false};
bool privacyNoData {false};
bool privacyNoMod {false};
bool privacyNoLog {false};
bool privacyNoWarn {false};
bool alwaysCrashdump {true};
bool alwaysDisableCrashdump {false};
};
struct TelemetryConfig
{
bool readModNameJsonConfig {};
TelemetryConfigDoc defaultConfig;
};
struct ConsoleConfig
{
LocalLogInfo logging;
bool disableAll {};
bool forceConsoleWindow {};
bool forceToolKitWindow {};
bool attemptDarkTheme {true};
AuString supportPublic {"https://jira.reece.sx"};
AuString supportInternal {"https://jira.reece.sx"};
};
struct CryptoConfig
{
bool allowChineseCerts {false};
bool allowRussianCerts {true};
bool allowHTTPRetrievalOfCerts {true};
bool enablePinning {true};
AuList<AuString> blacklistedCerts{};
AuList<AuString> whitelistedCerts{};
};
struct AsyncConfig
{
AuUInt32 schedularFrequency {2}; // * 0.5 or 1 MS depending on the platform
AuUInt32 sysPumpFrequency {10}; // x amount of schedularFrequencys
};
struct RuntimeStartInfo
{
ConsoleConfig console;
CryptoConfig crypto;
TelemetryConfig telemetry;
AsyncConfig async;
};
AUKN_SYM void RuntimeStart(const RuntimeStartInfo &info);
AUKN_SYM void RuntimeShutdown();
AUKN_SYM void RuntimeSysPump();
}