// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.PlayerDataStorage { /// /// Input data for the function /// public class WriteFileOptions { /// /// The Product User ID of the local user who is writing the requested file to the cloud /// public ProductUserId LocalUserId { get; set; } /// /// The name of the file to write; if this file already exists, the contents will be replaced if the write request completes successfully /// public string Filename { get; set; } /// /// Requested maximum amount of data (in bytes) that can be written to the file per tick /// public uint ChunkLengthBytes { get; set; } /// /// Callback function that provides chunks of data to be written into the requested file /// public OnWriteFileDataCallback WriteFileDataCallback { get; set; } /// /// Optional callback function to inform the application of upload progress; will be called at least once if set /// 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); } } }