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.

92 lines
1.9 KiB

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