// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Lobby
{
///
/// An attribute and its visibility setting stored with a lobby.
/// Used to store both lobby and lobby member data
///
public struct Attribute
{
///
/// Key/Value pair describing the attribute
///
public AttributeData? Data { get; set; }
///
/// Is this attribute public or private to the lobby and its members
///
public LobbyAttributeVisibility Visibility { get; set; }
internal void Set(ref AttributeInternal other)
{
Data = other.Data;
Visibility = other.Visibility;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct AttributeInternal : IGettable, ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_Data;
private LobbyAttributeVisibility m_Visibility;
public AttributeData? Data
{
get
{
AttributeData? value;
Helper.Get(m_Data, out value);
return value;
}
set
{
Helper.Set(ref value, ref m_Data);
}
}
public LobbyAttributeVisibility Visibility
{
get
{
return m_Visibility;
}
set
{
m_Visibility = value;
}
}
public void Set(ref Attribute other)
{
m_ApiVersion = LobbyInterface.AttributeApiLatest;
Data = other.Data;
Visibility = other.Visibility;
}
public void Set(ref Attribute? other)
{
if (other.HasValue)
{
m_ApiVersion = LobbyInterface.AttributeApiLatest;
Data = other.Value.Data;
Visibility = other.Value.Visibility;
}
}
public void Dispose()
{
Helper.Dispose(ref m_Data);
}
public void Get(out Attribute output)
{
output = new Attribute();
output.Set(ref this);
}
}
}