// 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 struct 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 Utf8String 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.Set(value, ref m_LocalUserId); } } public Utf8String Filename { set { Helper.Set(value, ref m_Filename); } } 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(ref WriteFileOptions other) { 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(ref WriteFileOptions? other) { if (other.HasValue) { m_ApiVersion = PlayerDataStorageInterface.WritefileoptionsApiLatest; LocalUserId = other.Value.LocalUserId; Filename = other.Value.Filename; ChunkLengthBytes = other.Value.ChunkLengthBytes; m_WriteFileDataCallback = other.Value.WriteFileDataCallback != null ? System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(WriteFileDataCallback) : System.IntPtr.Zero; m_FileTransferProgressCallback = other.Value.FileTransferProgressCallback != null ? System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(FileTransferProgressCallback) : System.IntPtr.Zero; } } public void Dispose() { Helper.Dispose(ref m_LocalUserId); Helper.Dispose(ref m_Filename); Helper.Dispose(ref m_WriteFileDataCallback); Helper.Dispose(ref m_FileTransferProgressCallback); } } }