API/Autodoc/Classes/URuStoreAppUpdateManager.en.md


URuStoreAppUpdateManager

The class implements an API for three update methods. Currently supported are: delayed, silent (without RuStore UI), and forced update.

#include <URuStoreAppUpdateManager.h>

Inherits from UObject, IRuStoreInstallStateUpdateListenerInterface, RuStoreSDK::RuStoreListenerContainer

Public Functions

Name
bool GetIsInitialized()
Checks whether the manager is initialized.
void SetAllowNativeErrorHandling(bool value)
Error handling in the native SDK.
bool Init()
Initializes the URuStoreAppUpdateManager singleton.
void Dispose()
Deinitializes the singleton if no further work with the object is planned.
void ConditionalBeginDestroy()
long GetAppUpdateInfo(TFunction< void(long, TSharedPtr< FURuStoreAppUpdateInfo, ESPMode::ThreadSafe >)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Checks for available updates.
long StartUpdateFlow(EURuStoreAppUpdateOptions appUpdateOptions, TFunction< void(long, EURuStoreUpdateFlowResult)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Starts the app update download procedure.
long CompleteUpdate(EURuStoreAppUpdateOptions appUpdateOptions, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Starts the update installation procedure.
bool CheckIsImmediateUpdateAllowed()
Checks whether the forced update is available.
int64 RegisterListener(TScriptInterface< IRuStoreInstallStateUpdateListenerInterface > stateListener)
Registers a listener for the update download status.
bool UnregisterListener(TScriptInterface< IRuStoreInstallStateUpdateListenerInterface > stateListener)
If the listener is no longer needed, use the listener removal method UnregisterListener, passing the previously registered listener to the method.
void GetAppUpdateInfo(int64 & requestId)
void StartUpdateFlow(int64 & requestId, EURuStoreAppUpdateOptions appUpdateOptions)
void CompleteUpdate(int64 & requestId, EURuStoreAppUpdateOptions appUpdateOptions)
void OnStateUpdated_Implementation(int64 listenerId, FURuStoreInstallState & state) override
URuStoreAppUpdateManager * Instance()
Gets the URuStoreAppUpdateManager instance.

Public Attributes

Name
const FString PluginVersion — Plugin version.
FRuStoreGetAppUpdateInfoErrorDelegate OnGetAppUpdateInfoError
FRuStoreGetAppUpdateInfoResponseDelegate OnGetAppUpdateInfoResponse
FRuStoreStartUpdateFlowErrorDelegate OnStartUpdateFlowError
FRuStoreStartUpdateFlowResponseDelegate OnStartUpdateFlowResponse
FRuStoreCompleteUpdateErrorDelegate OnCompleteUpdateError
FRuStoreOnStateUpdatedInstanceDelegate OnStateUpdatedInstanceEvent

Additional inherited members

Public Functions inherited from IRuStoreInstallStateUpdateListenerInterface

Name
void OnStateUpdated(int64 listenerId, FURuStoreInstallState & state)
 Update installation callback handler.

Public Functions inherited from RuStoreSDK::RuStoreListenerContainer

Name
TSharedPtr< RuStoreListener, ESPMode::ThreadSafe > ListenerBind(RuStoreListener * item)
void ListenerUnbind(long id)
void ListenerUnbind(RuStoreListener * item)
void ListenerUnbind(TSharedPtr< RuStoreListener, ESPMode::ThreadSafe > item)
void ListenerRemoveAll()

function GetIsInitialized

bool GetIsInitialized()

Checks whether the manager is initialized.

Return: Returns true if the singleton is initialized; otherwise, false.

function SetAllowNativeErrorHandling

void SetAllowNativeErrorHandling(
    bool value
)

Error handling in the native SDK.

Parameters:

  • value true — enables error handling, false — disables it.

function Init

bool Init()

Initializes the URuStoreAppUpdateManager singleton.

Return: Returns true if initialization completed successfully; otherwise, false.

function Dispose

void Dispose()

Deinitializes the singleton if no further work with the object is planned.

function ConditionalBeginDestroy

void ConditionalBeginDestroy()

function GetAppUpdateInfo

long GetAppUpdateInfo(
    TFunction< void(long, TSharedPtr< FURuStoreAppUpdateInfo, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Checks for available updates.

Parameters:

  • onSuccess Action executed when the operation completes successfully. Returns a requestId of type long and an FURuStoreAppUpdateInfo object with information about whether an update is required.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.

Return: Returns a requestId unique within a single app launch.

function StartUpdateFlow

long StartUpdateFlow(
    EURuStoreAppUpdateOptions appUpdateOptions,
    TFunction< void(long, EURuStoreUpdateFlowResult)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Starts the app update download procedure.

Parameters:

  • appUpdateOptions Type of the update download procedure.
  • onSuccess Action executed when the operation completes successfully. Returns an EURuStoreUpdateFlowResult object with information about the result of the update operation.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.

Return: Returns a requestId unique within a single app launch.

function CompleteUpdate

long CompleteUpdate(
    EURuStoreAppUpdateOptions appUpdateOptions,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Starts the update installation procedure.

Parameters:

  • appUpdateOptions Type of the update completion procedure.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.

Return: Returns a requestId unique within a single app launch.

function CheckIsImmediateUpdateAllowed

bool CheckIsImmediateUpdateAllowed()

Checks whether the forced update is available.

Return: Returns true if the forced update is available; otherwise, false.

function RegisterListener

int64 RegisterListener(
    TScriptInterface< IRuStoreInstallStateUpdateListenerInterface > stateListener
)

Registers a listener for the update download status.

Parameters:

Return: Returns a requestId unique within a single app launch.

function UnregisterListener

bool UnregisterListener(
    TScriptInterface< IRuStoreInstallStateUpdateListenerInterface > stateListener
)

If the listener is no longer needed, use the listener removal method UnregisterListener, passing the previously registered listener to the method.

Parameters:

Return: Returns true if the passed listener is found in the listener list and removed; otherwise, false.

function GetAppUpdateInfo

void GetAppUpdateInfo(
    int64 & requestId
)

function StartUpdateFlow

void StartUpdateFlow(
    int64 & requestId,
    EURuStoreAppUpdateOptions appUpdateOptions
)

function CompleteUpdate

void CompleteUpdate(
    int64 & requestId,
    EURuStoreAppUpdateOptions appUpdateOptions
)

function OnStateUpdated_Implementation

void OnStateUpdated_Implementation(
    int64 listenerId,
    FURuStoreInstallState & state
) override

function Instance

static URuStoreAppUpdateManager * Instance()

Gets the URuStoreAppUpdateManager instance.

Return: Returns a pointer to the only URuStoreAppUpdateManager instance (Singleton pattern implementation). If the instance has not yet been created, creates it.

variable PluginVersion

static const FString PluginVersion = "10.5.2";

Plugin version.

variable OnGetAppUpdateInfoError

FRuStoreGetAppUpdateInfoErrorDelegate OnGetAppUpdateInfoError;

variable OnGetAppUpdateInfoResponse

FRuStoreGetAppUpdateInfoResponseDelegate OnGetAppUpdateInfoResponse;

variable OnStartUpdateFlowError

FRuStoreStartUpdateFlowErrorDelegate OnStartUpdateFlowError;

variable OnStartUpdateFlowResponse

FRuStoreStartUpdateFlowResponseDelegate OnStartUpdateFlowResponse;

variable OnCompleteUpdateError

FRuStoreCompleteUpdateErrorDelegate OnCompleteUpdateError;

variable OnStateUpdatedInstanceEvent

FRuStoreOnStateUpdatedInstanceDelegate OnStateUpdatedInstanceEvent;

Назад