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.

162 lines
4.6 KiB

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.PlayerDataStorage
{
/// <summary>
/// Data containing the result of a read file request
/// </summary>
public struct ReadFileCallbackInfo : ICallbackInfo
{
/// <summary>
/// The result code for the operation.
/// <see cref="Result.Success" />: The request was successful.
/// <see cref="Result.Canceled" />: The request was canceled.
/// <see cref="Result.TooManyRequests" />: There are too many requests in progress for the local user at this time.
/// <see cref="Result.AlreadyPending" />: There is another requests in progress for the specified file by this user.
/// <see cref="Result.CacheDirectoryMissing" />: The cache directory was not set when calling <see cref="Platform.PlatformInterface.Create" />.
/// <see cref="Result.CacheDirectoryInvalid" />: The cache directory provided when calling <see cref="Platform.PlatformInterface.Create" /> was invalid.
/// <see cref="Result.PlayerDataStorageUserThrottled" />: There were too many requests to the Data Storage service recently by the local user. The application must wait some time before trying again.
/// <see cref="Result.PlayerDataStorageEncryptionKeyNotSet" />: The encryption key value was not set when calling <see cref="Platform.PlatformInterface.Create" />.
/// <see cref="Result.PlayerDataStorageFileCorrupted" />: The downloaded or cached file was corrupted or invalid in some way. What exactly is wrong with the file is returned in the logs (potentially retryable).
/// <see cref="Result.InvalidState" />: The read operation is not allowed (e.g. when application is suspended).
/// <see cref="Result.UnexpectedError" />: An unexpected error occurred either downloading, or reading the downloaded file. This most commonly means there were file IO issues such as: permission issues, disk is full, etc. (potentially retryable)
/// </summary>
public Result ResultCode { get; set; }
/// <summary>
/// Client-specified data passed into the file read request
/// </summary>
public object ClientData { get; set; }
/// <summary>
/// The Product User ID of the local user who initiated this request
/// </summary>
public ProductUserId LocalUserId { get; set; }
/// <summary>
/// The filename of the file that has been finished reading
/// </summary>
public Utf8String Filename { get; set; }
public Result? GetResultCode()
{
return ResultCode;
}
internal void Set(ref ReadFileCallbackInfoInternal other)
{
ResultCode = other.ResultCode;
ClientData = other.ClientData;
LocalUserId = other.LocalUserId;
Filename = other.Filename;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct ReadFileCallbackInfoInternal : ICallbackInfoInternal, IGettable<ReadFileCallbackInfo>, ISettable<ReadFileCallbackInfo>, System.IDisposable
{
private Result m_ResultCode;
private System.IntPtr m_ClientData;
private System.IntPtr m_LocalUserId;
private System.IntPtr m_Filename;
public Result ResultCode
{
get
{
return m_ResultCode;
}
set
{
m_ResultCode = value;
}
}
public object ClientData
{
get
{
object value;
Helper.Get(m_ClientData, out value);
return value;
}
set
{
Helper.Set(value, ref m_ClientData);
}
}
public System.IntPtr ClientDataAddress
{
get
{
return m_ClientData;
}
}
public ProductUserId LocalUserId
{
get
{
ProductUserId value;
Helper.Get(m_LocalUserId, out value);
return value;
}
set
{
Helper.Set(value, ref m_LocalUserId);
}
}
public Utf8String Filename
{
get
{
Utf8String value;
Helper.Get(m_Filename, out value);
return value;
}
set
{
Helper.Set(value, ref m_Filename);
}
}
public void Set(ref ReadFileCallbackInfo other)
{
ResultCode = other.ResultCode;
ClientData = other.ClientData;
LocalUserId = other.LocalUserId;
Filename = other.Filename;
}
public void Set(ref ReadFileCallbackInfo? other)
{
if (other.HasValue)
{
ResultCode = other.Value.ResultCode;
ClientData = other.Value.ClientData;
LocalUserId = other.Value.LocalUserId;
Filename = other.Value.Filename;
}
}
public void Dispose()
{
Helper.Dispose(ref m_ClientData);
Helper.Dispose(ref m_LocalUserId);
Helper.Dispose(ref m_Filename);
}
public void Get(out ReadFileCallbackInfo output)
{
output = new ReadFileCallbackInfo();
output.Set(ref this);
}
}
}