62 return GetGame().GetBackendApi() &&
GetGame().GetBackendApi().IsRunning();
69 return GetGame().GetBackendApi() &&
GetGame().GetBackendApi().IsActive();
87 return GetGame().GetBackendApi() &&
GetGame().GetBackendApi().GetCommTestStatus() == 1;
131 GetGame().GetBackendApi().RefreshCommStatus();
283 for (
int i, cnt =
GetGame().GetBackendApi().GetStatusCount(); i < cnt; i++)
285 item =
GetGame().GetBackendApi().GetStatusItem(i);
292 #ifdef SERVICES_DEBUG
311 statusName.ToLower();
312 string serviceNameLC;
316 serviceNameLC = statusItem.Name();
317 serviceNameLC.ToLower();
319 if (serviceNameLC == statusName)
328 static void GetStatuses(notnull array<ServiceStatusItem> statuses)
357 switch (
System.GetPlatform())
366 return SCR_Enum.HasFlag(service.m_ePlatforms, SCR_EBackendServicePlatforms.PC);
374 return SCR_Enum.HasFlag(service.m_ePlatforms, SCR_EBackendServicePlatforms.XBOX);
380 return SCR_Enum.HasFlag(service.m_ePlatforms, SCR_EBackendServicePlatforms.PS);
399 return serviceStatus.Status() ==
STATUS_OK;
444 Print(
"--------------------------------------------------");
445 Print(
"SERVICE STATUS DEBUG");
446 Print(
"--------------------------------------------------");
447 if (!
GetGame().GetBackendApi())
449 Print(
"no backend API found.");
454 Print(
"number of services found: " +
GetGame().GetBackendApi().GetStatusCount());
459 Print(
"Main Status not found");
464 PrintFormat(
"Service %1: %2 (Name/Status/Message: %3/%4/%5)",
index, statusItem, statusItem.Name(), statusItem.Status(), statusItem.Message());
467 Print(
"--------------------------------------------------");
474class SCR_BackendServiceDisplayPresets
477 protected ref array<ref SCR_BackendServiceDisplay> m_aServices;
483 array<ref SCR_BackendServiceDisplay> services = {};
485 services = m_aServices;
504 [
Attribute(
typename.EnumToString(SCR_EBackendServicePlatforms, SCR_EBackendServicePlatforms.PC),
UIWidgets.Flags,
"",
"Platforms this service should be displayed on", ParamEnumArray.FromEnum(SCR_EBackendServicePlatforms))]
505 SCR_EBackendServicePlatforms m_ePlatforms;
509enum SCR_EBackendServicePlatforms
ArmaReforgerScripted GetGame()
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
@ FAILED
Job failed during its processing and can be retried.
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
SCR_Faction ScriptedFaction SCR_BaseContainerCustomTitleField("m_sCallsign")
int GetServices(out array< SCR_ServicePointComponent > services=null)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
ScriptInvokerBase< ScriptInvokerCommStatusMethod > ScriptInvokerCommStatus
class SCR_BackendServiceDisplay PC
func ScriptInvokerCommStatusMethod
SCR_ECommStatus
This class may become obsolete on BackendAPI update.
class SCR_BackendServiceDisplay XBOX
static const string SERVICE_XBOX
static const int PING_THRESHOLD_BAD
static int s_iLastStatusUpdate
static bool IsPingingStuck()
static bool IsServiceActive(string serviceName)
static const string SERVICE_WORKSHOP
static const int COMM_STATUS_CHECK_FREQUENCY_MS
static bool AreServicesReady()
static void CheckStatus()
static void CheckCommStatus()
static void RefreshStatuses()
static const int FIRST_REFRESH_DELAY
static bool AreMultiplayerServicesAvailable()
static const string SERVICE_ACCOUNT_PROFILE
static int GetPingValue()
static const int PING_MAX
static bool IsBackendConnectionAvailable()
static ServiceStatusItem GetMainStatus()
static ServiceStatusItem s_MainStatus
static ScriptInvokerCommStatus GetOnCommStatusCheckFinished()
static void RefreshPing()
static void StartStatusCheck()
static const ref array< ServiceStatusItem > SERVICE_STATUSES
static const int CONNECTION_CHECK_EXPIRE_TIME
static ref ScriptInvokerCommStatus s_OnCommStatusCheckFinished
static ScriptInvokerVoid GetOnCommStatusCheckStart()
static bool IsAuthenticated()
static bool IsBackendEnabled()
static float s_fPingStartTime
static const int REFRESH_COOLDOWN
static void RefreshPing_Internal()
static const string STATUS_OK
static const string STATUS_ERROR
static bool s_bFirstRefresh
static bool DisplayServiceOnCurrentPlatform(SCR_BackendServiceDisplay service)
static bool IsBackendReady()
static void GetStatuses(notnull array< ServiceStatusItem > statuses)
static const int AUTOMATIC_REFRESH_RATE
static void ClearRefreshQueue()
static bool s_bIsCheckingCommStatus
static int s_iLastPingUpdate
static int GetStatusesAge()
Return statuses age IN SECONDS.
static bool IsInRefreshCooldown()
static void CheckBackendStatus()
static const int PING_THRESHOLD_GOOD
static SCR_ECommStatus s_eLastReceivedCommStatus
static SCR_ECommStatus GetLastReceivedCommStatus()
static const string SERVICE_BI_BACKEND_MULTIPLAYER
static ServiceStatusItem GetStatusByName(string statusName)
static float s_fLastReceivedCommResponseTime
static int GetPingAge()
Return the last ping's age in milliseconds.
static const int PING_THRESHOLD_AWFUL
static ref ScriptInvokerVoid s_OnCommStatusCheckStart
@ FINISHED
Job was successfully finished.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute