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.

125 lines
3.8 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>
/// Input data for the <see cref="PlayerDataStorageInterface.WriteFile" /> function
/// </summary>
public class WriteFileOptions
{
/// <summary>
/// The Product User ID of the local user who is writing the requested file to the cloud
/// </summary>
public ProductUserId LocalUserId { get; set; }
/// <summary>
/// The name of the file to write; if this file already exists, the contents will be replaced if the write request completes successfully
/// </summary>
public string Filename { get; set; }
/// <summary>
/// Requested maximum amount of data (in bytes) that can be written to the file per tick
/// </summary>
public uint ChunkLengthBytes { get; set; }
/// <summary>
/// Callback function that provides chunks of data to be written into the requested file
/// </summary>
public OnWriteFileDataCallback WriteFileDataCallback { get; set; }
/// <summary>
/// Optional callback function to inform the application of upload progress; will be called at least once if set
/// </summary>
public OnFileTransferProgressCallback FileTransferProgressCallback { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct WriteFileOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_LocalUserId;
private System.IntPtr m_Filename;
private uint m_ChunkLengthBytes;
private System.IntPtr m_WriteFileDataCallback;
private System.IntPtr m_FileTransferProgressCallback;
public ProductUserId LocalUserId
{
set
{
Helper.TryMarshalSet(ref m_LocalUserId, value);
}
}
public string Filename
{
set
{
Helper.TryMarshalSet(ref m_Filename, value);
}
}
public uint ChunkLengthBytes
{
set
{
m_ChunkLengthBytes = value;
}
}
private static OnWriteFileDataCallbackInternal s_WriteFileDataCallback;
public static OnWriteFileDataCallbackInternal WriteFileDataCallback
{
get
{
if (s_WriteFileDataCallback == null)
{
s_WriteFileDataCallback = new OnWriteFileDataCallbackInternal(PlayerDataStorageInterface.OnWriteFileDataCallbackInternalImplementation);
}
return s_WriteFileDataCallback;
}
}
private static OnFileTransferProgressCallbackInternal s_FileTransferProgressCallback;
public static OnFileTransferProgressCallbackInternal FileTransferProgressCallback
{
get
{
if (s_FileTransferProgressCallback == null)
{
s_FileTransferProgressCallback = new OnFileTransferProgressCallbackInternal(PlayerDataStorageInterface.OnFileTransferProgressCallbackInternalImplementation);
}
return s_FileTransferProgressCallback;
}
}
public void Set(WriteFileOptions other)
{
if (other != null)
{
m_ApiVersion = PlayerDataStorageInterface.WritefileoptionsApiLatest;
LocalUserId = other.LocalUserId;
Filename = other.Filename;
ChunkLengthBytes = other.ChunkLengthBytes;
m_WriteFileDataCallback = other.WriteFileDataCallback != null ? System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(WriteFileDataCallback) : System.IntPtr.Zero;
m_FileTransferProgressCallback = other.FileTransferProgressCallback != null ? System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(FileTransferProgressCallback) : System.IntPtr.Zero;
}
}
public void Set(object other)
{
Set(other as WriteFileOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_LocalUserId);
Helper.TryMarshalDispose(ref m_Filename);
Helper.TryMarshalDispose(ref m_WriteFileDataCallback);
Helper.TryMarshalDispose(ref m_FileTransferProgressCallback);
}
}
}