API/Autodoc/Files/URuStoreRemoteConfigClient.h.md


Classes

Name
class URuStoreRemoteConfigClient — Класс реализует API для получения конфигурации данных с удаленного сервера. Инкапсулирует запрос конфигурации с сервера, кэширование, фоновое обновление.

Functions

Name
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FRuStoreGetRemoteConfigResponseDelegate , int64 , requestId , FURuStoreRemoteConfig , response )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FRuStoreGetRemoteConfigErrorDelegate , int64 , requestId , FURuStoreError , error )

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
    FRuStoreGetRemoteConfigResponseDelegate ,
    int64 ,
    requestId ,
    FURuStoreRemoteConfig ,
    response 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
    FRuStoreGetRemoteConfigErrorDelegate ,
    int64 ,
    requestId ,
    FURuStoreError ,
    error 
)

Source code

// Copyright Epic Games, Inc. All Rights Reserved.

#include "URuStoreRemoteConfigClient.generated.h"

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FRuStoreGetRemoteConfigResponseDelegate, int64, requestId, FURuStoreRemoteConfig, response);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FRuStoreGetRemoteConfigErrorDelegate, int64, requestId, FURuStoreError, error);

UCLASS(Blueprintable)
class RUSTOREREMOTECONFIG_API URuStoreRemoteConfigClient : public UObject, public RuStoreSDK::RuStoreListenerContainer
{
    GENERATED_BODY()

private:
    static URuStoreRemoteConfigClient* _instance;
    static bool _bIsInstanceInitialized;

    bool bIsInitialized = false;
    RuStoreSDK::AndroidJavaObject* _clientWrapper = nullptr;

public:
    static const FString PluginVersion;

    UFUNCTION(BlueprintCallable, Category = "RuStore RemoteConfig Client")
    bool GetIsInitialized();

    UFUNCTION(BlueprintCallable, Category = "RuStore RemoteConfig Client")
    static URuStoreRemoteConfigClient* Instance();

    UFUNCTION(BlueprintCallable, Category = "RuStore RemoteConfig Client")
    bool Init();

    UFUNCTION(BlueprintCallable, Category = "RuStore RemoteConfig Client")
    void Dispose();

    void ConditionalBeginDestroy();

    long GetRemoteConfig(TFunction<void(long, TSharedPtr<FURuStoreRemoteConfig, ESPMode::ThreadSafe>)> onSuccess, TFunction<void(long, TSharedPtr<FURuStoreError, ESPMode::ThreadSafe>)> onFailure);

    // 
    UFUNCTION(BlueprintCallable, Category = "RuStore RemoteConfig Client")
    void GetRemoteConfig(int64& requestId);

    UPROPERTY(BlueprintAssignable, Category = "RuStore RemoteConfig Client")
    FRuStoreGetRemoteConfigResponseDelegate OnRemoteConfigResponse;

    UPROPERTY(BlueprintAssignable, Category = "RuStore RemoteConfig Client")
    FRuStoreGetRemoteConfigErrorDelegate OnRemoteConfigError;
};

Назад