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.

141 lines
3.0 KiB

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Sessions
{
/// <summary>
/// Top level details about an active session
/// </summary>
public struct ActiveSessionInfo
{
/// <summary>
/// Name of the session
/// </summary>
public Utf8String SessionName { get; set; }
/// <summary>
/// The Product User ID of the local user who created or joined the session
/// </summary>
public ProductUserId LocalUserId { get; set; }
/// <summary>
/// Current state of the session
/// </summary>
public OnlineSessionState State { get; set; }
/// <summary>
/// Session details
/// </summary>
public SessionDetailsInfo? SessionDetails { get; set; }
internal void Set(ref ActiveSessionInfoInternal other)
{
SessionName = other.SessionName;
LocalUserId = other.LocalUserId;
State = other.State;
SessionDetails = other.SessionDetails;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct ActiveSessionInfoInternal : IGettable<ActiveSessionInfo>, ISettable<ActiveSessionInfo>, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_SessionName;
private System.IntPtr m_LocalUserId;
private OnlineSessionState m_State;
private System.IntPtr m_SessionDetails;
public Utf8String SessionName
{
get
{
Utf8String value;
Helper.Get(m_SessionName, out value);
return value;
}
set
{
Helper.Set(value, ref m_SessionName);
}
}
public ProductUserId LocalUserId
{
get
{
ProductUserId value;
Helper.Get(m_LocalUserId, out value);
return value;
}
set
{
Helper.Set(value, ref m_LocalUserId);
}
}
public OnlineSessionState State
{
get
{
return m_State;
}
set
{
m_State = value;
}
}
public SessionDetailsInfo? SessionDetails
{
get
{
SessionDetailsInfo? value;
Helper.Get<SessionDetailsInfoInternal, SessionDetailsInfo>(m_SessionDetails, out value);
return value;
}
set
{
Helper.Set<SessionDetailsInfo, SessionDetailsInfoInternal>(ref value, ref m_SessionDetails);
}
}
public void Set(ref ActiveSessionInfo other)
{
m_ApiVersion = ActiveSession.ActivesessionCopyinfoApiLatest;
SessionName = other.SessionName;
LocalUserId = other.LocalUserId;
State = other.State;
SessionDetails = other.SessionDetails;
}
public void Set(ref ActiveSessionInfo? other)
{
if (other.HasValue)
{
m_ApiVersion = ActiveSession.ActivesessionCopyinfoApiLatest;
SessionName = other.Value.SessionName;
LocalUserId = other.Value.LocalUserId;
State = other.Value.State;
SessionDetails = other.Value.SessionDetails;
}
}
public void Dispose()
{
Helper.Dispose(ref m_SessionName);
Helper.Dispose(ref m_LocalUserId);
Helper.Dispose(ref m_SessionDetails);
}
public void Get(out ActiveSessionInfo output)
{
output = new ActiveSessionInfo();
output.Set(ref this);
}
}
}