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.
159 lines
3.3 KiB
159 lines
3.3 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>
|
|
/// Metadata information for a specific file
|
|
/// </summary>
|
|
public class FileMetadata : ISettable
|
|
{
|
|
/// <summary>
|
|
/// The total size of the file in bytes (Includes file header in addition to file contents)
|
|
/// </summary>
|
|
public uint FileSizeBytes { get; set; }
|
|
|
|
/// <summary>
|
|
/// The MD5 Hash of the entire file (including additional file header), in hex digits
|
|
/// </summary>
|
|
public string MD5Hash { get; set; }
|
|
|
|
/// <summary>
|
|
/// The file's name
|
|
/// </summary>
|
|
public string Filename { get; set; }
|
|
|
|
/// <summary>
|
|
/// The POSIX timestamp when the file was saved last time.
|
|
/// </summary>
|
|
public System.DateTimeOffset? LastModifiedTime { get; set; }
|
|
|
|
/// <summary>
|
|
/// The size of data (payload) in file in unencrypted (original) form.
|
|
/// </summary>
|
|
public uint UnencryptedDataSizeBytes { get; set; }
|
|
|
|
internal void Set(FileMetadataInternal? other)
|
|
{
|
|
if (other != null)
|
|
{
|
|
FileSizeBytes = other.Value.FileSizeBytes;
|
|
MD5Hash = other.Value.MD5Hash;
|
|
Filename = other.Value.Filename;
|
|
LastModifiedTime = other.Value.LastModifiedTime;
|
|
UnencryptedDataSizeBytes = other.Value.UnencryptedDataSizeBytes;
|
|
}
|
|
}
|
|
|
|
public void Set(object other)
|
|
{
|
|
Set(other as FileMetadataInternal?);
|
|
}
|
|
}
|
|
|
|
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
|
|
internal struct FileMetadataInternal : ISettable, System.IDisposable
|
|
{
|
|
private int m_ApiVersion;
|
|
private uint m_FileSizeBytes;
|
|
private System.IntPtr m_MD5Hash;
|
|
private System.IntPtr m_Filename;
|
|
private long m_LastModifiedTime;
|
|
private uint m_UnencryptedDataSizeBytes;
|
|
|
|
public uint FileSizeBytes
|
|
{
|
|
get
|
|
{
|
|
return m_FileSizeBytes;
|
|
}
|
|
|
|
set
|
|
{
|
|
m_FileSizeBytes = value;
|
|
}
|
|
}
|
|
|
|
public string MD5Hash
|
|
{
|
|
get
|
|
{
|
|
string value;
|
|
Helper.TryMarshalGet(m_MD5Hash, out value);
|
|
return value;
|
|
}
|
|
|
|
set
|
|
{
|
|
Helper.TryMarshalSet(ref m_MD5Hash, value);
|
|
}
|
|
}
|
|
|
|
public string Filename
|
|
{
|
|
get
|
|
{
|
|
string value;
|
|
Helper.TryMarshalGet(m_Filename, out value);
|
|
return value;
|
|
}
|
|
|
|
set
|
|
{
|
|
Helper.TryMarshalSet(ref m_Filename, value);
|
|
}
|
|
}
|
|
|
|
public System.DateTimeOffset? LastModifiedTime
|
|
{
|
|
get
|
|
{
|
|
System.DateTimeOffset? value;
|
|
Helper.TryMarshalGet(m_LastModifiedTime, out value);
|
|
return value;
|
|
}
|
|
|
|
set
|
|
{
|
|
Helper.TryMarshalSet(ref m_LastModifiedTime, value);
|
|
}
|
|
}
|
|
|
|
public uint UnencryptedDataSizeBytes
|
|
{
|
|
get
|
|
{
|
|
return m_UnencryptedDataSizeBytes;
|
|
}
|
|
|
|
set
|
|
{
|
|
m_UnencryptedDataSizeBytes = value;
|
|
}
|
|
}
|
|
|
|
public void Set(FileMetadata other)
|
|
{
|
|
if (other != null)
|
|
{
|
|
m_ApiVersion = PlayerDataStorageInterface.FilemetadataApiLatest;
|
|
FileSizeBytes = other.FileSizeBytes;
|
|
MD5Hash = other.MD5Hash;
|
|
Filename = other.Filename;
|
|
LastModifiedTime = other.LastModifiedTime;
|
|
UnencryptedDataSizeBytes = other.UnencryptedDataSizeBytes;
|
|
}
|
|
}
|
|
|
|
public void Set(object other)
|
|
{
|
|
Set(other as FileMetadata);
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Helper.TryMarshalDispose(ref m_MD5Hash);
|
|
Helper.TryMarshalDispose(ref m_Filename);
|
|
}
|
|
}
|
|
}
|