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.

179 lines
4.0 KiB

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Presence
{
/// <summary>
/// Output parameters for the <see cref="OnJoinGameAcceptedCallback" /> Function.
/// </summary>
public struct JoinGameAcceptedCallbackInfo : ICallbackInfo
{
/// <summary>
/// Context that was passed into <see cref="PresenceInterface.AddNotifyJoinGameAccepted" />
/// </summary>
public object ClientData { get; set; }
/// <summary>
/// The Join Info custom game-data string to use to join the target user.
/// Set to a null pointer to delete the value.
/// </summary>
public Utf8String JoinInfo { get; set; }
/// <summary>
/// The Epic Account ID of the user who accepted the invitation
/// </summary>
public EpicAccountId LocalUserId { get; set; }
/// <summary>
/// The Epic Account ID of the user who sent the invitation
/// </summary>
public EpicAccountId TargetUserId { get; set; }
/// <summary>
/// If the value is not <see cref="UI.UIInterface.EventidInvalid" /> then it must be passed back to the SDK using <see cref="UI.UIInterface.AcknowledgeEventId" />.
/// This should be done after attempting to join the game and either succeeding or failing to connect.
/// This is necessary to allow the Social Overlay UI to manage the `Join` button.
/// </summary>
public ulong UiEventId { get; set; }
public Result? GetResultCode()
{
return null;
}
internal void Set(ref JoinGameAcceptedCallbackInfoInternal other)
{
ClientData = other.ClientData;
JoinInfo = other.JoinInfo;
LocalUserId = other.LocalUserId;
TargetUserId = other.TargetUserId;
UiEventId = other.UiEventId;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct JoinGameAcceptedCallbackInfoInternal : ICallbackInfoInternal, IGettable<JoinGameAcceptedCallbackInfo>, ISettable<JoinGameAcceptedCallbackInfo>, System.IDisposable
{
private System.IntPtr m_ClientData;
private System.IntPtr m_JoinInfo;
private System.IntPtr m_LocalUserId;
private System.IntPtr m_TargetUserId;
private ulong m_UiEventId;
public object ClientData
{
get
{
object value;
Helper.Get(m_ClientData, out value);
return value;
}
set
{
Helper.Set(value, ref m_ClientData);
}
}
public System.IntPtr ClientDataAddress
{
get
{
return m_ClientData;
}
}
public Utf8String JoinInfo
{
get
{
Utf8String value;
Helper.Get(m_JoinInfo, out value);
return value;
}
set
{
Helper.Set(value, ref m_JoinInfo);
}
}
public EpicAccountId LocalUserId
{
get
{
EpicAccountId value;
Helper.Get(m_LocalUserId, out value);
return value;
}
set
{
Helper.Set(value, ref m_LocalUserId);
}
}
public EpicAccountId TargetUserId
{
get
{
EpicAccountId value;
Helper.Get(m_TargetUserId, out value);
return value;
}
set
{
Helper.Set(value, ref m_TargetUserId);
}
}
public ulong UiEventId
{
get
{
return m_UiEventId;
}
set
{
m_UiEventId = value;
}
}
public void Set(ref JoinGameAcceptedCallbackInfo other)
{
ClientData = other.ClientData;
JoinInfo = other.JoinInfo;
LocalUserId = other.LocalUserId;
TargetUserId = other.TargetUserId;
UiEventId = other.UiEventId;
}
public void Set(ref JoinGameAcceptedCallbackInfo? other)
{
if (other.HasValue)
{
ClientData = other.Value.ClientData;
JoinInfo = other.Value.JoinInfo;
LocalUserId = other.Value.LocalUserId;
TargetUserId = other.Value.TargetUserId;
UiEventId = other.Value.UiEventId;
}
}
public void Dispose()
{
Helper.Dispose(ref m_ClientData);
Helper.Dispose(ref m_JoinInfo);
Helper.Dispose(ref m_LocalUserId);
Helper.Dispose(ref m_TargetUserId);
}
public void Get(out JoinGameAcceptedCallbackInfo output)
{
output = new JoinGameAcceptedCallbackInfo();
output.Set(ref this);
}
}
}