// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.PlayerDataStorage { public sealed partial class PlayerDataStorageFileTransferRequest : Handle { public PlayerDataStorageFileTransferRequest() { } public PlayerDataStorageFileTransferRequest(System.IntPtr innerHandle) : base(innerHandle) { } /// /// 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. /// /// /// if cancel is successful, if request had already completed (can't be canceled), if it's already been canceled before (this is a final state for canceled request and won't change over time). /// public Result CancelRequest() { var funcResult = Bindings.EOS_PlayerDataStorageFileTransferRequest_CancelRequest(InnerHandle); return funcResult; } /// /// Get the current state of a file request. /// /// /// if complete and successful, if the request is still in progress, or another state for failure. /// public Result GetFileRequestState() { var funcResult = Bindings.EOS_PlayerDataStorageFileTransferRequest_GetFileRequestState(InnerHandle); return funcResult; } /// /// 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 . /// /// /// The maximum number of bytes that can be written to OutStringBuffer /// The buffer to write the -terminated utf8 file name into, if successful /// How long the file name is (not including null terminator) /// /// if the file name was successfully written to OutFilenameBuffer, a failure result otherwise /// public Result GetFilename(out Utf8String outStringBuffer) { int outStringLength = PlayerDataStorageInterface.FilenameMaxLengthBytes; System.IntPtr outStringBufferAddress = Helper.AddAllocation(outStringLength); var funcResult = Bindings.EOS_PlayerDataStorageFileTransferRequest_GetFilename(InnerHandle, (uint)outStringLength, outStringBufferAddress, ref outStringLength); Helper.Get(outStringBufferAddress, out outStringBuffer); Helper.Dispose(ref outStringBufferAddress); return funcResult; } /// /// Free the memory used by a cloud-storage file request handle. This will not cancel a request in progress. /// public void Release() { Bindings.EOS_PlayerDataStorageFileTransferRequest_Release(InnerHandle); } } }