// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 #pragma once // GameKit #include "AwsGameKitRuntime.h" #include "Identity/AwsGameKitIdentityWrapper.h" #include "Models/AwsGameKitIdentityModels.h" #include "AwsGameKitCore/Public/Core/AwsGameKitErrors.h" // Unreal #include "CoreMinimal.h" /** * @brief This class provides APIs for loading and querying the `awsGameKitClientConfig.yml` file. * * @details The `awsGameKitClientConfig.yml` file is generated by GameKit each time a feature is deployed or re-deployed, * and has settings for each GameKit feature you've deployed. The file is loaded by calling ReloadConfig(). */ class AWSGAMEKITRUNTIME_API AwsGameKitSessionManager { private: static SessionManagerLibrary GetSessionManagerLibraryFromModule(); public: /** * @brief Replace any loaded client settings with new settings from the `awsGameKitClientConfig.yml` file. * * @details The `awsGameKitClientConfig.yml` file is recursively searched for in these root locations: * - In editor mode: one level above FPaths::GameSourceDir(). * - In non-editor mode: FPaths::LaunchDir(). * * @details The `awsGameKitClientConfig.yml` file is generated by GameKit each time a feature is deployed or re-deployed, * and has settings for each GameKit feature you've deployed. The file is loaded by calling ReloadConfig(). */ static void ReloadConfig(); /** * @brief Return true if settings are loaded for the feature, false if they are not loaded. * * @details The `awsGameKitClientConfig.yml` file is generated by GameKit each time a feature is deployed or re-deployed, * and has settings for each GameKit feature you've deployed. The file is loaded by calling ReloadConfig(). * * @param featureType The feature to check. * @return True if the feature's settings are loaded, false otherwise. */ static bool AreSettingsLoaded(FeatureType_E featureType); /** * @brief Sets a token's value * @param tokenType The type of token to set. * @param value The value of the token. */ static void SetToken(TokenType_E tokenType, FString value); /** * @brief Convert the feature type into a string that is friendly for calling various APIs: it has no whitespace, is all lowercase, and is shortened. */ static FString FeatureTypeToApiString(FeatureType_E featureType); /** * @brief Convert the feature type into a string that is friendly for displaying on a UI: it has whitespace and proper capitalization. */ static FString FeatureTypeToUIString(FeatureType_E featureType); };