#pragma once #include #include #include #ifdef byte #undef byte #endif #include #include "geo/GeoLocation.h" #include "../../license/shared/include/license/license.h" namespace YAML { class Node; } namespace ts::config { struct EntryBinding { std::string key; std::map> description; uint8_t flags = 0; int type = 0; /* 0 = unbound | 1 = string | 2 = number | 3 = boolean | 4 = user defined */ int bounded_by = 0; /* 0 = unbound | 1 = config | 2 = command line */ std::function()> default_value; std::function value_description; std::function set_default; std::function read_config; std::function read_argument; }; extern bool update_license(std::string& /* error */, const std::string& /* new license */); extern std::vector parseConfig(const std::string& /* path */); extern std::vector reload(); extern std::deque> create_bindings(); namespace database { extern std::string url; namespace sqlite { extern std::string journal_mode; extern std::string locking_mode; extern std::string sync_mode; } } extern std::shared_ptr license; extern std::shared_ptr license_original; extern bool experimental_31; extern std::string permission_mapping_file; namespace binding { extern bool enforce_default_voice_host; extern std::string DefaultVoiceHost; extern std::string DefaultWebHost; extern std::string DefaultQueryHost; extern std::string DefaultFileHost; extern uint16_t DefaultQueryPort; extern uint16_t DefaultFilePort; } namespace server { extern std::string DefaultServerVersion; extern std::string DefaultServerPlatform; extern bool delete_old_bans; extern bool delete_missing_icon_permissions; extern LicenseType DefaultServerLicense; extern bool strict_ut8_mode; extern bool enable_teamspeak_weblist; extern bool show_invisible_clients_as_online; extern bool disable_ip_saving; extern bool default_music_bot; namespace badges { extern bool allow_overwolf; extern bool allow_badges; } namespace authentication { extern bool name; } namespace clients { extern bool teamspeak; extern bool teaspeak; extern bool teaweb; } extern ssize_t max_virtual_server; } namespace voice { extern size_t DefaultPuzzlePrecomputeSize; extern int RsaPuzzleLevel; extern bool enforce_coocie_handshake; extern bool notifyMuted; extern int connectLimit; extern int clientConnectLimit; extern bool suppress_myts_warnings; extern uint16_t default_voice_port; extern bool warn_on_permission_editor; extern bool allow_session_reinitialize; } namespace geo { extern std::string countryFlag; extern bool staticFlag; extern std::string mappingFile; extern geoloc::ProviderType type; extern bool vpn_block; extern std::string vpn_file; } namespace query { extern std::string motd; extern std::string newlineCharacter; extern int sslMode; namespace ssl { extern std::string keyFile; extern std::string certFile; } } namespace music { extern bool enabled; extern std::string command_prefix; } namespace messages { extern std::string serverStopped; extern std::string applicationStopped; extern std::string applicationCrashed; extern std::string idle_time_exceeded; extern std::string mute_notify_message; extern std::string unmute_notify_message; extern std::string kick_invalid_hardware_id; extern std::string kick_invalid_badges; extern std::string kick_invalid_command; extern std::string kick_vpn; extern std::string teamspeak_permission_editor; namespace shutdown { extern std::string scheduled; extern std::string interval; extern std::string now; extern std::string canceled; extern std::vector> intervals; } namespace music { extern std::string song_announcement; } namespace timeout { extern std::string packet_resend_failed; extern std::string connection_reinitialized; } } namespace web { extern bool activated; namespace ssl { /* servername; private key file; public key file*/ extern std::deque> certificates; } extern uint16_t webrtc_port_min; extern uint16_t webrtc_port_max; extern std::deque ice_servers; extern bool enable_upnp; } namespace threads { extern size_t ticking; namespace voice { extern size_t execute_per_server; extern size_t execute_limit; extern size_t events_per_server; extern size_t io_min; extern size_t io_per_server; extern size_t io_limit; extern bool bind_io_thread_to_kernel_thread; } namespace music { extern size_t execute_per_bot; extern size_t execute_limit; } namespace web { extern size_t io_loops; } } namespace log { extern std::string path; extern size_t vs_size; extern spdlog::level::level_enum logfileLevel; extern bool logfileColored; extern spdlog::level::level_enum terminalLevel; } extern std::string crash_path; }