Files
UnrealEngineUWP/Engine/Source/Programs/UnrealToolbox/IHordeClientProvider.cs
ben marsh 2af764e351 Merging latest Horde changes from Main.
[CL 36756615 by ben marsh in 5.5 branch]
2024-10-01 19:23:06 -04:00

44 lines
1.1 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using EpicGames.Horde;
namespace UnrealToolbox
{
/// <summary>
/// Reference to a Horde client instance. Should be disposed of when done.
/// </summary>
interface IHordeClientRef : IDisposable
{
/// <summary>
/// The client instance
/// </summary>
IHordeClient Client { get; }
}
/// <summary>
/// Accessor for a <see cref="IHordeClient"/> instance which can be recreated in response to config changes.
/// </summary>
interface IHordeClientProvider
{
/// <summary>
/// Event signalled whenever the connection state changes
/// </summary>
event Action? OnStateChanged;
/// <summary>
/// Event signalled whenever the access token state changes
/// </summary>
event Action? OnAccessTokenStateChanged;
/// <summary>
/// Gets a reference to the current client instance. These references should be kept as short as possible.
/// </summary>
Task<IHordeClientRef?> GetClientRefAsync();
/// <summary>
/// Recreates the client instance.
/// </summary>
Task RecreateAsync();
}
}