Files
UnrealEngineUWP/Engine/Source/Programs/Shared/EpicGames.Perforce/IPerforceConnection.cs
ben marsh 32fb18f53f EpicGames.Perforce Fix argument for -x when using child process. Delegate to the connection implementation to write arguments to a response file.
#ROBOMERGE-SOURCE: CL 17386176 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17386190 by ben marsh in ue5-release-engine-test branch]
2021-09-01 10:07:26 -04:00

58 lines
2.1 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace EpicGames.Perforce
{
/// <summary>
/// Base interface for Perforce clients
/// </summary>
public interface IPerforceConnection
{
/// <summary>
/// Logger for this connection
/// </summary>
ILogger Logger { get; }
/// <summary>
/// Runs a Perforce command
/// </summary>
/// <param name="Command">The command name</param>
/// <param name="Arguments">Arguments for the command</param>
/// <param name="FileArguments">File arguments (may be put into a response file)</param>
/// <param name="InputData">Input data to be passed to the command</param>
/// <returns>Response object</returns>
Task<IPerforceOutput> CommandAsync(string Command, IReadOnlyList<string> Arguments, IReadOnlyList<string>? FileArguments, byte[]? InputData);
/// <summary>
/// Execute the 'login' command
/// </summary>
/// <param name="Password">Password to use to login</param>
/// <param name="CancellationToken">Token used to cancel the operation</param>
/// <returns>Response from the server</returns>
Task LoginAsync(string Password, CancellationToken CancellationToken = default);
/// <summary>
/// Sets an environment variable
/// </summary>
/// <param name="Name">Name of the variable to set</param>
/// <param name="Value">Value for the variable</param>
/// <param name="CancellationToken">Token used to cancel the operation</param>
/// <returns>Response from the server</returns>
Task SetAsync(string Name, string Value, CancellationToken CancellationToken = default);
/// <summary>
/// Gets the setting of a Perforce variable
/// </summary>
/// <param name="Name">Name of the variable to get</param>
/// <param name="CancellationToken">Cancellation token for the request</param>
/// <returns>Value of the variable</returns>
Task<string?> TryGetSettingAsync(string Name, CancellationToken CancellationToken = default);
}
}