You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
3.0 KiB
73 lines
3.0 KiB
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
// This file is automatically generated. Changes to this file may be overwritten.
|
|
|
|
namespace Epic.OnlineServices.TitleStorage
|
|
{
|
|
public sealed partial class TitleStorageFileTransferRequest : Handle
|
|
{
|
|
public TitleStorageFileTransferRequest()
|
|
{
|
|
}
|
|
|
|
public TitleStorageFileTransferRequest(System.IntPtr innerHandle) : base(innerHandle)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Attempt to cancel this file request in progress. This is a best-effort command and is not guaranteed to be successful if the request has completed before this function is called.
|
|
/// </summary>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if cancel is successful, <see cref="Result.NoChange" /> if request had already completed (can't be canceled), <see cref="Result.AlreadyPending" /> if it's already been canceled before (this is a final state for canceled request and won't change over time).
|
|
/// </returns>
|
|
public Result CancelRequest()
|
|
{
|
|
var funcResult = Bindings.EOS_TitleStorageFileTransferRequest_CancelRequest(InnerHandle);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Get the current state of a file request.
|
|
/// </summary>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if complete and successful, <see cref="Result.RequestInProgress" /> if the request is still in progress, or another state for failure.
|
|
/// </returns>
|
|
public Result GetFileRequestState()
|
|
{
|
|
var funcResult = Bindings.EOS_TitleStorageFileTransferRequest_GetFileRequestState(InnerHandle);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Get the file name of the file this request is for. OutStringLength will always be set to the string length of the file name if it is not <see langword="null" />.
|
|
/// <seealso cref="TitleStorageInterface.FilenameMaxLengthBytes" />
|
|
/// </summary>
|
|
/// <param name="filenameStringBufferSizeBytes">The maximum number of bytes that can be written to OutStringBuffer</param>
|
|
/// <param name="outStringBuffer">The buffer to write the <see langword="null" />-terminated utf8 file name into, if successful</param>
|
|
/// <param name="outStringLength">How long the file name is (not including null terminator)</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the file name was successfully written to OutFilenameBuffer, a failure result otherwise
|
|
/// </returns>
|
|
public Result GetFilename(out Utf8String outStringBuffer)
|
|
{
|
|
int outStringLength = TitleStorageInterface.FilenameMaxLengthBytes;
|
|
System.IntPtr outStringBufferAddress = Helper.AddAllocation(outStringLength);
|
|
|
|
var funcResult = Bindings.EOS_TitleStorageFileTransferRequest_GetFilename(InnerHandle, (uint)outStringLength, outStringBufferAddress, ref outStringLength);
|
|
|
|
Helper.Get(outStringBufferAddress, out outStringBuffer);
|
|
Helper.Dispose(ref outStringBufferAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Free the memory used by a cloud-storage file request handle. This will not cancel a request in progress.
|
|
/// </summary>
|
|
public void Release()
|
|
{
|
|
Bindings.EOS_TitleStorageFileTransferRequest_Release(InnerHandle);
|
|
}
|
|
}
|
|
}
|