// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.PlayerDataStorage
{
///
/// The result information for a request to write data to a file
///
public struct WriteFileCallbackInfo : ICallbackInfo
{
///
/// The result code for the operation.
/// : The request was successful.
/// : The request was canceled.
/// : There are too many requests in progress for the local user at this time.
/// : There is another requests in progress for the specified file by this user.
/// : The cache directory was not set when calling .
/// : The cache directory provided when calling was invalid.
/// : There were too many requests to the Data Storage service recently by the local user. The application must wait some time before trying again.
/// : The encryption key value was not set when calling .
/// : The read operation is not allowed (e.g. when application is suspended).
/// : 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)
///
public Result ResultCode { get; set; }
///
/// Client-specified data passed into the file write request
///
public object ClientData { get; set; }
///
/// The Product User ID of the local user who initiated this request
///
public ProductUserId LocalUserId { get; set; }
///
/// The file name that is being written to
///
public Utf8String Filename { get; set; }
public Result? GetResultCode()
{
return ResultCode;
}
internal void Set(ref WriteFileCallbackInfoInternal 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 WriteFileCallbackInfoInternal : ICallbackInfoInternal, IGettable, ISettable, 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 WriteFileCallbackInfo other)
{
ResultCode = other.ResultCode;
ClientData = other.ClientData;
LocalUserId = other.LocalUserId;
Filename = other.Filename;
}
public void Set(ref WriteFileCallbackInfo? 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 WriteFileCallbackInfo output)
{
output = new WriteFileCallbackInfo();
output.Set(ref this);
}
}
}