// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Sessions
{
///
/// Internal details about a session, found on both active sessions and within search results
///
public struct SessionDetailsInfo
{
///
/// Session ID assigned by the backend service
///
public Utf8String SessionId { get; set; }
///
/// IP address of this session as visible by the backend service
///
public Utf8String HostAddress { get; set; }
///
/// Number of remaining open spaces on the session (NumPublicConnections - RegisteredPlayers
///
public uint NumOpenPublicConnections { get; set; }
///
/// Reference to the additional settings associated with this session
///
public SessionDetailsSettings? Settings { get; set; }
internal void Set(ref SessionDetailsInfoInternal other)
{
SessionId = other.SessionId;
HostAddress = other.HostAddress;
NumOpenPublicConnections = other.NumOpenPublicConnections;
Settings = other.Settings;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct SessionDetailsInfoInternal : IGettable, ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_SessionId;
private System.IntPtr m_HostAddress;
private uint m_NumOpenPublicConnections;
private System.IntPtr m_Settings;
public Utf8String SessionId
{
get
{
Utf8String value;
Helper.Get(m_SessionId, out value);
return value;
}
set
{
Helper.Set(value, ref m_SessionId);
}
}
public Utf8String HostAddress
{
get
{
Utf8String value;
Helper.Get(m_HostAddress, out value);
return value;
}
set
{
Helper.Set(value, ref m_HostAddress);
}
}
public uint NumOpenPublicConnections
{
get
{
return m_NumOpenPublicConnections;
}
set
{
m_NumOpenPublicConnections = value;
}
}
public SessionDetailsSettings? Settings
{
get
{
SessionDetailsSettings? value;
Helper.Get(m_Settings, out value);
return value;
}
set
{
Helper.Set(ref value, ref m_Settings);
}
}
public void Set(ref SessionDetailsInfo other)
{
m_ApiVersion = SessionDetails.SessiondetailsInfoApiLatest;
SessionId = other.SessionId;
HostAddress = other.HostAddress;
NumOpenPublicConnections = other.NumOpenPublicConnections;
Settings = other.Settings;
}
public void Set(ref SessionDetailsInfo? other)
{
if (other.HasValue)
{
m_ApiVersion = SessionDetails.SessiondetailsInfoApiLatest;
SessionId = other.Value.SessionId;
HostAddress = other.Value.HostAddress;
NumOpenPublicConnections = other.Value.NumOpenPublicConnections;
Settings = other.Value.Settings;
}
}
public void Dispose()
{
Helper.Dispose(ref m_SessionId);
Helper.Dispose(ref m_HostAddress);
Helper.Dispose(ref m_Settings);
}
public void Get(out SessionDetailsInfo output)
{
output = new SessionDetailsInfo();
output.Set(ref this);
}
}
}